cannam@97: cannam@97: ## Skeleton Makefile for Vamp plugin builds using command-line tools. cannam@97: ## This requires GNU make, which is what you get with OS/X, Linux, or cannam@97: ## MinGW/Cygwin on Windows. cannam@97: ## cannam@97: ## Rename this to Makefile, and edit as appropriate. cannam@97: ## This Makefile WILL NOT WORK until you have edited it as described cannam@97: ## below -- the Makefile as supplied does nothing useful at all! cannam@97: ## cannam@97: ## Various sets of options are provided, commented out -- just uncomment cannam@97: ## (remove the '#' characters for) the set that most closely resembles cannam@97: ## your own situation, and adjust to taste. Then run "gmake". cannam@97: ## cannam@97: ## (For Windows builds using MS Visual Studio, start instead with the cannam@97: ## VampExamplePlugins project found in the build directory of the SDK.) cannam@97: cannam@97: cannam@97: # Edit this to the base name of your plugin library cannam@97: # cannam@97: PLUGIN_LIBRARY_NAME := myplugins cannam@97: cannam@97: # Edit this to list the .cpp or .c files in your plugin project cannam@97: # cannam@97: PLUGIN_SOURCES := MyPlugin.cpp plugins.cpp cannam@97: cannam@97: # Edit this to list the .h files in your plugin project cannam@97: # cannam@97: PLUGIN_HEADERS := MyPlugin.h cannam@97: cannam@97: # Edit this to the location of the Vamp plugin SDK, relative to your cannam@97: # project directory cannam@97: # cannam@97: VAMP_SDK_DIR := ../vamp-plugin-sdk cannam@97: cannam@97: cannam@97: ## Uncomment these for an OS/X universal binary (32- and 64-bit Intel) cannam@97: ## supporting 10.5 or newer. Use this if you have OS/X 10.7 with the cannam@97: ## Xcode 4 command-line tools. cannam@97: cannam@97: # CXX := g++ cannam@97: # CXXFLAGS := -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC cannam@97: # PLUGIN_EXT := .dylib cannam@97: # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list cannam@97: cannam@97: cannam@97: ## Uncomment these for an OS/X universal binary (PPC and 32- and cannam@97: ## 64-bit Intel) supporting 10.5 or newer. Use this if you have OS/X cannam@97: ## 10.6 with the Xcode 3 command-line tools. cannam@97: cannam@97: # 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 cannam@97: # PLUGIN_EXT := .dylib cannam@97: # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list cannam@97: cannam@97: cannam@97: ## Uncomment these for an OS/X universal binary (PPC and 32- and cannam@97: ## 64-bit Intel) supporting 10.4 or newer. Use this if you have OS/X cannam@97: ## 10.4, 10.5 or 10.6 and you have the 10.4 SDK installed. cannam@97: cannam@97: # CXX := g++-4.0 cannam@97: # 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 cannam@97: # PLUGIN_EXT := .dylib cannam@97: # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list cannam@97: cannam@97: cannam@97: ## Uncomment these for Linux using the standard tools: cannam@97: cannam@97: # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC cannam@97: # PLUGIN_EXT := .so cannam@97: # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map cannam@97: cannam@97: cannam@97: ## Uncomment these for a cross-compile from Linux to Windows using MinGW: cannam@97: cannam@97: # CXX := i586-mingw32msvc-g++ cannam@97: # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall cannam@97: # PLUGIN_EXT := .dll cannam@97: # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a cannam@97: cannam@97: cannam@97: ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make: cannam@97: cannam@97: # CXX := CC cannam@97: # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC cannam@97: # PLUGIN_EXT := .so cannam@97: # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map cannam@97: cannam@97: cannam@97: cannam@97: ## All of the above cannam@97: cannam@97: PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o) cannam@97: PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o) cannam@97: cannam@97: $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS) cannam@97: $(CXX) -o $@ $^ $(LDFLAGS) cannam@97: cannam@97: $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS) cannam@97: cannam@97: clean: cannam@97: rm -f *.o cannam@97: