view 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
line wrap: on
line source

PYDIR		:= /System/Library/Frameworks/Python.framework/Versions/2.7

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

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)