diff build/Makefile.mingw32 @ 379:28e7aaed3292

Merge
author Chris Cannam
date Fri, 05 Sep 2014 16:13:32 +0100
parents 7284eef3c4ef
children f4e07ae2725a
line wrap: on
line diff
--- a/build/Makefile.mingw32	Fri Sep 05 09:31:00 2014 +0100
+++ b/build/Makefile.mingw32	Fri Sep 05 16:13:32 2014 +0100
@@ -61,7 +61,7 @@
 
 # Tools selection
 #
-TOOLPREFIX     ?= i586-mingw32msvc-
+TOOLPREFIX     ?= i686-w64-mingw32-
 CXX		= $(TOOLPREFIX)g++
 CC		= $(TOOLPREFIX)gcc
 LD		= $(TOOLPREFIX)g++
@@ -70,7 +70,7 @@
 
 # Compile flags
 #
-CXXFLAGS	= -O2 -Wall -I. -I../include
+CXXFLAGS	:= $(CXXFLAGS) -O2 -Wall -fno-exceptions -I. -I../include
 
 # Libraries required for the plugins.
 #
@@ -82,12 +82,16 @@
 
 # Libraries required for the host.
 #
-HOST_LIBS	= ./libvamp-hostsdk.a -L../lib -lsndfile
+HOST_LIBS	= ./libvamp-hostsdk.a -L../lib -lsndfile -lvorbis -logg -lFLAC -lvorbisenc -lws2_32
 
 # Libraries required for the RDF template generator.
 #
 RDFGEN_LIBS	= ./libvamp-hostsdk.a 
 
+# General linker flags
+#
+LDFLAGS		:= $(LDFLAGS) -fno-exceptions -static -static-libgcc
+
 # Flags required to tell the compiler to create a dynamically loadable object
 #
 DYNAMIC_LDFLAGS		= -shared -Wl,-Bsymbolic
@@ -97,7 +101,7 @@
 # also want to tell the linker to make all symbols in the library
 # hidden except for the public entry point (making for a tidier library).
 #
-PLUGIN_LDFLAGS		= $(DYNAMIC_LDFLAGS) -Wl,--version-script=build/vamp-plugin.map
+PLUGIN_LDFLAGS		= $(DYNAMIC_LDFLAGS) -Wl,--retain-symbols-file=build/vamp-plugin.list
 SDK_DYNAMIC_LDFLAGS	= $(DYNAMIC_LDFLAGS)
 HOSTSDK_DYNAMIC_LDFLAGS	= $(DYNAMIC_LDFLAGS)
 
@@ -193,13 +197,13 @@
 		$(HOSTDIR)/vamp-simple-host.o
 
 HOST_TARGET	= \
-		$(HOSTDIR)/vamp-simple-host
+		$(HOSTDIR)/vamp-simple-host.exe
 
 RDFGEN_OBJECTS	= \
 		$(RDFGENDIR)/vamp-rdf-template-generator.o
 
 RDFGEN_TARGET	= \
-		$(RDFGENDIR)/vamp-rdf-template-generator
+		$(RDFGENDIR)/vamp-rdf-template-generator.exe
 
 sdk:		sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
 
@@ -231,13 +235,13 @@
 		$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
 
 $(HOST_TARGET):	$(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
-		$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
+		$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(LDFLAGS) $(HOST_LIBS)
 
 $(RDFGEN_TARGET):	$(RDFGEN_OBJECTS) $(HOSTSDK_STATIC) 
-		$(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(RDFGEN_LIBS)
+		$(CXX) $(LDFLAGS) $(RDFGEN_LDFLAGS) -o $@ $(RDFGEN_OBJECTS) $(LDFLAGS) $(RDFGEN_LIBS)
 
 test:		plugins host
-		VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
+		VAMP_PATH=$(EXAMPLEDIR) wine $(HOST_TARGET) -l
 
 clean:		
 		rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) $(RDFGEN_OBJECTS)