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