comparison Makefile @ 59:fa79c4ec847d host-factory-stuff

* Put hostext stuff in the HostExt sub-namespace * Tidy up system-specific stuff in PluginLoader * Make PluginLoader return a deletion-notifying wrapper which permits the library to be unloaded when no longer in use * Add PluginChannelAdapter * Make vamp-simple-host use PluginChannelAdapter, and use the PluginLoader for plugin-running task. Also some other enhancements to host
author cannam
date Thu, 24 May 2007 15:17:07 +0000
parents 0284955e31e5
children 97c5ac99d725
comparison
equal deleted inserted replaced
58:0284955e31e5 59:fa79c4ec847d
1 1
2 # Makefile for the Vamp plugin SDK. This builds the SDK objects, 2 # Makefile for the Vamp plugin SDK. This builds the SDK objects,
3 # libraries, example plugins, and the test host. Please adjust to 3 # libraries, example plugins, and the test host. Please adjust to
4 # suit your operating system requirements. 4 # suit your operating system requirements.
5
6 ## Choose your
7 5
8 APIDIR = vamp 6 APIDIR = vamp
9 SDKDIR = vamp-sdk 7 SDKDIR = vamp-sdk
10 HOSTEXTDIR = vamp-sdk/hostext 8 HOSTEXTDIR = vamp-sdk/hostext
11 EXAMPLEDIR = examples 9 EXAMPLEDIR = examples
27 # 25 #
28 default: all 26 default: all
29 27
30 # Compile flags 28 # Compile flags
31 # 29 #
32 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I$(SDKDIR) -I$(HOSTEXTDIR) -I$(APIDIR) -I. 30 CXXFLAGS := $(CXXFLAGS) -g -Wall -I.
33 31
34 # Libraries required for the plugins. 32 # Libraries required for the plugins.
35 # (Note that it is desirable to statically link libstdc++ if possible, 33 # (Note that it is desirable to statically link libstdc++ if possible,
36 # because our plugin exposes only a C API so there are no boundary 34 # because our plugin exposes only a C API so there are no boundary
37 # compatibility problems.) 35 # compatibility problems.)
92 90
93 HOSTSDK_HEADERS = \ 91 HOSTSDK_HEADERS = \
94 $(SDKDIR)/Plugin.h \ 92 $(SDKDIR)/Plugin.h \
95 $(SDKDIR)/PluginBase.h \ 93 $(SDKDIR)/PluginBase.h \
96 $(SDKDIR)/PluginHostAdapter.h \ 94 $(SDKDIR)/PluginHostAdapter.h \
95 $(HOSTEXTDIR)/PluginChannelAdapter.h \
97 $(HOSTEXTDIR)/PluginInputDomainAdapter.h \ 96 $(HOSTEXTDIR)/PluginInputDomainAdapter.h \
98 $(HOSTEXTDIR)/PluginLoader.h \ 97 $(HOSTEXTDIR)/PluginLoader.h \
99 $(HOSTEXTDIR)/PluginWrapper.h \ 98 $(HOSTEXTDIR)/PluginWrapper.h \
100 $(SDKDIR)/RealTime.h 99 $(SDKDIR)/RealTime.h
101 100
103 $(SDKDIR)/PluginAdapter.o \ 102 $(SDKDIR)/PluginAdapter.o \
104 $(SDKDIR)/RealTime.o 103 $(SDKDIR)/RealTime.o
105 104
106 HOSTSDK_OBJECTS = \ 105 HOSTSDK_OBJECTS = \
107 $(SDKDIR)/PluginHostAdapter.o \ 106 $(SDKDIR)/PluginHostAdapter.o \
107 $(HOSTEXTDIR)/PluginChannelAdapter.o \
108 $(HOSTEXTDIR)/PluginInputDomainAdapter.o \ 108 $(HOSTEXTDIR)/PluginInputDomainAdapter.o \
109 $(HOSTEXTDIR)/PluginLoader.o \ 109 $(HOSTEXTDIR)/PluginLoader.o \
110 $(HOSTEXTDIR)/PluginWrapper.o \ 110 $(HOSTEXTDIR)/PluginWrapper.o \
111 $(SDKDIR)/RealTime.o 111 $(SDKDIR)/RealTime.o
112 112
150 HOST_TARGET = \ 150 HOST_TARGET = \
151 $(HOSTDIR)/vamp-simple-host 151 $(HOSTDIR)/vamp-simple-host
152 152
153 sdk: $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) 153 sdk: $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC)
154 154
155 plugins: sdk $(PLUGIN_TARGET) 155 plugins: $(PLUGIN_TARGET)
156 156
157 host: sdk $(HOST_TARGET) 157 host: $(HOST_TARGET)
158 158
159 all: sdk plugins host test 159 all: sdk plugins host test
160 160
161 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS) 161 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
162 $(AR) r $@ $(SDK_OBJECTS) 162 $(AR) r $@ $(SDK_OBJECTS)
168 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(SDK_OBJECTS) 168 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(SDK_OBJECTS)
169 169
170 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) 170 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
171 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS) 171 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
172 172
173 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_TARGET) $(PLUGIN_HEADERS) 173 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
174 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS) 174 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
175 175
176 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_TARGET) $(HOST_HEADERS) 176 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
177 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS) 177 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
178 178
179 test: plugins host 179 test: plugins host
180 $(HOST_TARGET) $(PLUGIN_TARGET) 180 VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
181 181
182 clean: 182 clean:
183 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) 183 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS)
184 184
185 distclean: clean 185 distclean: clean