comparison Makefile @ 81:e4826d5365b8

* use correct (?) sonames for libraries (oops)
author cannam
date Tue, 18 Sep 2007 14:57:08 +0000
parents e33fa45f0935
children c8b48bc6db3d
comparison
equal deleted inserted replaced
80:e33fa45f0935 81:e4826d5365b8
25 # 25 #
26 default: all 26 default: all
27 27
28 # Compile flags 28 # Compile flags
29 # 29 #
30 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I. 30 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I. -fpic
31 31
32 # Libraries required for the plugins. 32 # Libraries required for the plugins.
33 # (Note that it is desirable to statically link libstdc++ if possible, 33 # (Note that it is desirable to statically link libstdc++ if possible,
34 # because our plugin exposes only a C API so there are no boundary 34 # because our plugin exposes only a C API so there are no boundary
35 # compatibility problems.) 35 # compatibility problems.)
36 # 36 #
37 PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a 37 PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a
38 #PLUGIN_LIBS = vamp-sdk/libvamp-sdk.a $(shell g++ -print-file-name=libstdc++.a) 38 #PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a $(shell g++ -print-file-name=libstdc++.a)
39
40 # Flags required to tell the compiler to link to a dynamically loadable object
41 #
42 PLUGIN_LDFLAGS = -shared -Wl,-Bsymbolic -static-libgcc
43 39
44 # File extension for a dynamically loadable object 40 # File extension for a dynamically loadable object
45 # 41 #
46 PLUGIN_EXT = .so 42 PLUGIN_EXT = .so
47
48 ## For OS/X with g++:
49 #PLUGIN_LDFLAGS = -dynamiclib
50 #PLUGIN_EXT = .dylib 43 #PLUGIN_EXT = .dylib
51 44
52 # Libraries required for the host. 45 # Libraries required for the host.
53 # 46 #
54 HOST_LIBS = $(SDKDIR)/libvamp-hostsdk.a -lsndfile -ldl 47 HOST_LIBS = $(SDKDIR)/libvamp-hostsdk.a -lsndfile -ldl
61 INSTALL_API_HEADERS := $(INSTALL_PREFIX)/include/vamp 54 INSTALL_API_HEADERS := $(INSTALL_PREFIX)/include/vamp
62 INSTALL_SDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk 55 INSTALL_SDK_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk
63 INSTALL_HOSTEXT_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk/hostext 56 INSTALL_HOSTEXT_HEADERS := $(INSTALL_PREFIX)/include/vamp-sdk/hostext
64 INSTALL_SDK_LIBS := $(INSTALL_PREFIX)/lib 57 INSTALL_SDK_LIBS := $(INSTALL_PREFIX)/lib
65 58
66 INSTALL_SDK_LIBNAME := libvamp-sdk.so.1.0.0 59 INSTALL_SDK_LIBNAME := libvamp-sdk.so.1.1.0
67 INSTALL_SDK_LINK_ABI := libvamp-sdk.so.1 60 INSTALL_SDK_LINK_ABI := libvamp-sdk.so.1
68 INSTALL_SDK_LINK_DEV := libvamp-sdk.so 61 INSTALL_SDK_LINK_DEV := libvamp-sdk.so
69 INSTALL_SDK_STATIC := libvamp-sdk.a 62 INSTALL_SDK_STATIC := libvamp-sdk.a
70 INSTALL_SDK_LA := libvamp-sdk.la 63 INSTALL_SDK_LA := libvamp-sdk.la
71 64
72 INSTALL_HOSTSDK_LIBNAME := libvamp-hostsdk.so.1.0.0 65 INSTALL_HOSTSDK_LIBNAME := libvamp-hostsdk.so.2.0.0
73 INSTALL_HOSTSDK_LINK_ABI := libvamp-hostsdk.so.1 66 INSTALL_HOSTSDK_LINK_ABI := libvamp-hostsdk.so.2
74 INSTALL_HOSTSDK_LINK_DEV := libvamp-hostsdk.so 67 INSTALL_HOSTSDK_LINK_DEV := libvamp-hostsdk.so
75 INSTALL_HOSTSDK_STATIC := libvamp-hostsdk.a 68 INSTALL_HOSTSDK_STATIC := libvamp-hostsdk.a
76 INSTALL_HOSTSDK_LA := libvamp-hostsdk.la 69 INSTALL_HOSTSDK_LA := libvamp-hostsdk.la
77 70
78 INSTALL_PKGCONFIG := $(INSTALL_PREFIX)/lib/pkgconfig 71 INSTALL_PKGCONFIG := $(INSTALL_PREFIX)/lib/pkgconfig
72
73 # Flags required to tell the compiler to create a dynamically loadable object
74 #
75 DYNAMIC_LDFLAGS = -shared -Wl,-Bsymbolic
76 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS)
77 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LIBNAME)
78 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LIBNAME)
79
80 ## For OS/X with g++:
81 #PLUGIN_LDFLAGS = -dynamiclib
82
79 83
80 ### End of user-serviceable parts 84 ### End of user-serviceable parts
81 85
82 86
83 API_HEADERS = \ 87 API_HEADERS = \
166 170
167 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS) 171 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS)
168 $(AR) r $@ $(HOSTSDK_OBJECTS) 172 $(AR) r $@ $(HOSTSDK_OBJECTS)
169 173
170 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS) 174 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
171 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(SDK_OBJECTS) 175 $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
172 176
173 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS) 177 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS)
174 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS) 178 $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
175 179
176 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS) 180 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
177 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS) 181 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
178 182
179 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS) 183 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)