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