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
25 INCL
= -I
$(CSQL_INSTALL_ROOT
)/include -I..
/..
/include
26 LIBS
= -L
$(CSQL_INSTALL_ROOT
)/lib
-lcsqlodbc
-lcsqlsql
-lcsqlsqllog
-lcsql
-lcsqlnw
-lcsqlodbcadapter
-lcsqlfault
28 TARGETS
= stmtTest3 stmtTest5 stmtTest6 stmtTest7 stmtTest8 stmtTest9
30 ifeq ($(PlatForm
), supported
)
34 echo
"CSQL is not supported on $(OSNAME) platform"
37 stmtTest3
: stmtTest3.c
38 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
39 stmtTest5
: stmtTest5.c
40 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
41 stmtTest6
: stmtTest6.c
42 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
43 stmtTest7
: stmtTest7.c
44 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
45 stmtTest8
: stmtTest8.c
46 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
47 stmtTest9
: stmtTest9.c
48 $(CPlus
) $(CPlusFlags
) -o
$@
$< $(INCL
) $(LIBS
) $(SYSLIBS
)
51 rm -f
$(TARGETS
) *.class