view Makefile.linux @ 53:7e59caea821b

* Make a better job of preloading Python, especially when it's in a framework. Go for the Python file in the frameworks directory in preference to any libpythonX.Y.dylib. Particularly, don't try to preload any library without an absolute path until we've exhausted all our framework possibilities (so as to avoid picking up an ancient system library).
author cannam
date Fri, 09 Oct 2009 13:48:25 +0000
parents 0f16923521bb
children 74703a562ce3
line wrap: on
line source

CXXFLAGS	:= -DHAVE_NUMPY -O2 -Wall -I/usr/include/python2.6 -I/usr/lib/python2.6/dist-packages/numpy/core/include -fPIC
LDFLAGS		:= -shared -Wl,-Bstatic -lvamp-sdk -Wl,-Bdynamic -lpython2.6 -lpthread -Wl,--version-script=vamp-plugin.map

default: vampy.so 
all: vampy.so vampymod.so

PyExtensionModule.a: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o 
	ar cr $@ $^

# 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++ $^ -o $@ $(LDFLAGS) 

vampy.so: PyPlugin.o PyPlugScanner.o vampy-main.o Mutex.o PyTypeInterface.o PyExtensionModule.a  PyExtensionManager.o
	g++ $^ -o $@ $(LDFLAGS) 

# Install plugin
#
INSTALL_DIR			:=$(DESTDIR)/usr/local/lib/vamp
PYEXAMPLE_DIR			:='Example VamPy Plugins'
PLUGIN_NAME			:=vampy
PLUGIN_EXT			:=.so

install:
	mkdir -p $(INSTALL_DIR)
	rm -f $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
	cp $(PLUGIN_NAME)$(PLUGIN_EXT) $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)

installplug : install
cleanplug : clean

clean:	
	rm -f *.o
	rm -f *.a
	rm -f *$(PLUGIN_EXT)