comparison build/Makefile.osx @ 291:2e16d99867bd

* Tidying, build, versions, docs updates for release
author cannam
date Tue, 22 Sep 2009 10:02:56 +0000
parents
children 3f14a3891817
comparison
equal deleted inserted replaced
290:c97e70ed5abc 291:2e16d99867bd
1
2 # Makefile for the Vamp plugin SDK. This builds the SDK objects,
3 # libraries, example plugins, and the test host. Please adjust to
4 # suit your operating system requirements.
5 #
6 # This version of the Makefile is approximately correct for OS/X.
7 # Note that it has no "install" target; the following are the
8 # library and related files that may be of interest resulting from
9 # the build:
10 #
11 # src/libvamp-sdk.dylib [SDK dynamic library for plugins]
12 # src/libvamp-hostsdk.dylib [SDK dynamic library for hosts]
13 #
14 # src/libvamp-sdk.a [SDK static library for plugins]
15 # src/libvamp-hostsdk.a [SDK static library for hosts]
16 #
17 # examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir]
18 # examples/vamp-example-plugins.dylib [copy this to your Vamp plugin dir]
19 #
20 # host/vamp-simple-host [requires libsndfile to build]
21 #
22 # rdf/generator/vamp-rdf-template-generator
23
24 # Makefile for the Vamp plugin SDK. This builds the SDK objects,
25 # libraries, example plugins, and the test host. Please adjust to
26 # suit your operating system requirements.
27
28 APIDIR = vamp
29
30 SDKDIR = vamp-sdk
31 HOSTSDKDIR = vamp-hostsdk
32
33 SRCDIR = src
34 SDKSRCDIR = src/vamp-sdk
35 HOSTSDKSRCDIR = src/vamp-hostsdk
36
37 EXAMPLEDIR = examples
38 HOSTDIR = host
39 PCDIR = pkgconfig
40 LADIR = build
41 RDFGENDIR = rdf/generator
42
43 ###
44 ### Start of user-serviceable parts
45 ###
46
47 # Default build target (or use "make <target>" to select one).
48 # Targets are:
49 # all -- build everything
50 # sdk -- build all the Vamp SDK libraries for plugins and hosts
51 # sdkstatic -- build only the static versions of the SDK libraries
52 # plugins -- build the example plugins (and the SDK if required)
53 # host -- build the simple Vamp plugin host (and the SDK if required)
54 # rdfgen -- build the RDF template generator (and the SDK if required)
55 # test -- build the host and example plugins, and run a quick test
56 # clean -- remove binary targets
57 # distclean -- remove all targets
58 #
59 default: all
60
61 # Compile flags
62 #
63 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I. -fPIC
64
65 # ar, ranlib
66 #
67 AR := ar
68 RANLIB := ranlib
69
70 # Libraries required for the plugins.
71 #
72 PLUGIN_LIBS = ./libvamp-sdk.a
73
74 # File extension for a dynamically loadable object
75 #
76 PLUGIN_EXT = .dylib
77
78 # Libraries required for the host.
79 #
80 HOST_LIBS = ./libvamp-hostsdk.a -lsndfile -ldl
81
82 # Libraries required for the RDF template generator.
83 #
84 RDFGEN_LIBS = ./libvamp-hostsdk.a -ldl
85
86 # Flags required to tell the compiler to create a dynamically loadable object
87 #
88 DYNAMIC_LDFLAGS = -dynamiclib
89 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name vamp-example-plugins.dylib
90 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
91 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
92
93 # Additional flags for making a plugin. This tells the linker to make
94 # all symbols in the library hidden except for the public entry point.
95 # It's not essential, but makes a tidier library.
96 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name vamp-example-plugins.dylib -exported_symbols_list build/vamp-plugin.list
97
98
99 ### End of user-serviceable parts
100
101
102 API_HEADERS = \
103 $(APIDIR)/vamp.h
104
105 SDK_HEADERS = \
106 $(SDKDIR)/Plugin.h \
107 $(SDKDIR)/PluginAdapter.h \
108 $(SDKDIR)/PluginBase.h \
109 $(SDKDIR)/RealTime.h \
110 $(SDKDIR)/plugguard.h \
111 $(SDKDIR)/vamp-sdk.h
112
113 HOSTSDK_HEADERS = \
114 $(HOSTSDKDIR)/Plugin.h \
115 $(HOSTSDKDIR)/PluginBase.h \
116 $(HOSTSDKDIR)/PluginHostAdapter.h \
117 $(HOSTSDKDIR)/RealTime.h \
118 $(HOSTSDKDIR)/PluginBufferingAdapter.h \
119 $(HOSTSDKDIR)/PluginChannelAdapter.h \
120 $(HOSTSDKDIR)/PluginInputDomainAdapter.h \
121 $(HOSTSDKDIR)/PluginLoader.h \
122 $(HOSTSDKDIR)/PluginSummarisingAdapter.h \
123 $(HOSTSDKDIR)/PluginWrapper.h \
124 $(HOSTSDKDIR)/hostguard.h \
125 $(HOSTSDKDIR)/vamp-hostsdk.h
126
127 SDK_OBJECTS = \
128 $(SDKSRCDIR)/PluginAdapter.o \
129 $(SDKSRCDIR)/RealTime.o
130
131 HOSTSDK_OBJECTS = \
132 $(HOSTSDKSRCDIR)/PluginHostAdapter.o \
133 $(HOSTSDKSRCDIR)/RealTime.o \
134 $(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
135 $(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
136 $(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
137 $(HOSTSDKSRCDIR)/PluginLoader.o \
138 $(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
139 $(HOSTSDKSRCDIR)/PluginWrapper.o
140
141 SDK_STATIC = \
142 ./libvamp-sdk.a
143
144 HOSTSDK_STATIC = \
145 ./libvamp-hostsdk.a
146
147 SDK_DYNAMIC = \
148 ./libvamp-sdk$(PLUGIN_EXT)
149
150 HOSTSDK_DYNAMIC = \
151 ./libvamp-hostsdk$(PLUGIN_EXT)
152
153 SDK_LA = \
154 $(LADIR)/libvamp-sdk.la
155
156 HOSTSDK_LA = \
157 $(LADIR)/libvamp-hostsdk.la
158
159 PLUGIN_HEADERS = \
160 $(EXAMPLEDIR)/SpectralCentroid.h \
161 $(EXAMPLEDIR)/PowerSpectrum.h \
162 $(EXAMPLEDIR)/PercussionOnsetDetector.h \
163 $(EXAMPLEDIR)/FixedTempoEstimator.h \
164 $(EXAMPLEDIR)/AmplitudeFollower.h \
165 $(EXAMPLEDIR)/ZeroCrossing.h
166
167 PLUGIN_OBJECTS = \
168 $(EXAMPLEDIR)/SpectralCentroid.o \
169 $(EXAMPLEDIR)/PowerSpectrum.o \
170 $(EXAMPLEDIR)/PercussionOnsetDetector.o \
171 $(EXAMPLEDIR)/FixedTempoEstimator.o \
172 $(EXAMPLEDIR)/AmplitudeFollower.o \
173 $(EXAMPLEDIR)/ZeroCrossing.o \
174 $(EXAMPLEDIR)/plugins.o
175
176 PLUGIN_TARGET = \
177 $(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
178
179 HOST_HEADERS = \
180 $(HOSTDIR)/system.h
181
182 HOST_OBJECTS = \
183 $(HOSTDIR)/vamp-simple-host.o
184
185 HOST_TARGET = \
186 $(HOSTDIR)/vamp-simple-host
187
188 RDFGEN_OBJECTS = \
189 $(RDFGENDIR)/vamp-rdf-template-generator.o
190
191 RDFGEN_TARGET = \
192 $(RDFGENDIR)/vamp-rdf-template-generator
193
194 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
195
196 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
197 $(RANLIB) $(SDK_STATIC)
198 $(RANLIB) $(HOSTSDK_STATIC)
199
200 plugins: $(PLUGIN_TARGET)
201
202 host: $(HOST_TARGET)
203
204 rdfgen: $(RDFGEN_TARGET)
205
206 all: sdk plugins host rdfgen test
207
208 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
209 $(AR) r $@ $(SDK_OBJECTS)
210
211 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
212 $(AR) r $@ $(HOSTSDK_OBJECTS)
213
214 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
215 $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
216
217 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
218 $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
219
220 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
221 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
222
223 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
224 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
225
226 $(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
227 $(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
228
229 test: plugins host
230 VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
231
232 clean:
233 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
234
235 distclean: clean
236 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
237
238 # DO NOT DELETE
239
240 examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
241 examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
242 examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
243 examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
244 examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
245 examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
246 examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
247 examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
248 examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
249 examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
250 examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
251 examples/SpectralCentroid.o: vamp-sdk/RealTime.h
252 examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
253 examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
254 examples/PowerSpectrum.o: vamp-sdk/RealTime.h
255 examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
256 examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
257 examples/ZeroCrossing.o: vamp-sdk/RealTime.h
258 examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
259 examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
260 examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
261 examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
262 examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
263 examples/plugins.o: examples/FixedTempoEstimator.h
264 examples/plugins.o: examples/AmplitudeFollower.h
265 host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
266 host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
267 host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
268 host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
269 host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
270 host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
271 host/vamp-simple-host.o: vamp-sdk/Plugin.h
272 host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
273 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
274 rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
275 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
276 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
277 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
278 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
279 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
280 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
281 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
282 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
283 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
284 src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
285 src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
286 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
287 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
288 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
289 src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
290 src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
291 src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
292 src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
293 src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
294 src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
295 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
296 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
297 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
298 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
299 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
300 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
301 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
302 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
303 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
304 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
305 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
306 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
307 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
308 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
309 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
310 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
311 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
312 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
313 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
314 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
315 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
316 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
317 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
318 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
319 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
320 src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
321 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
322 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
323 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
324 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
325 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
326 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
327 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
328 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
329 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
330 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
331 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
332 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
333 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
334 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
335 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
336 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
337 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
338 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
339 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
340 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
341 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
342 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
343 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
344 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
345 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
346 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h