annotate 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
rev   line source
fazekasgy@37 1
cannam@49 2 CXXFLAGS := -DHAVE_NUMPY -O2 -Wall -I/usr/include/python2.6 -I/usr/lib/python2.6/dist-packages/numpy/core/include -fPIC
fazekasgy@37 3 LDFLAGS := -shared -Wl,-Bstatic -lvamp-sdk -Wl,-Bdynamic -lpython2.6 -lpthread -Wl,--version-script=vamp-plugin.map
fazekasgy@37 4
fazekasgy@37 5 default: vampy.so
fazekasgy@37 6 all: vampy.so vampymod.so
fazekasgy@37 7
fazekasgy@37 8 PyExtensionModule.a: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
fazekasgy@37 9 ar cr $@ $^
fazekasgy@37 10
fazekasgy@37 11 # The standard python extension is .so (even on the Mac)
fazekasgy@37 12 vampymod.so: PyExtensionModule.o PyRealTime.o PyFeature.o PyParameterDescriptor.o PyOutputDescriptor.o PyFeatureSet.o
fazekasgy@37 13 g++ $^ -o $@ $(LDFLAGS)
fazekasgy@37 14
cannam@44 15 vampy.so: PyPlugin.o PyPlugScanner.o vampy-main.o Mutex.o PyTypeInterface.o PyExtensionModule.a PyExtensionManager.o
fazekasgy@37 16 g++ $^ -o $@ $(LDFLAGS)
fazekasgy@37 17
fazekasgy@37 18 # Install plugin
fazekasgy@37 19 #
cannam@43 20 INSTALL_DIR :=$(DESTDIR)/usr/local/lib/vamp
cannam@43 21 PYEXAMPLE_DIR :='Example VamPy Plugins'
fazekasgy@37 22 PLUGIN_NAME :=vampy
cannam@43 23 PLUGIN_EXT :=.so
fazekasgy@37 24
fazekasgy@37 25 install:
fazekasgy@37 26 mkdir -p $(INSTALL_DIR)
fazekasgy@37 27 rm -f $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
fazekasgy@37 28 cp $(PLUGIN_NAME)$(PLUGIN_EXT) $(INSTALL_DIR)/$(PLUGIN_NAME)$(PLUGIN_EXT)
fazekasgy@37 29
fazekasgy@37 30 installplug : install
fazekasgy@37 31 cleanplug : clean
fazekasgy@37 32
fazekasgy@37 33 clean:
cannam@49 34 rm -f *.o
cannam@49 35 rm -f *.a
cannam@49 36 rm -f *$(PLUGIN_EXT)
fazekasgy@37 37