comparison build/Makefile.mingw32 @ 296:38c638894360

* More build updates
author cannam
date Tue, 22 Sep 2009 11:38:16 +0000
parents
children 5940dd0a399f
comparison
equal deleted inserted replaced
295:0e08ebd5c13b 296:38c638894360
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 CXX = i586-mingw32msvc-g++
65 LD = i586-mingw32msvc-g++
66 AR = i586-mingw32msvc-ar
67 RANLIB = i586-mingw32msvc-ranlib
68
69 # Compile flags
70 #
71 CXXFLAGS = $(CXXFLAGS) -O2 -Wall -I. -I../include -fpic
72
73 # Libraries required for the plugins.
74 #
75 PLUGIN_LIBS = ./libvamp-sdk.a
76
77 # File extension for a dynamically loadable object
78 #
79 PLUGIN_EXT = .dll
80
81 # Libraries required for the host.
82 #
83 HOST_LIBS = ./libvamp-hostsdk.a -l../lib -lsndfile
84
85 # Libraries required for the RDF template generator.
86 #
87 RDFGEN_LIBS = ./libvamp-hostsdk.a
88
89 # Flags required to tell the compiler to create a dynamically loadable object
90 #
91 DYNAMIC_LDFLAGS = --static-libgcc -shared -Wl,-Bsymbolic
92
93 # Flags for building specific plugin and library targets. We need to
94 # tell the linker the formal name for the library, and for plugins we
95 # also want to tell the linker to make all symbols in the library
96 # hidden except for the public entry point (making for a tidier library).
97 #
98 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--version-script=build/vamp-plugin.map
99 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_SDK_LIBNAME)
100 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,-soname=$(INSTALL_HOSTSDK_LIBNAME)
101
102
103 ### End of user-serviceable parts
104
105
106 API_HEADERS = \
107 $(APIDIR)/vamp.h
108
109 SDK_HEADERS = \
110 $(SDKDIR)/Plugin.h \
111 $(SDKDIR)/PluginAdapter.h \
112 $(SDKDIR)/PluginBase.h \
113 $(SDKDIR)/RealTime.h \
114 $(SDKDIR)/plugguard.h \
115 $(SDKDIR)/vamp-sdk.h
116
117 HOSTSDK_HEADERS = \
118 $(HOSTSDKDIR)/Plugin.h \
119 $(HOSTSDKDIR)/PluginBase.h \
120 $(HOSTSDKDIR)/PluginHostAdapter.h \
121 $(HOSTSDKDIR)/RealTime.h \
122 $(HOSTSDKDIR)/PluginBufferingAdapter.h \
123 $(HOSTSDKDIR)/PluginChannelAdapter.h \
124 $(HOSTSDKDIR)/PluginInputDomainAdapter.h \
125 $(HOSTSDKDIR)/PluginLoader.h \
126 $(HOSTSDKDIR)/PluginSummarisingAdapter.h \
127 $(HOSTSDKDIR)/PluginWrapper.h \
128 $(HOSTSDKDIR)/hostguard.h \
129 $(HOSTSDKDIR)/vamp-hostsdk.h
130
131 SDK_OBJECTS = \
132 $(SDKSRCDIR)/PluginAdapter.o \
133 $(SDKSRCDIR)/RealTime.o
134
135 HOSTSDK_OBJECTS = \
136 $(HOSTSDKSRCDIR)/PluginHostAdapter.o \
137 $(HOSTSDKSRCDIR)/RealTime.o \
138 $(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
139 $(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
140 $(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
141 $(HOSTSDKSRCDIR)/PluginLoader.o \
142 $(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
143 $(HOSTSDKSRCDIR)/PluginWrapper.o
144
145 SDK_STATIC = \
146 ./libvamp-sdk.a
147
148 HOSTSDK_STATIC = \
149 ./libvamp-hostsdk.a
150
151 SDK_DYNAMIC = \
152 ./libvamp-sdk$(PLUGIN_EXT)
153
154 HOSTSDK_DYNAMIC = \
155 ./libvamp-hostsdk$(PLUGIN_EXT)
156
157 SDK_LA = \
158 $(LADIR)/libvamp-sdk.la
159
160 HOSTSDK_LA = \
161 $(LADIR)/libvamp-hostsdk.la
162
163 PLUGIN_HEADERS = \
164 $(EXAMPLEDIR)/SpectralCentroid.h \
165 $(EXAMPLEDIR)/PowerSpectrum.h \
166 $(EXAMPLEDIR)/PercussionOnsetDetector.h \
167 $(EXAMPLEDIR)/FixedTempoEstimator.h \
168 $(EXAMPLEDIR)/AmplitudeFollower.h \
169 $(EXAMPLEDIR)/ZeroCrossing.h
170
171 PLUGIN_OBJECTS = \
172 $(EXAMPLEDIR)/SpectralCentroid.o \
173 $(EXAMPLEDIR)/PowerSpectrum.o \
174 $(EXAMPLEDIR)/PercussionOnsetDetector.o \
175 $(EXAMPLEDIR)/FixedTempoEstimator.o \
176 $(EXAMPLEDIR)/AmplitudeFollower.o \
177 $(EXAMPLEDIR)/ZeroCrossing.o \
178 $(EXAMPLEDIR)/plugins.o
179
180 PLUGIN_TARGET = \
181 $(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
182
183 HOST_HEADERS = \
184 $(HOSTDIR)/system.h
185
186 HOST_OBJECTS = \
187 $(HOSTDIR)/vamp-simple-host.o
188
189 HOST_TARGET = \
190 $(HOSTDIR)/vamp-simple-host
191
192 RDFGEN_OBJECTS = \
193 $(RDFGENDIR)/vamp-rdf-template-generator.o
194
195 RDFGEN_TARGET = \
196 $(RDFGENDIR)/vamp-rdf-template-generator
197
198 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
199
200 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
201 $(RANLIB) $(SDK_STATIC)
202 $(RANLIB) $(HOSTSDK_STATIC)
203
204 plugins: $(PLUGIN_TARGET)
205
206 host: $(HOST_TARGET)
207
208 rdfgen: $(RDFGEN_TARGET)
209
210 all: sdk plugins host rdfgen test
211
212 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
213 $(AR) r $@ $(SDK_OBJECTS)
214
215 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
216 $(AR) r $@ $(HOSTSDK_OBJECTS)
217
218 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
219 $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
220
221 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
222 $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
223
224 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
225 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
226
227 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
228 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
229
230 $(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
231 $(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
232
233 test: plugins host
234 VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
235
236 clean:
237 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
238
239 distclean: clean
240 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
241
242 # DO NOT DELETE
243
244 examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
245 examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
246 examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
247 examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
248 examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
249 examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
250 examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
251 examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
252 examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
253 examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
254 examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
255 examples/SpectralCentroid.o: vamp-sdk/RealTime.h
256 examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
257 examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
258 examples/PowerSpectrum.o: vamp-sdk/RealTime.h
259 examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
260 examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
261 examples/ZeroCrossing.o: vamp-sdk/RealTime.h
262 examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
263 examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
264 examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
265 examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
266 examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
267 examples/plugins.o: examples/FixedTempoEstimator.h
268 examples/plugins.o: examples/AmplitudeFollower.h
269 host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
270 host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
271 host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
272 host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
273 host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
274 host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
275 host/vamp-simple-host.o: vamp-sdk/Plugin.h
276 host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
277 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
278 rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
279 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
280 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
281 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
282 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
283 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
284 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
285 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
286 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
287 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
288 src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
289 src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
290 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
291 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
292 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
293 src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
294 src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
295 src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
296 src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
297 src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
298 src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
299 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
300 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
301 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
302 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
303 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
304 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
305 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
306 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
307 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
308 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
309 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
310 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
311 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
312 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
313 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
314 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
315 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
316 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
317 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
318 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
319 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
320 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
321 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
322 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
323 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
324 src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
325 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
326 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
327 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
328 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
329 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
330 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
331 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
332 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
333 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
334 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
335 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
336 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
337 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
338 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
339 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
340 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
341 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
342 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
343 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
344 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
345 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
346 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
347 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
348 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
349 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
350 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h