changes for libcsqlstorage and inclusion of libcsqlbase
[csql.git] / test / tools / catalog / Makefile
blob9ffb050074a3bfcdd6e4bdadba832767d49e26ef
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 -ldl
13 PlatForm=supported
14 endif
15 ifeq ($(OSNAME), FreeBSD)
16 CPlus = g++
17 CPlusFlags = -g -w
18 SYSLIBS= -rdynamic -lrt -lpthread -lcrypt -ldl
19 PlatForm=supported
20 endif
23 INCL= -I$(CSQL_INSTALL_ROOT)/include -I../../../include
24 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsqlstorage -lcsqlbase
26 TARGETS = \
27 create drop insert
30 ifeq ($(PlatForm), supported)
31 all: $(TARGETS)
32 else
33 all:
34 echo "CSQL is not supported on $(OSNAME) platform"
35 endif
37 create: create.c
38 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
39 drop: drop.c
40 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
41 insert: insert.c
42 $(CPlus) -DWITHINDEX $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
43 clean:
44 rm -f $(TARGETS)