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@61
|
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@61
|
28 PLUGIN_HEADERS := BTrackVamp.h ../../src/BTrack.h ../../src/OnsetDetectionFunction.h
|
adamstark@61
|
29
|
adamstark@61
|
30 # Edit this to the location of the Vamp plugin SDK, relative to your
|
adamstark@61
|
31 # project directory
|
adamstark@61
|
32 #
|
adamstark@61
|
33 VAMP_SDK_DIR := /usr/local/lib/vamp-sdk
|
adamstark@61
|
34
|
adamstark@61
|
35
|
adamstark@61
|
36 ## Uncomment these for an OS/X universal binary (32- and 64-bit Intel)
|
adamstark@61
|
37 ## supporting 10.5 or newer. Use this if you have OS/X 10.7 with the
|
adamstark@61
|
38 ## Xcode 4 command-line tools.
|
adamstark@61
|
39
|
adamstark@61
|
40 CXX := g++
|
adamstark@61
|
41
|
adamstark@61
|
42 ## commented this out while I don't have both 32 and 64 bit versions of the libraries
|
adamstark@61
|
43 #CXXFLAGS := -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
44 CXXFLAGS := -mmacosx-version-min=10.5 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
45 PLUGIN_EXT := .dylib
|
adamstark@61
|
46 LDFLAGS := $(CXXFLAGS) -dynamiclib -lfftw3 -lsamplerate -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
47
|
adamstark@61
|
48
|
adamstark@61
|
49 ## Uncomment these for an OS/X universal binary (PPC and 32- and
|
adamstark@61
|
50 ## 64-bit Intel) supporting 10.5 or newer. Use this if you have OS/X
|
adamstark@61
|
51 ## 10.6 with the Xcode 3 command-line tools.
|
adamstark@61
|
52
|
adamstark@61
|
53 # 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
|
54 # PLUGIN_EXT := .dylib
|
adamstark@61
|
55 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
56
|
adamstark@61
|
57
|
adamstark@61
|
58 ## Uncomment these for an OS/X universal binary (PPC and 32- and
|
adamstark@61
|
59 ## 64-bit Intel) supporting 10.4 or newer. Use this if you have OS/X
|
adamstark@61
|
60 ## 10.4, 10.5 or 10.6 and you have the 10.4 SDK installed.
|
adamstark@61
|
61
|
adamstark@61
|
62 # CXX := g++-4.0
|
adamstark@61
|
63 # 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
|
64 # PLUGIN_EXT := .dylib
|
adamstark@61
|
65 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
|
adamstark@61
|
66
|
adamstark@61
|
67
|
adamstark@61
|
68 ## Uncomment these for Linux using the standard tools:
|
adamstark@61
|
69
|
adamstark@61
|
70 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC
|
adamstark@61
|
71 # PLUGIN_EXT := .so
|
adamstark@61
|
72 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map
|
adamstark@61
|
73
|
adamstark@61
|
74
|
adamstark@61
|
75 ## Uncomment these for a cross-compile from Linux to Windows using MinGW:
|
adamstark@61
|
76
|
adamstark@61
|
77 # CXX := i586-mingw32msvc-g++
|
adamstark@61
|
78 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall
|
adamstark@61
|
79 # PLUGIN_EXT := .dll
|
adamstark@61
|
80 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a
|
adamstark@61
|
81
|
adamstark@61
|
82
|
adamstark@61
|
83 ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make:
|
adamstark@61
|
84
|
adamstark@61
|
85 # CXX := CC
|
adamstark@61
|
86 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC
|
adamstark@61
|
87 # PLUGIN_EXT := .so
|
adamstark@61
|
88 # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map
|
adamstark@61
|
89
|
adamstark@61
|
90
|
adamstark@61
|
91
|
adamstark@61
|
92 ## All of the above
|
adamstark@61
|
93
|
adamstark@61
|
94 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
|
adamstark@61
|
95 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
|
adamstark@61
|
96
|
adamstark@61
|
97 $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
|
adamstark@61
|
98 $(CXX) -o $@ $^ $(LDFLAGS)
|
adamstark@61
|
99
|
adamstark@61
|
100 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
|
adamstark@61
|
101
|
adamstark@61
|
102 clean:
|
adamstark@61
|
103 rm -f *.o
|
adamstark@61
|
104
|