adding test scripts
[csql.git] / test / odbc / NonSelectDML / Makefile
blob5b884332e03f0535ba436a0114f8b38fbbc95b85
1 OSNAME = $(shell uname -s)
2 PlatForm=notsupported
3 ifeq ($(OSNAME), SunOS)
4 CPlus = CC
5 CPlusFlags = -O2 -w $(COMPILER_FLAG)
6 SYSLIBS=-ldl -lnsl -lsocket -lposix4
7 PlatForm=supported
8 endif
9 ifeq ($(OSNAME), Linux)
10 CPlus = g++
11 CPlusFlags = -g -w
12 SYSLIBS= -rdynamic -lrt -lpthread -lcrypt
13 PlatForm=supported
14 endif
15 ifeq ($(OSNAME), FreeBSD)
16 CPlus = g++
17 CPlusFlags = -g -w
18 SYSLIBS= -rdynamic -lrt -lpthread -lcrypt
19 PlatForm=supported
20 endif
23 INCL= -I$(CSQL_INSTALL_ROOT)/include -I../../../include
24 ifeq ($(BUILDTYPE), MMDB)
25 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlodbc -lcsqlnw -lcsqlsqlnw -lcsql -lcsqlsql -lcsqlsqllog
26 else
27 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlodbc -lcacheload -lcsqlgw -lcsqlnw -lcsqlodbcadapter -lcsqlsqlnw -lcacheload -lcsql -lcsqlsql -lcsqlsqllog
28 endif
30 ifeq ($(BUILDTYPE), MMDB)
31 TARGETS = test001 \
32 test001nw
33 else
34 TARGETS = test001 \
35 test001nw
36 endif
38 ifeq ($(PlatForm), supported)
39 all: $(TARGETS)
40 else
41 all:
42 echo "CSQL is not supported on $(OSNAME) platform"
43 endif
45 test001: nonselectdml1.c
46 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
47 test001nw: nonselectdml1nw.c
48 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
52 clean:
53 rm -f *.o $(TARGETS)