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