comparison Makefile @ 20:68b8b32a2070

* Add virtual destructors to PluginBase and Plugin to ensure subclass dtors get called * Fix buglet in host that caused plugin soname to be used as plugin name if no plugin name provided on command line * Add header dependencies to Makefile
author cannam
date Wed, 12 Apr 2006 12:32:18 +0000
parents b4043af42278
children 16eeab18bf72
comparison
equal deleted inserted replaced
19:08ee18123f5a 20:68b8b32a2070
38 #PLUGIN_LDFLAGS = -dynamiclib 38 #PLUGIN_LDFLAGS = -dynamiclib
39 #PLUGIN_EXT = .dylib 39 #PLUGIN_EXT = .dylib
40 40
41 ### End of user-serviceable parts 41 ### End of user-serviceable parts
42 42
43 API_HEADERS = \
44 $(APIDIR)/vamp.h
45
46 SDK_HEADERS = \
47 $(SDKDIR)/Plugin.h \
48 $(SDKDIR)/PluginAdapter.h \
49 $(SDKDIR)/PluginBase.h \
50 $(SDKDIR)/PluginHostAdapter.h \
51 $(SDKDIR)/RealTime.h
52
43 SDK_OBJECTS = \ 53 SDK_OBJECTS = \
44 $(SDKDIR)/PluginAdapter.o \ 54 $(SDKDIR)/PluginAdapter.o \
45 $(SDKDIR)/PluginHostAdapter.o \ 55 $(SDKDIR)/PluginHostAdapter.o \
46 $(SDKDIR)/RealTime.o 56 $(SDKDIR)/RealTime.o
47 57
48 SDK_TARGET = \ 58 SDK_TARGET = \
49 $(SDKDIR)/libvamp-sdk.a 59 $(SDKDIR)/libvamp-sdk.a
50 60
61 PLUGIN_HEADERS = \
62 $(EXAMPLEDIR)/SpectralCentroid.h \
63 $(EXAMPLEDIR)/ZeroCrossing.h
64
51 PLUGIN_OBJECTS = \ 65 PLUGIN_OBJECTS = \
66 $(EXAMPLEDIR)/SpectralCentroid.o \
52 $(EXAMPLEDIR)/ZeroCrossing.o \ 67 $(EXAMPLEDIR)/ZeroCrossing.o \
53 $(EXAMPLEDIR)/SpectralCentroid.o \
54 $(EXAMPLEDIR)/plugins.o 68 $(EXAMPLEDIR)/plugins.o
55 69
56 PLUGIN_TARGET = \ 70 PLUGIN_TARGET = \
57 $(EXAMPLEDIR)/plugins$(PLUGIN_EXT) 71 $(EXAMPLEDIR)/plugins$(PLUGIN_EXT)
72
73 HOST_HEADERS = \
74 $(HOSTDIR)/system.h
58 75
59 HOST_OBJECTS = \ 76 HOST_OBJECTS = \
60 $(HOSTDIR)/simplehost.o 77 $(HOSTDIR)/simplehost.o
61 78
62 HOST_TARGET = \ 79 HOST_TARGET = \
63 $(HOSTDIR)/simplehost 80 $(HOSTDIR)/simplehost
64 81
65 all: $(SDK_TARGET) $(PLUGIN_TARGET) $(HOST_TARGET) test 82 all: $(SDK_TARGET) $(PLUGIN_TARGET) $(HOST_TARGET) test
66 83
67 $(SDK_TARGET): $(SDK_OBJECTS) 84 $(SDK_TARGET): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
68 $(AR) r $@ $^ 85 $(AR) r $@ $(SDK_OBJECTS)
69 86
70 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_TARGET) 87 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_TARGET) $(PLUGIN_HEADERS)
71 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $^ $(PLUGIN_LIBS) 88 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
72 89
73 $(HOST_TARGET): $(HOST_OBJECTS) $(SDK_TARGET) 90 $(HOST_TARGET): $(HOST_OBJECTS) $(SDK_TARGET) $(HOST_HEADERS)
74 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(HOST_LIBS) 91 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
75 92
76 test: $(HOST_TARGET) $(PLUGIN_TARGET) 93 test: $(HOST_TARGET) $(PLUGIN_TARGET)
77 $(HOST_TARGET) $(PLUGIN_TARGET) 94 $(HOST_TARGET) $(PLUGIN_TARGET)
78 95
79 clean: 96 clean: