annotate skeleton/Makefile.skeleton @ 335:7d4aeb0d0d6c

Add acsymbols objects to platform-specific Makefiles
author Chris Cannam
date Sat, 30 Jun 2012 14:12:43 +0100
parents dba435f9b283
children d5c5a52e6c9f
rev   line source
cannam@299 1
cannam@299 2 ## Skeleton Makefile for Vamp plugin builds using command-line tools.
Chris@312 3 ## This requires GNU make, which is what you get with OS/X, Linux, or
Chris@312 4 ## MinGW/Cygwin on Windows.
cannam@299 5 ##
cannam@299 6 ## Rename this to Makefile, and edit as appropriate.
cannam@299 7 ## This Makefile WILL NOT WORK until you have edited it as described
cannam@299 8 ## below -- the Makefile as supplied does nothing useful at all!
cannam@299 9 ##
cannam@299 10 ## Various sets of options are provided, commented out -- just uncomment
cannam@299 11 ## (remove the '#' characters for) the set that most closely resembles
Chris@312 12 ## your own situation, and adjust to taste. Then run "gmake".
cannam@299 13 ##
cannam@299 14 ## (For Windows builds using MS Visual Studio, start instead with the
cannam@299 15 ## VampExamplePlugins project found in the build directory of the SDK.)
cannam@299 16
cannam@299 17
cannam@299 18 # Edit this to the base name of your plugin library
cannam@299 19 #
Chris@312 20 PLUGIN_LIBRARY_NAME := myplugins
cannam@299 21
Chris@312 22 # Edit this to list the .cpp or .c files in your plugin project
cannam@299 23 #
Chris@312 24 PLUGIN_SOURCES := MyPlugin.cpp plugins.cpp
Chris@312 25
Chris@312 26 # Edit this to list the .h files in your plugin project
Chris@312 27 #
Chris@312 28 PLUGIN_HEADERS := MyPlugin.h
cannam@299 29
cannam@299 30 # Edit this to the location of the Vamp plugin SDK, relative to your
cannam@299 31 # project directory
cannam@299 32 #
Chris@312 33 VAMP_SDK_DIR := ../vamp-plugin-sdk
cannam@299 34
cannam@299 35
cannam@306 36 ## Uncomment these for an OS/X universal binary (PPC and 32- and
cannam@306 37 ## 64-bit Intel) supporting 10.4 or newer (if you have the 10.4 SDK):
cannam@299 38
Chris@314 39 # CXX := g++-4.0
Chris@312 40 # 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 41 # PLUGIN_EXT := .dylib
Chris@330 42 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
cannam@299 43
cannam@299 44
cannam@306 45 ## Uncomment these for an OS/X universal binary (PPC and 32- and
cannam@306 46 ## 64-bit Intel) supporting 10.5 or newer (use this if you have the
cannam@306 47 ## default 10.6 developer tools):
cannam@299 48
Chris@312 49 # 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@312 50 # PLUGIN_EXT := .dylib
Chris@330 51 # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list
cannam@299 52
cannam@299 53
cannam@299 54 ## Uncomment these for Linux using the standard tools:
cannam@299 55
Chris@312 56 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC
Chris@312 57 # PLUGIN_EXT := .so
Chris@330 58 # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map
cannam@299 59
cannam@299 60
cannam@299 61 ## Uncomment these for a cross-compile from Linux to Windows using MinGW:
cannam@299 62
Chris@312 63 # CXX := i586-mingw32msvc-g++
Chris@312 64 # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall
Chris@312 65 # PLUGIN_EXT := .dll
Chris@330 66 # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a
cannam@299 67
cannam@299 68
cannam@299 69 ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make:
cannam@299 70
Chris@312 71 # CXX := CC
Chris@312 72 # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC
Chris@312 73 # PLUGIN_EXT := .so
Chris@330 74 # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map
cannam@299 75
cannam@299 76
cannam@299 77
cannam@299 78 ## All of the above
cannam@299 79
Chris@312 80 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
Chris@312 81 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
Chris@312 82
Chris@330 83 $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS)
cannam@299 84 $(CXX) -o $@ $^ $(LDFLAGS)
cannam@299 85
Chris@312 86 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
Chris@312 87
cannam@299 88 clean:
cannam@299 89 rm -f *.o
cannam@299 90