comparison build/Makefile.mingw64 @ 373:2056dfdd42c6

Toward win64 build eventually
author Chris Cannam
date Wed, 06 Aug 2014 16:30:34 +0100
parents
children f4e07ae2725a
comparison
equal deleted inserted replaced
371:490e5d01766c 373:2056dfdd42c6
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 ?= x86_64-w64-mingw32-
65 CXX = $(TOOLPREFIX)g++
66 CC = $(TOOLPREFIX)gcc
67 LD = $(TOOLPREFIX)g++
68 AR = $(TOOLPREFIX)ar
69 RANLIB = $(TOOLPREFIX)ranlib
70
71 # Compile flags
72 #
73 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -fno-exceptions -I. -I../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../lib -lsndfile -lvorbis -logg -lFLAC -lvorbisenc -lws2_32
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) -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,--version-script=build/vamp-plugin.map
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)/vamp-hostsdk.h
137
138 SDK_OBJECTS = \
139 $(SDKSRCDIR)/PluginAdapter.o \
140 $(SDKSRCDIR)/RealTime.o \
141 $(SDKSRCDIR)/FFT.o \
142 $(SDKSRCDIR)/acsymbols.o
143
144 HOSTSDK_OBJECTS = \
145 $(HOSTSDKSRCDIR)/PluginHostAdapter.o \
146 $(HOSTSDKSRCDIR)/RealTime.o \
147 $(HOSTSDKSRCDIR)/PluginBufferingAdapter.o \
148 $(HOSTSDKSRCDIR)/PluginChannelAdapter.o \
149 $(HOSTSDKSRCDIR)/PluginInputDomainAdapter.o \
150 $(HOSTSDKSRCDIR)/PluginLoader.o \
151 $(HOSTSDKSRCDIR)/PluginSummarisingAdapter.o \
152 $(HOSTSDKSRCDIR)/PluginWrapper.o \
153 $(HOSTSDKSRCDIR)/acsymbols.o
154
155 SDK_STATIC = \
156 ./libvamp-sdk.a
157
158 HOSTSDK_STATIC = \
159 ./libvamp-hostsdk.a
160
161 SDK_DYNAMIC = \
162 ./libvamp-sdk$(PLUGIN_EXT)
163
164 HOSTSDK_DYNAMIC = \
165 ./libvamp-hostsdk$(PLUGIN_EXT)
166
167 SDK_LA = \
168 $(LADIR)/libvamp-sdk.la
169
170 HOSTSDK_LA = \
171 $(LADIR)/libvamp-hostsdk.la
172
173 PLUGIN_HEADERS = \
174 $(EXAMPLEDIR)/SpectralCentroid.h \
175 $(EXAMPLEDIR)/PowerSpectrum.h \
176 $(EXAMPLEDIR)/PercussionOnsetDetector.h \
177 $(EXAMPLEDIR)/FixedTempoEstimator.h \
178 $(EXAMPLEDIR)/AmplitudeFollower.h \
179 $(EXAMPLEDIR)/ZeroCrossing.h
180
181 PLUGIN_OBJECTS = \
182 $(EXAMPLEDIR)/SpectralCentroid.o \
183 $(EXAMPLEDIR)/PowerSpectrum.o \
184 $(EXAMPLEDIR)/PercussionOnsetDetector.o \
185 $(EXAMPLEDIR)/FixedTempoEstimator.o \
186 $(EXAMPLEDIR)/AmplitudeFollower.o \
187 $(EXAMPLEDIR)/ZeroCrossing.o \
188 $(EXAMPLEDIR)/plugins.o
189
190 PLUGIN_TARGET = \
191 $(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
192
193 HOST_HEADERS = \
194 $(HOSTDIR)/system.h
195
196 HOST_OBJECTS = \
197 $(HOSTDIR)/vamp-simple-host.o
198
199 HOST_TARGET = \
200 $(HOSTDIR)/vamp-simple-host.exe
201
202 RDFGEN_OBJECTS = \
203 $(RDFGENDIR)/vamp-rdf-template-generator.o
204
205 RDFGEN_TARGET = \
206 $(RDFGENDIR)/vamp-rdf-template-generator.exe
207
208 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
209
210 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
211 $(RANLIB) $(SDK_STATIC)
212 $(RANLIB) $(HOSTSDK_STATIC)
213
214 plugins: $(PLUGIN_TARGET)
215
216 host: $(HOST_TARGET)
217
218 rdfgen: $(RDFGEN_TARGET)
219
220 all: sdk plugins host rdfgen test
221
222 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
223 $(AR) r $@ $(SDK_OBJECTS)
224
225 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
226 $(AR) r $@ $(HOSTSDK_OBJECTS)
227
228 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
229 $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
230
231 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
232 $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
233
234 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
235 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
236
237 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
238 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(LDFLAGS) $(HOST_LIBS)
239
240 $(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
241 $(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(LDFLAGS) $(RDFGEN_LIBS)
242
243 test: plugins host
244 VAMP_PATH=$(EXAMPLEDIR) wine $(HOST_TARGET) -l
245
246 clean:
247 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
248
249 distclean: clean
250 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) $(RDFGEN_TARGET) *~ */*~
251
252 # DO NOT DELETE
253
254 examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
255 examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
256 examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
257 examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
258 examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
259 examples/FixedTempoEstimator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
260 examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
261 examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
262 examples/PercussionOnsetDetector.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
263 examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
264 examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
265 examples/SpectralCentroid.o: vamp-sdk/RealTime.h
266 examples/PowerSpectrum.o: examples/PowerSpectrum.h vamp-sdk/Plugin.h
267 examples/PowerSpectrum.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
268 examples/PowerSpectrum.o: vamp-sdk/RealTime.h
269 examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
270 examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
271 examples/ZeroCrossing.o: vamp-sdk/RealTime.h
272 examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
273 examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/plugguard.h
274 examples/plugins.o: vamp-sdk/RealTime.h examples/ZeroCrossing.h
275 examples/plugins.o: vamp-sdk/Plugin.h examples/SpectralCentroid.h
276 examples/plugins.o: examples/PercussionOnsetDetector.h examples/PowerSpectrum.h
277 examples/plugins.o: examples/FixedTempoEstimator.h
278 examples/plugins.o: examples/AmplitudeFollower.h
279 host/vamp-simple-host.o: ./vamp-hostsdk/PluginHostAdapter.h vamp/vamp.h
280 host/vamp-simple-host.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
281 host/vamp-simple-host.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
282 host/vamp-simple-host.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
283 host/vamp-simple-host.o: ./vamp-hostsdk/PluginWrapper.h
284 host/vamp-simple-host.o: ./vamp-hostsdk/Plugin.h ./vamp-hostsdk/hostguard.h
285 host/vamp-simple-host.o: vamp-sdk/Plugin.h
286 host/vamp-simple-host.o: ./vamp-hostsdk/PluginLoader.h host/system.h
287 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginHostAdapter.h
288 rdf/generator/vamp-rdf-template-generator.o: vamp/vamp.h vamp-sdk/Plugin.h
289 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/PluginBase.h
290 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
291 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginChannelAdapter.h
292 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginWrapper.h
293 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/Plugin.h
294 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/hostguard.h
295 rdf/generator/vamp-rdf-template-generator.o: vamp-sdk/Plugin.h
296 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
297 rdf/generator/vamp-rdf-template-generator.o: ./vamp-hostsdk/PluginLoader.h
298 src/vamp-hostsdk/PluginHostAdapter.o: ./vamp-hostsdk/PluginHostAdapter.h
299 src/vamp-hostsdk/PluginHostAdapter.o: vamp/vamp.h vamp-sdk/Plugin.h
300 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/PluginBase.h
301 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/plugguard.h
302 src/vamp-hostsdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
303 src/vamp-hostsdk/RealTime.o: src/vamp-sdk/RealTime.cpp ./vamp-sdk/RealTime.h
304 src/vamp-hostsdk/RealTime.o: vamp-sdk/plugguard.h
305 src/vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
306 src/vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
307 src/vamp-sdk/PluginAdapter.o: vamp-sdk/plugguard.h vamp-sdk/RealTime.h
308 src/vamp-sdk/RealTime.o: ./vamp-sdk/RealTime.h vamp-sdk/plugguard.h
309 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginBufferingAdapter.h
310 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
311 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/Plugin.h
312 src/vamp-hostsdk/PluginBufferingAdapter.o: ./vamp-hostsdk/hostguard.h
313 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
314 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
315 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/plugguard.h
316 src/vamp-hostsdk/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
317 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginChannelAdapter.h
318 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/PluginWrapper.h
319 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/Plugin.h
320 src/vamp-hostsdk/PluginChannelAdapter.o: ./vamp-hostsdk/hostguard.h
321 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/Plugin.h
322 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
323 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/plugguard.h
324 src/vamp-hostsdk/PluginChannelAdapter.o: vamp-sdk/RealTime.h
325 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
326 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/PluginWrapper.h
327 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/Plugin.h
328 src/vamp-hostsdk/PluginInputDomainAdapter.o: ./vamp-hostsdk/hostguard.h
329 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
330 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
331 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/plugguard.h
332 src/vamp-hostsdk/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
333 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginHostAdapter.h
334 src/vamp-hostsdk/PluginLoader.o: vamp/vamp.h vamp-sdk/Plugin.h
335 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/PluginBase.h
336 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/plugguard.h
337 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/RealTime.h
338 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginLoader.h
339 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginWrapper.h
340 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/Plugin.h
341 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/hostguard.h
342 src/vamp-hostsdk/PluginLoader.o: vamp-sdk/Plugin.h
343 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginInputDomainAdapter.h
344 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginChannelAdapter.h
345 src/vamp-hostsdk/PluginLoader.o: ./vamp-hostsdk/PluginBufferingAdapter.h
346 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginSummarisingAdapter.h
347 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/PluginWrapper.h
348 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/Plugin.h
349 src/vamp-hostsdk/PluginSummarisingAdapter.o: ./vamp-hostsdk/hostguard.h
350 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/Plugin.h
351 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/PluginBase.h
352 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/plugguard.h
353 src/vamp-hostsdk/PluginSummarisingAdapter.o: vamp-sdk/RealTime.h
354 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/PluginWrapper.h
355 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/Plugin.h
356 src/vamp-hostsdk/PluginWrapper.o: ./vamp-hostsdk/hostguard.h
357 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/Plugin.h
358 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/PluginBase.h
359 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/plugguard.h
360 src/vamp-hostsdk/PluginWrapper.o: vamp-sdk/RealTime.h