*** empty log message ***
[csql.git] / test / system / config / Makefile
blob71a90ded5202c36be4cb707835a89625685da11b
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
13 PlatForm=supported
14 endif
15 ifeq ($(OSNAME), FreeBSD)
16 CPlus = g++
17 CPlusFlags = -g -w
18 SYSLIBS= -rdynamic -lrt -lpthread -lcrypt
19 PlatForm=supported
20 endif
23 INCL= -I$(CSQL_INSTALL_ROOT)/include -I../../../include
24 LIBS= -L$(CSQL_INSTALL_ROOT)/lib -lcsql
26 TARGETS = \
27 connect \
28 test001 \
29 test002
31 ifeq ($(PlatForm), supported)
32 all: $(TARGETS)
33 else
34 all:
35 echo "CSQL is not supported on $(OSNAME) platform"
36 endif
38 connect: connect.c
39 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
40 test001: conftest1.c
41 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
42 test002: conftest2.c
43 $(CPlus) $(CPlusFlags) -o $@ $< $(INCL) $(LIBS) $(SYSLIBS)
45 clean:
46 rm -f $(TARGETS)