annotate src/vamp-plugin-sdk-2.5/skeleton/Makefile.skeleton @ 83:ae30d91d2ffe

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