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