cannam@299: cannam@299: ## Skeleton Makefile for Vamp plugin builds using command-line tools. 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 cannam@299: ## your own situation, and adjust to taste. Then run "make". 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: # cannam@299: PLUGIN_LIBRARY_NAME = myplugins cannam@299: cannam@299: # Edit this to list one .o file for each .cpp file in your plugin project cannam@299: # cannam@300: PLUGIN_CODE_OBJECTS = MyPlugin.o plugins.o cannam@299: cannam@299: # Edit this to the location of the Vamp plugin SDK, relative to your cannam@299: # project directory cannam@299: # cannam@299: VAMP_SDK_DIR = ../vamp-plugin-sdk cannam@299: cannam@299: cannam@299: ## Uncomment these for an OS/X native build using command-line tools: cannam@299: cannam@299: # CXXFLAGS = -I$(VAMP_SDK_DIR) -Wall -fPIC cannam@299: # PLUGIN_EXT = .dylib cannam@299: # PLUGIN = $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) cannam@299: # LDFLAGS = -dynamiclib -install_name $(PLUGIN) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list cannam@299: cannam@299: cannam@299: ## Uncomment these for an OS/X universal binary using command-line tools: cannam@299: cannam@299: # CXXFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC cannam@299: # PLUGIN_EXT = .dylib cannam@299: # PLUGIN = $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) cannam@299: # LDFLAGS = -dynamiclib -install_name $(PLUGIN) $(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: cannam@299: # CXXFLAGS = -I$(VAMP_SDK_DIR) -Wall -fPIC cannam@299: # PLUGIN_EXT = .so cannam@299: # PLUGIN = $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) cannam@299: # LDFLAGS = -shared -Wl,-soname=$(PLUGIN) $(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: cannam@299: # CXX = i586-mingw32msvc-g++ cannam@299: # CXXFLAGS = -I$(VAMP_SDK_DIR) -Wall cannam@299: # PLUGIN_EXT = .dll cannam@299: # PLUGIN = $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) cannam@299: # LDFLAGS = --static-libgcc -Wl,-soname=$(PLUGIN) -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: cannam@299: # CXX = CC cannam@299: # CXXFLAGS = -G -I$(VAMP_SDK_DIR) +w -KPIC cannam@299: # PLUGIN_EXT = .so cannam@299: # PLUGIN = $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) cannam@299: # LDFLAGS = -G -h$(PLUGIN) $(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: cannam@299: $(PLUGIN): $(PLUGIN_CODE_OBJECTS) cannam@299: $(CXX) -o $@ $^ $(LDFLAGS) cannam@299: cannam@299: clean: cannam@299: rm -f *.o cannam@299: