comparison build/Makefile.mingw32 @ 379:28e7aaed3292

Merge
author Chris Cannam
date Fri, 05 Sep 2014 16:13:32 +0100
parents 7284eef3c4ef
children f4e07ae2725a
comparison
equal deleted inserted replaced
378:29a73259f59a 379:28e7aaed3292
59 # 59 #
60 default: all 60 default: all
61 61
62 # Tools selection 62 # Tools selection
63 # 63 #
64 TOOLPREFIX ?= i586-mingw32msvc- 64 TOOLPREFIX ?= i686-w64-mingw32-
65 CXX = $(TOOLPREFIX)g++ 65 CXX = $(TOOLPREFIX)g++
66 CC = $(TOOLPREFIX)gcc 66 CC = $(TOOLPREFIX)gcc
67 LD = $(TOOLPREFIX)g++ 67 LD = $(TOOLPREFIX)g++
68 AR = $(TOOLPREFIX)ar 68 AR = $(TOOLPREFIX)ar
69 RANLIB = $(TOOLPREFIX)ranlib 69 RANLIB = $(TOOLPREFIX)ranlib
70 70
71 # Compile flags 71 # Compile flags
72 # 72 #
73 CXXFLAGS = -O2 -Wall -I. -I../include 73 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -fno-exceptions -I. -I../include
74 74
75 # Libraries required for the plugins. 75 # Libraries required for the plugins.
76 # 76 #
77 PLUGIN_LIBS = ./libvamp-sdk.a 77 PLUGIN_LIBS = ./libvamp-sdk.a
78 78
80 # 80 #
81 PLUGIN_EXT = .dll 81 PLUGIN_EXT = .dll
82 82
83 # Libraries required for the host. 83 # Libraries required for the host.
84 # 84 #
85 HOST_LIBS = ./libvamp-hostsdk.a -L../lib -lsndfile 85 HOST_LIBS = ./libvamp-hostsdk.a -L../lib -lsndfile -lvorbis -logg -lFLAC -lvorbisenc -lws2_32
86 86
87 # Libraries required for the RDF template generator. 87 # Libraries required for the RDF template generator.
88 # 88 #
89 RDFGEN_LIBS = ./libvamp-hostsdk.a 89 RDFGEN_LIBS = ./libvamp-hostsdk.a
90
91 # General linker flags
92 #
93 LDFLAGS := $(LDFLAGS) -fno-exceptions -static -static-libgcc
90 94
91 # Flags required to tell the compiler to create a dynamically loadable object 95 # Flags required to tell the compiler to create a dynamically loadable object
92 # 96 #
93 DYNAMIC_LDFLAGS = -shared -Wl,-Bsymbolic 97 DYNAMIC_LDFLAGS = -shared -Wl,-Bsymbolic
94 98
95 # Flags for building specific plugin and library targets. We need to 99 # Flags for building specific plugin and library targets. We need to
96 # tell the linker the formal name for the library, and for plugins we 100 # tell the linker the formal name for the library, and for plugins we
97 # also want to tell the linker to make all symbols in the library 101 # also want to tell the linker to make all symbols in the library
98 # hidden except for the public entry point (making for a tidier library). 102 # hidden except for the public entry point (making for a tidier library).
99 # 103 #
100 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--version-script=build/vamp-plugin.map 104 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--retain-symbols-file=build/vamp-plugin.list
101 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) 105 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS)
102 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) 106 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS)
103 107
104 108
105 ### End of user-serviceable parts 109 ### End of user-serviceable parts
191 195
192 HOST_OBJECTS = \ 196 HOST_OBJECTS = \
193 $(HOSTDIR)/vamp-simple-host.o 197 $(HOSTDIR)/vamp-simple-host.o
194 198
195 HOST_TARGET = \ 199 HOST_TARGET = \
196 $(HOSTDIR)/vamp-simple-host 200 $(HOSTDIR)/vamp-simple-host.exe
197 201
198 RDFGEN_OBJECTS = \ 202 RDFGEN_OBJECTS = \
199 $(RDFGENDIR)/vamp-rdf-template-generator.o 203 $(RDFGENDIR)/vamp-rdf-template-generator.o
200 204
201 RDFGEN_TARGET = \ 205 RDFGEN_TARGET = \
202 $(RDFGENDIR)/vamp-rdf-template-generator 206 $(RDFGENDIR)/vamp-rdf-template-generator.exe
203 207
204 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC) 208 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
205 209
206 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC) 210 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
207 $(RANLIB) $(SDK_STATIC) 211 $(RANLIB) $(SDK_STATIC)
229 233
230 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS) 234 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
231 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS) 235 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
232 236
233 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS) 237 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
234 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS) 238 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(LDFLAGS) $(HOST_LIBS)
235 239
236 $(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC) 240 $(RDFGEN_TARGET): $(RDFGEN_OBJECTS) $(HOSTSDK_STATIC)
237 $(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS) 241 $(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(LDFLAGS) $(RDFGEN_LIBS)
238 242
239 test: plugins host 243 test: plugins host
240 VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l 244 VAMP_PATH=$(EXAMPLEDIR) wine $(HOST_TARGET) -l
241 245
242 clean: 246 clean:
243 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS) 247 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)
244 248
245 distclean: clean 249 distclean: clean