-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.osx
64 lines (50 loc) · 2.29 KB
/
Makefile.osx
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
59
60
61
62
63
64
## 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.)
# VAMP PLUGINS REQUIRE THE LIBNSDFILE LIBRARY
# UA-PLUGINS REQUIRE THE BOOST AND FFTW3 LIBRARIES
# 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
PLUGIN_LIBS = /opt/local/lib/libfftw3.a
# Edit this to the location of the Vamp plugin SDK, relative to your
# project directory
#
VAMP_SDK_DIR := ../vamp-plugin-sdk-2.6
VAMP_BINARY_DIR:=../vamp-plugin-sdk-2.6-binaries-osx
SRC_DIR :=./src
## OS/X binary compilation. Requires fftw3: sudo port install fftw-3
CXX:=g++
CXXFLAGS:= -O3 -Wall -I$(VAMP_SDK_DIR) -I$(SRC_DIR) -fPIC -arch x86_64
PLUGIN_EXT := .dylib
LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_BINARY_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
## 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)