adding test scripts
[csql.git] / examples / odbc / Makefile
blob02e15a7770a485bad74b121a72fc049641ca333e
1 OSNAME = $(shell uname -s)
2 PlatForm=supported
4 ifeq ($(OSNAME), SunOS)
5 CPlus = CC
6 CPlusFlags = -O2 -w
7 SYSLIBS=-ldl -lnsl -lsocket -lposix4
8 else
9 ifeq ($(OSNAME), Linux)
10 CPlus = g++
11 CPlusFlags = -O2 -w
12 SYSLIBS= -rdynamic -lrt -lpthread -lcrypt
13 else
14 PlatForm=notsupported
15 all:
16 echo "CSQL is not supported on $(OSNAME) platform"
17 endif
18 endif
20 INCL= -I$(CSQL_INSTALL_ROOT)/include
22 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlodbc
24 TARGETS = odbcexample
26 ifeq ($(PlatForm), supported)
27 all: $(TARGETS)
28 endif
30 .c.o:.c
31 $(CPlus) $(CPlusFlags) $(INCL) -c -o $@ $<
33 odbcexample:odbcexample.o
34 $(CPlus) $(CPlusFlags) $(INCL) -o $@ $< $(LIBS) $(SYSLIBS)
36 clean:
37 rm -f *.o $(TARGETS)