1 ## Makefile for Vamp aubio plugin using MinGW tools on Windows.
3 ## Edit this to adjust compiler and library settings when
4 ## building using MinGW.
6 ## Note that the list of source files, etc, goes in Makefile.inc
7 ## instead so that it can be included by all platform Makefiles.
9 # Location of Vamp plugin SDK relative to the project directory
10 VAMPSDK_DIR ?= ./contrib/vamp-plugin-sdk-2.6
12 # Location of libvamp-sdk.dll
13 #VAMPBIN_DIR ?= ./contrib/vamp-plugin-sdk-2.6-binaries-win32-mingw
14 VAMPBIN_DIR ?= ./contrib/vamp-plugin-sdk-2.6
16 # Location of cross compiled and installed aubio tree
17 AUBIO_MINGW32_DISTDIR ?= ./contrib/aubio-dist
20 # on debian/ubuntu systems, you will want to install g++-mingw-w64-i686
21 TOOLPREFIX ?= i686-w64-mingw32-
23 CXX = $(TOOLPREFIX)g++
27 RANLIB = $(TOOLPREFIX)ranlib
29 # For a debug build...
30 #CFLAGS := -Wall -Wextra -g
32 # ... or for a release build
33 CFLAGS := -Wall -Wextra -O3 -ftree-vectorize
35 # add AUBIO_MINGW32_DISTDIR to ARCHFLAGS
36 ARCHFLAGS := -I$(AUBIO_MINGW32_DISTDIR)/include
38 # add AUBIO_MINGW32_DISTDIR to PLUGIN_LDFLAGS
41 # Libraries and linker flags required by plugin: add any -l<library>
43 PLUGIN_LDFLAGS += -Wl,--enable-auto-import
44 PLUGIN_LDFLAGS += -fno-exceptions -static -static-libgcc
45 PLUGIN_LDFLAGS += -shared -Wl,-Bsymbolic
46 PLUGIN_LDFLAGS += -Wl,--retain-symbols-file=vamp-plugin.list
47 PLUGIN_LIBS := $(AUBIO_MINGW32_DISTDIR)/lib/libaubio.dll.a $(VAMPBIN_DIR)/libvamp-sdk.a
49 # File extension for plugin library on this platform