comparison modules-and-plug-ins/vamp-plugin/Makefile @ 61:ce806db4468b

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