| 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 | 
| cannam@306 | 36 ## Uncomment these for an OS/X universal binary (PPC and 32- and | 
| cannam@306 | 37 ## 64-bit Intel) supporting 10.4 or newer (if you have the 10.4 SDK): | 
| cannam@299 | 38 | 
| Chris@312 | 39 # 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 | 40 # PLUGIN_EXT := .dylib | 
| Chris@312 | 41 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list | 
| cannam@299 | 42 | 
| cannam@299 | 43 | 
| cannam@306 | 44 ## Uncomment these for an OS/X universal binary (PPC and 32- and | 
| cannam@306 | 45 ## 64-bit Intel) supporting 10.5 or newer (use this if you have the | 
| cannam@306 | 46 ## default 10.6 developer tools): | 
| cannam@299 | 47 | 
| Chris@312 | 48 # 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@312 | 49 # PLUGIN_EXT := .dylib | 
| Chris@312 | 50 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list | 
| cannam@299 | 51 | 
| cannam@299 | 52 | 
| cannam@299 | 53 ##  Uncomment these for Linux using the standard tools: | 
| cannam@299 | 54 | 
| Chris@312 | 55 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC | 
| Chris@312 | 56 # PLUGIN_EXT := .so | 
| Chris@312 | 57 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map | 
| cannam@299 | 58 | 
| cannam@299 | 59 | 
| cannam@299 | 60 ##  Uncomment these for a cross-compile from Linux to Windows using MinGW: | 
| cannam@299 | 61 | 
| Chris@312 | 62 # CXX := i586-mingw32msvc-g++ | 
| Chris@312 | 63 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall | 
| Chris@312 | 64 # PLUGIN_EXT := .dll | 
| Chris@312 | 65 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a | 
| cannam@299 | 66 | 
| cannam@299 | 67 | 
| cannam@299 | 68 ##  Uncomment these for OpenSolaris using SunStudio compiler and GNU make: | 
| cannam@299 | 69 | 
| Chris@312 | 70 # CXX := CC | 
| Chris@312 | 71 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC | 
| Chris@312 | 72 # PLUGIN_EXT := .so | 
| Chris@312 | 73 # LDFLAGS := -G -h$(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map | 
| cannam@299 | 74 | 
| cannam@299 | 75 | 
| cannam@299 | 76 | 
| cannam@299 | 77 ##  All of the above | 
| cannam@299 | 78 | 
| Chris@312 | 79 PLUGIN := $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) | 
| Chris@312 | 80 | 
| Chris@312 | 81 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o) | 
| Chris@312 | 82 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o) | 
| Chris@312 | 83 | 
| Chris@312 | 84 $(PLUGIN): $(PLUGIN_OBJECTS) | 
| cannam@299 | 85 	   $(CXX) -o $@ $^ $(LDFLAGS) | 
| cannam@299 | 86 | 
| Chris@312 | 87 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS) | 
| Chris@312 | 88 | 
| cannam@299 | 89 clean: | 
| cannam@299 | 90 	rm -f *.o | 
| cannam@299 | 91 |