FIXME: toplevel Makefile: 'make ntest' doesn't run versaplexd for now.
[versaplex.git] / vxodbc / Makefile-linux
blob1b58697d9a0d7412c270843b66208ad9efbf5fc0
1 include Makefile-common
3 WVPORTS=../wv/wvports
4 XPLC=$(WVPORTS)/xplc/build/xplc
5 OPENSSL=$(WVPORTS)/openssl/build/openssl
6 DBUS=$(WVPORTS)/dbus/build/dbus/dbus/.libs
7 BOOST=$(WVPORTS)/boost/build/boost
8 ZLIB=$(WVPORTS)/zlib/build/zlib
9 WVSTREAMS=../wv/wvstreams
10 CFLAGS=-g -w \
11         -DUNICODE_SUPPORT -DODBCVER=0x0351 \
12         -I$(WVSTREAMS)/include -I$(XPLC)/include \
13         -I/usr/include/postgresql
14 CXXFLAGS=$(CFLAGS) -I$(BOOST)
15 WVSTREAMS_STATIC=$(WVSTREAMS)/libwvstatic.a
16 LIBS=\
17         $(WVSTREAMS_STATIC) \
18         $(DBUS)/libdbus-1.a \
19         $(OPENSSL)/libssl.a $(OPENSSL)/libcrypto.a \
20         $(ZLIB)/libz.a \
21         $(XPLC)/libxplc-cxx.a $(XPLC)/libxplc.a -ldl \
22         /usr/lib/libodbc.a -lpthread
23 DYNLIBS=\
24         -L$(WVSTREAMS) -lwvstreams -lwvdbus -lodbc
25 LDFLAGS=-g
27 all: wvdbusd.so vxodbc.so vxodbc-test.so test-linker
29 wvdbusd.so: wvdbusd.o $(WVSTREAMS_STATIC)
30         @echo Linking $@...
31         @$(CXX) -shared -o $@ \
32                 $(LDFLAGS) \
33                 $^ \
34                 -Wl,--soname,$@ \
35                 -Wl,-z,defs,--version-script=wvdbusd.link \
36                 $(LIBS)
38 $(OBJS): configure config.h 
40 vxodbc.so: $(OBJS) $(WVSTREAMS_STATIC)
41         @echo Linking $@...
42         @$(CXX) -shared -o $@ \
43                 $(LDFLAGS) \
44                 $^ \
45                 -Wl,--soname,$@ \
46                 -Wl,-z,defs,--version-script=vxodbc.link \
47                 $(LIBS)
49 # Build a dynamically linked version suitable for use by unit tests
50 vxodbc-test.so: $(OBJS)
51         @echo Linking $@...
52         @$(CXX) -shared -o $@ \
53                 $(LDFLAGS) \
54                 $^ \
55                 -Wl,--soname,$@ \
56                 $(DYNLIBS)
58 linker-test: linker-test.o vxodbc.so
59         @echo Linking $@...
60         $(CXX) -o $@ $(LDFLAGS) $^
62 test-linker: linker-test
63         LD_LIBRARY_PATH=. ./linker-test
65 test: vxodbc.so vxodbc-test.so