-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.mingw
58 lines (46 loc) · 2.18 KB
/
Makefile.mingw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## Skeleton Makefile for Vamp plugin builds using command-line tools.
## This requires GNU make, which is what you get with OS/X, Linux, or
## MinGW/Cygwin on Windows.
##
## Rename this to Makefile, and edit as appropriate.
## This Makefile WILL NOT WORK until you have edited it as described
## below -- the Makefile as supplied does nothing useful at all!
##
## Various sets of options are provided, commented out -- just uncomment
## (remove the '#' characters for) the set that most closely resembles
## your own situation, and adjust to taste. Then run "gmake".
##
## (For Windows builds using MS Visual Studio, start instead with the
## VampExamplePlugins project found in the build directory of the SDK.)
# Edit this to the base name of your plugin library
#
PLUGIN_LIBRARY_NAME := ua-vamp-plugins
# Edit this to list the .cpp or .c files in your plugin project
#
PLUGIN_SOURCES := onsetsUA.cpp mf0UA.cpp plugins.cpp
# Edit this to list the .h files in your plugin project
#
PLUGIN_HEADERS := onsetsUA.h mf0UA.h
# Libraries required for the plugins. fftw can be linked as static or dynamic library
PLUGIN_LIBS = -lfftw3-3
# Edit this to the location of the Vamp plugin SDK compiled for MinGW, FFTW and BOOST
VAMP_SDK_DIR :=../vamp-plugin-sdk-2.6-mingw
SRC_DIR :=./src
FFTW_DIR:=../fftw-3.3.4-dll64 # downloaded from http://www.fftw.org/install/windows.html -> ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip
BOOST_DIR:=../boostpath
## MinGW compilation using Linux as the base platform
CXX := x86_64-w64-mingw32-g++
CXXFLAGS := -O2 -I$(VAMP_SDK_DIR) -I$(SRC_DIR) -I$(FFTW_DIR) -I$(BOOST_DIR) -Wall
PLUGIN_EXT := .dll
LDFLAGS := -shared $(VAMP_SDK_DIR)/libvamp-sdk.a -L$(FFTW_DIR)
## All of the above
PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o) $(SRC_DIR)/myfft.o $(SRC_DIR)/bands.o $(SRC_DIR)/onsetdetection.o $(SRC_DIR)/combination.o $(SRC_DIR)/spectralpattern.o $(SRC_DIR)/peaksatt.o $(SRC_DIR)/graph.o $(SRC_DIR)/mf0.o
PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
$(CXX) -o $@ $^ $(LDFLAGS) $(PLUGIN_LIBS)
$(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
clean:
rm -f *.o
rm -f $(SRC_DIR)/*.o
rm -f *~
rm -f $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT)