1 OSNAME
= $(shell uname
-s
)
3 ifeq ($(OSNAME
), SunOS
)
5 CPlusFlags
= -O2
-w
$(COMPILER_FLAG
)
6 SYSLIBS
=-ldl
-lnsl
-lsocket
-lposix4
9 ifeq ($(OSNAME
), Linux
)
12 SYSLIBS
= -rdynamic
-lrt
-lpthread
-lcrypt
15 ifeq ($(OSNAME
), FreeBSD
)
18 SYSLIBS
= -rdynamic
-lrt
-lpthread
-lcrypt
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
27 LIBS
= -L
$(CSQL_INSTALL_ROOT
)/lib
-lcsqlodbc
-lcacheload
-lcsqlgw
-lcsqlnw
-lcsqlodbcadapter
-lcsqlsqlnw
-lcacheload
-lcsql
-lcsqlsql
-lcsqlsqllog
31 ifeq ($(BUILDTYPE
), MMDB
)
32 TARGETS
= test001 test002 test003 test004 test005 \
33 test006 test007 test008 test009 test010 \
34 test001nw test002nw test003nw test004nw test005nw \
35 test006nw test007nw test008nw test009nw test010nw
37 TARGETS
= test001 test002 test003 test004 test005 \
38 test006 test007 test008 test009 test010 \
39 test001nw test002nw test003nw test004nw test005nw \
40 test006nw test007nw test008nw test009nw test010nw
43 ifeq ($(PlatForm
), supported
)
47 echo
"CSQL is not supported on $(OSNAME) platform"
50 test001
: odbcselect1.c
51 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
52 test001nw
: odbcselect1nw.c
53 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
55 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
56 test002nw
: odbcselect2nw.c
57 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
59 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
60 test003nw
: odbcselect3nw.c
61 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
63 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
64 test004nw
: odbcselect4nw.c
65 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
67 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
68 test005nw
: odbcselect5nw.c
69 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
71 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
72 test006nw
: odbcselect6nw.c
73 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
75 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
76 test007nw
: odbcselect7nw.c
77 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
79 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
80 test008nw
: odbcselect8nw.c
81 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
83 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
84 test009nw
: odbcselect9nw.c
85 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
86 test010
:odbcselect10.c
87 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
88 test010nw
: odbcselect10nw.c
89 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)