adding test scripts
[csql.git] / test / sqlapi / Csql / DDLStmt / Makefile
blobfb9542b5cdf3b0846181b84cdeadb6453a8bfb42
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 hashindexonalldatatype hashindexonalldatatypen \
38 treeindexonalldatatype treeindexonalldatatypen \
39 compositehashonalldatatype compositehashonalldatatypen \
40 test010 test010n
42 ifeq ($(PlatForm), supported)
43 all: $(TARGETS)
44 else
45 all:
46 echo "CSQL is not supported on $(OSNAME) platform"
47 endif
49 test001: createtablewithalldatatype.c common.h
50 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
51 test001n: createtablewithalldatatype.c common.h
52 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
53 test002: defaultwithalldatatype.c common.h
54 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
55 test002n: defaultwithalldatatype.c common.h
56 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
57 test003: notnullonalldatatype.c common.h
58 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
59 test003n: notnullonalldatatype.c common.h
60 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
61 test004: pkeyfkeyonalldatatype.c common.h
62 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
63 test004n: pkeyfkeyonalldatatype.c common.h
64 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
65 test005: autoincreonalldatatype.c common.h
66 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
67 test005n: autoincreonalldatatype.c common.h
68 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
69 test006: copystatement.c common.h
70 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
71 test006n: copystatement.c common.h
72 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
73 hashindexonalldatatype: hashindexonalldatatype.c common.h
74 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
75 hashindexonalldatatypen: hashindexonalldatatype.c common.h
76 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
77 treeindexonalldatatype: treeindexonalldatatype.c common.h
78 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
79 treeindexonalldatatypen: treeindexonalldatatype.c common.h
80 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
81 compositehashonalldatatype: compositehashonalldatatype.c common.h
82 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
83 compositehashonalldatatypen: compositehashonalldatatype.c common.h
84 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
85 test010: charvarcharrange.c common.h
86 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
87 test010n: charvarcharrange.c common.h
88 $(CPlus) -DNETWORK $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
90 clean:
91 rm -f *.o ${TARGETS}