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