Merge commit 'origin/master'
[versaplex.git] / vxodbc / Makefile-linux
blob1a8be18876d6ae359cc465484ec87054e14a01b1
1 LIBS=\
2         $(DBUS)/libdbus-1.a \
3         $(OPENSSL)/libssl.a $(OPENSSL)/libcrypto.a \
4         $(ZLIB)/libz.a -ldl \
5         /usr/lib/libodbc.a -lpthread
6 LDFLAGS=-g
8 all: wvdbusd.so vxodbc.so vxodbc-test.so test-linker
10 wvdbusd.so: wvdbusd.o $(LIBWVSTATIC)
11         @echo Linking $@...
12         @$(CXX) -shared -o $@ \
13                 $(LDFLAGS) \
14                 $^ \
15                 -Wl,--soname,$@ \
16                 -Wl,-z,defs,--version-script=wvdbusd.link \
17                 $(LIBS)
19 $(OBJS): configure config.h 
21 vxodbc.so: $(OBJS) $(LIBWVSTATIC)
22         @echo Linking $@...
23         @$(CXX) -shared -o $@ \
24                 $(LDFLAGS) \
25                 $^ \
26                 -Wl,--soname,$@ \
27                 -Wl,-z,defs,--version-script=vxodbc.link \
28                 $(LIBS)
30 # Build a dynamically linked version suitable for use by unit tests
31 vxodbc-test.so: $(OBJS)
32         @echo Linking $@...
33         @$(CXX) -shared -o $@ \
34                 $(LDFLAGS) \
35                 $^ \
36                 -Wl,--soname,$@ \
37                 $(DYNLIBS)
39 linker-test: linker-test.o vxodbc.so
40         @echo Linking $@...
41         $(CXX) -o $@ $(LDFLAGS) $^
43 test-linker: linker-test
44         LD_LIBRARY_PATH=. ./linker-test
46 test: vxodbc.so vxodbc-test.so