adamstark@61
|
1
|
adamstark@61
|
2 ## Skeleton Makefile for Vamp plugin builds using command-line tools.
|
adamstark@61
|
3 ## This requires GNU make, which is what you get with OS/X, Linux, or
|
adamstark@61
|
4 ## MinGW/Cygwin on Windows.
|
adamstark@61
|
5 ##
|
adamstark@61
|
6 ## Rename this to Makefile, and edit as appropriate.
|
adamstark@61
|
7 ## This Makefile WILL NOT WORK until you have edited it as described
|
adamstark@61
|
8 ## below -- the Makefile as supplied does nothing useful at all!
|
adamstark@61
|
9 ##
|
adamstark@61
|
10 ## Various sets of options are provided, commented out -- just uncomment
|
adamstark@61
|
11 ## (remove the '#' characters for) the set that most closely resembles
|
adamstark@61
|
12 ## your own situation, and adjust to taste. Then run "gmake".
|
adamstark@61
|
13 ##
|
adamstark@61
|
14 ## (For Windows builds using MS Visual Studio, start instead with the
|
adamstark@61
|
15 ## VampExamplePlugins project found in the build directory of the SDK.)
|
adamstark@61
|
16
|
adamstark@61
|
17
|
adamstark@61
|
18 # Edit this to the base name of your plugin library
|
adamstark@61
|
19 #
|
adamstark@62
|
20 PLUGIN_LIBRARY_NAME := btrack
|
adamstark@61
|
21
|
adamstark@61
|
22 # Edit this to list the .cpp or .c files in your plugin project
|
adamstark@61
|
23 #
|
adamstark@94
|
24 PLUGIN_SOURCES := BTrackVamp.cpp plugins.cpp ../../src/BTrack.cpp ../../src/OnsetDetectionFunction.cpp
|
adamstark@61
|
25
|
adamstark@61
|
26 # Edit this to list the .h files in your plugin project
|
adamstark@61
|
27 #
|
adamstark@94
|
28 PLUGIN_HEADERS := BTrackVamp.h ../../src/BTrack.h ../../src/OnsetDetectionFunction.h ../../src/CircularBuffer.h
|
adamstark@61
|
29 # Edit this to the location of the Vamp plugin SDK, relative to your
|
adamstark@61
|
30 # project directory
|
adamstark@61
|
31 #
|
adamstark@61
|
32 VAMP_SDK_DIR := /usr/local/lib/vamp-sdk
|
adamstark@61
|
33
|
adamstark@61
|
34 ## Uncomment these for an OS/X universal binary (32- and 64-bit Intel)
|
adamstark@61
|
35 ## supporting 10.5 or newer. Use this if you have OS/X 10.7 with the
|
adamstark@61
|
36 ## Xcode 4 command-line tools.
|
adamstark@61
|
37
|
adamstark@61
|
38 CXX := g++
|
adamstark@61
|
39
|
adamstark@61
|
40 ## commented this out while I don't have both 32 and 64 bit versions of the libraries
|
adamstark@94
|
41 #CXXFLAGS := -mmacosx-version-min=10.11 -arch i386 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@94
|
42 CXXFLAGS := -mmacosx-version-min=10.11 -arch x86_64 -I$(VAMP_SDK_DIR) -I/usr/local/include -DUSE_FFTW -Wall -fPIC
|
adamstark@61
|
43 PLUGIN_EXT := .dylib
|
adamstark@94
|
44 LDFLAGS := $(CXXFLAGS) -dynamiclib -L/usr/local/lib -lsamplerate -lfftw3 -lstdc++ -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
45
|
adamstark@61
|
46
|
adamstark@61
|
47 ## Uncomment these for an OS/X universal binary (PPC and 32- and
|
adamstark@61
|
48 ## 64-bit Intel) supporting 10.5 or newer. Use this if you have OS/X
|
adamstark@61
|
49 ## 10.6 with the Xcode 3 command-line tools.
|
adamstark@61
|
50
|
adamstark@61
|
51 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
52 # PLUGIN_EXT := .dylib
|
adamstark@61
|
53 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
54
|
adamstark@61
|
55
|
adamstark@61
|
56 ## Uncomment these for an OS/X universal binary (PPC and 32- and
|
adamstark@61
|
57 ## 64-bit Intel) supporting 10.4 or newer. Use this if you have OS/X
|
adamstark@61
|
58 ## 10.4, 10.5 or 10.6 and you have the 10.4 SDK installed.
|
adamstark@61
|
59
|
adamstark@61
|
60 # CXX := g++-4.0
|
adamstark@61
|
61 # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
62 # PLUGIN_EXT := .dylib
|
adamstark@61
|
63 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
64
|
adamstark@61
|
65
|
adamstark@61
|
66 ## Uncomment these for Linux using the standard tools:
|
adamstark@61
|
67
|
adamstark@61
|
68 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
69 # PLUGIN_EXT := .so
|
adamstark@61
|
70 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map
|
adamstark@61
|
71
|
adamstark@61
|
72
|
adamstark@61
|
73 ## Uncomment these for a cross-compile from Linux to Windows using MinGW:
|
adamstark@61
|
74
|
adamstark@61
|
75 # CXX := i586-mingw32msvc-g++
|
adamstark@61
|
76 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall
|
adamstark@61
|
77 # PLUGIN_EXT := .dll
|
adamstark@61
|
78 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a
|
adamstark@61
|
79
|
adamstark@61
|
80
|
adamstark@61
|
81 ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make:
|
adamstark@61
|
82
|
adamstark@61
|
83 # CXX := CC
|
adamstark@61
|
84 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC
|
adamstark@61
|
85 # PLUGIN_EXT := .so
|
adamstark@61
|
86 # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map
|
adamstark@61
|
87
|
adamstark@61
|
88
|
adamstark@61
|
89
|
adamstark@61
|
90 ## All of the above
|
adamstark@61
|
91
|
adamstark@61
|
92 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
|
adamstark@61
|
93 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
|
adamstark@61
|
94
|
adamstark@61
|
95 $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
|
adamstark@61
|
96 $(CXX) -o $@ $^ $(LDFLAGS)
|
adamstark@61
|
97
|
adamstark@61
|
98 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
|
adamstark@61
|
99
|
adamstark@61
|
100 clean:
|
adamstark@61
|
101 rm -f *.o
|
adamstark@61
|
102
|