annotate Makefile.osx @ 92:a6718f9fe942

If a module appears to redefine one of our own types, refuse to load it. Also clear out the class dict for all refused modules now, so that we don't get stale names on the next scan due to not having cleared the module on unload
author Chris Cannam
date Mon, 14 Jan 2019 16:19:44 +0000
parents 5620e0fbbc01
children 161ed1fb016b
rev   line source
cannam@43 1
Chris@85 2 PYDIR := /System/Library/Frameworks/Python.framework/Versions/2.7
cannam@43 3
Chris@85 4 CXXFLAGS := -DHAVE_NUMPY -D_DEBUG -mmacosx-version-min=10.10 -I../vamp-plugin-sdk -g -Wall -I$(PYDIR)/include/python2.7 -I$(PYDIR)/Extras/lib/python/numpy/core/include
Chris@85 5
Chris@85 6 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
cannam@43 7
cannam@43 8 default: vampy.dylib
cannam@43 9 all: vampy.dylib vampymod.so
cannam@43 10
cannam@43 11 PyExtensionModule.a: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
cannam@43 12 libtool -static $^ -o $@
cannam@43 13
cannam@43 14 # The standard python extension is .so (even on the Mac)
cannam@43 15 vampymod.so: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
cannam@43 16 g++ -shared $^ -o $@ $(LDFLAGS)
cannam@43 17
cannam@43 18 vampy.dylib: PyPlugin.o PyPlugScanner.o vampy-main.o Mutex.o PyTypeInterface.o PyExtensionModule.a PyExtensionManager.o
cannam@43 19 g++ -shared $^ -o $@ $(LDFLAGS)
cannam@43 20
cannam@43 21 # Install plugin
cannam@43 22 #
cannam@43 23 LIBRARY_PREFIX :=/Library
cannam@43 24 INSTALL_DIR :=$(LIBRARY_PREFIX)/Audio/Plug-Ins/Vamp
cannam@43 25 PYEXAMPLE_DIR :='Example VamPy Plugins'
cannam@43 26 PLUGIN_NAME :=vampy
cannam@43 27 PLUGIN_EXT :=.dylib
cannam@43 28
cannam@43 29 install:
cannam@43 30 mkdir -p $(INSTALL_DIR)
cannam@43 31 rm -f $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
cannam@43 32 cp $(PLUGIN_NAME)$(PLUGIN_EXT) $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
cannam@43 33 #cp $(PYEXAMPLE_DIR)/*.py $(INSTALL_DIR)
cannam@43 34
cannam@43 35 installplug : install
cannam@43 36 cleanplug : clean
cannam@43 37
cannam@43 38 clean:
cannam@43 39 rm *.o
cannam@43 40 rm *.a
cannam@43 41 rm *$(PLUGIN_EXT)
cannam@43 42