adding test scripts
[csql.git] / test / sqlapi / Csql / ParamStmt / Makefile
blob45ee9f2cedf3911147ecfb2a0d3a68c7cc702598
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)/install/include -I../../../../include
24 ifeq ($(BUILDTYPE), MMDB)
25 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlsql -lcsql -lcsqlsqllog -lcsqlnw -lcsqlsqlnw
26 else
27 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlsql -lcsql -lcsqlsqllog -lcsqlnw -lcacheload -lcsqlsqlnw -lcsqlgw -lcsqlodbcadapter
28 endif
30 TARGETS = \
31 test001 test001n \
32 test002 test002n \
34 ifeq ($(PlatForm), supported)
35 all: $(TARGETS)
36 else
37 all:
38 echo "CSQL is not supported on $(OSNAME) platform"
39 endif
41 test001: paratest1.c common.h
42 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
43 test001n: paratest1.c common.h
44 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
45 test002: paratest2.c common.h
46 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
47 test002n: paratest2.c common.h
48 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
50 clean:
51 rm -f *.o ${TARGETS}