annotate modules-and-plug-ins/vamp-plugin/Makefile @ 33:a90b187d6122 release/1.0.0

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