-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.osx
42 lines (30 loc) · 1.43 KB
/
Makefile.osx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PYDIR := /System/Library/Frameworks/Python.framework/Versions/2.7
CXXFLAGS := -DHAVE_NUMPY -D_DEBUG -mmacosx-version-min=10.10 -I../vamp-plugin-sdk -O2 -Wall -I$(PYDIR)/include/python2.7 -I$(PYDIR)/Extras/lib/python/numpy/core/include
LDFLAGS := -install_name vampy.dylib -g -exported_symbols_list vamp-plugin.list -mmacosx-version-min=10.10 ../vamp-plugin-sdk/libvamp-sdk.a -dynamiclib -lpython2.7 -lpthread
default: vampy.dylib
all: vampy.dylib vampymod.so
PyExtensionModule.a: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
libtool -static $^ -o $@
# The standard python extension is .so (even on the Mac)
vampymod.so: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
g++ -shared $^ -o $@ $(LDFLAGS)
vampy.dylib: PyPlugin.o PyPlugScanner.o vampy-main.o Mutex.o PyTypeInterface.o PyExtensionModule.a PyExtensionManager.o
g++ -shared $^ -o $@ $(LDFLAGS)
# Install plugin
#
LIBRARY_PREFIX :=/Library
INSTALL_DIR :=$(LIBRARY_PREFIX)/Audio/Plug-Ins/Vamp
PYEXAMPLE_DIR :='Example VamPy Plugins'
PLUGIN_NAME :=vampy
PLUGIN_EXT :=.dylib
install:
mkdir -p $(INSTALL_DIR)
rm -f $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
cp $(PLUGIN_NAME)$(PLUGIN_EXT) $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
#cp $(PYEXAMPLE_DIR)/*.py $(INSTALL_DIR)
installplug : install
cleanplug : clean
clean:
rm *.o
rm *.a
rm *$(PLUGIN_EXT)