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