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
30 ifeq ($(BUILDTYPE
), MMDB
)
31 TARGETS
= test001 test002 test003 test004 test005 test006 test007 \
32 test001nw test002nw test003nw test004nw test005nw test006nw test007nw
34 TARGETS
= test001 test002 test003 test004 test005 test006 test007 \
35 test001nw test002nw test003nw test004nw test005nw test006nw test007nw
38 ifeq ($(PlatForm
), supported
)
42 echo
"CSQL is not supported on $(OSNAME) platform"
46 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
47 test001nw
: metadata1nw.c
48 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
50 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
51 test002nw
: metadata2nw.c
52 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
54 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
55 test003nw
: metadata3nw.c
56 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
58 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
59 test004nw
: metadata4nw.c
60 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
62 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
63 test005nw
: metadata5nw.c
64 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
66 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
67 test006nw
: metadata6nw.c
68 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
70 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
71 test007nw
: metadata7nw.c
72 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)