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