annotate skeleton/Makefile.skeleton @ 306:b923a3d9c3d5

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