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