comparison build/Makefile.emscripten @ 443:d3f676c07359 vampipe

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