adding test scripts
[csql.git] / test / sqlapi / Parameter / Makefile
blob63eb8fd7f34c8a69975ecbfe73574a811f2fafd9
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\
33 test003 test003n\
34 test004 test004n\
35 test005 test005n\
36 test006 test006n\
37 test007 test007n\
38 test008 test008n\
39 test100 test100n
41 ifeq ($(PlatForm), supported)
42 all: $(TARGETS)
43 else
44 all:
45 echo "CSQL is not supported on $(OSNAME) platform"
46 endif
48 test001: paratest1.c common.h
49 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
50 test001n: paratest1.c common.h
51 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
52 test002:paratest2.c common.h
53 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
54 test002n: paratest2.c common.h
55 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
56 test003:paratest3.c common.h
57 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
58 test003n: paratest3.c common.h
59 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
60 test004:paratest4.c common.h
61 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
62 test004n: paratest4.c common.h
63 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
64 test005:paratest5.c common.h
65 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
66 test005n: paratest5.c common.h
67 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
68 test006:paratest6.c common.h
69 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
70 test006n: paratest6.c common.h
71 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
72 test007:paratest7date.c common.h
73 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
74 test007n: paratest7date.c common.h
75 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
76 test008:paratest8now.c common.h
77 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
78 test008n: paratest8now.c common.h
79 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
80 test100:paratest100.c common.h
81 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
82 test100n: paratest100.c common.h
83 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
85 clean:
86 rm -f *.o ${TARGETS}