annotate Makefile.osx @ 235:44d9d9afe294 trunk-pre-20081107

* Move trunk aside; new trunk arriving WHUMP in a moment
author cannam
date Fri, 07 Nov 2008 16:48:15 +0000
parents 87b131a54b0a
children 3ad28b1e2150
rev   line source
cannam@94 1
cannam@94 2 # Makefile for the Vamp plugin SDK. This builds the SDK objects,
cannam@94 3 # libraries, example plugins, and the test host. Please adjust to
cannam@94 4 # suit your operating system requirements.
cannam@94 5 #
cannam@94 6 # This version of the Makefile is approximately correct for OS/X.
cannam@94 7 # Note that it has no "install" target; the following are the
cannam@94 8 # library and related files that may be of interest resulting from
cannam@94 9 # the build:
cannam@94 10 #
cannam@94 11 # vamp-sdk/libvamp-sdk.dylib [SDK dynamic library for plugins]
cannam@94 12 # vamp-sdk/libvamp-hostsdk.dylib [SDK dynamic library for hosts]
cannam@94 13 #
cannam@94 14 # vamp-sdk/libvamp-sdk.a [SDK static library for plugins]
cannam@94 15 # vamp-sdk/libvamp-hostsdk.a [SDK static library for hosts]
cannam@94 16 #
cannam@94 17 # examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir]
cannam@94 18 # examples/vamp-example-plugins.dylib [copy this to your Vamp plugin dir]
cannam@94 19 #
cannam@94 20 # host/vamp-simple-host [requires libsndfile to build]
cannam@94 21
cannam@94 22 APIDIR = vamp
cannam@94 23 SDKDIR = vamp-sdk
cannam@94 24 HOSTEXTDIR = vamp-sdk/hostext
cannam@94 25 EXAMPLEDIR = examples
cannam@94 26 HOSTDIR = host
cannam@94 27
cannam@94 28 ###
cannam@94 29 ### Start of user-serviceable parts
cannam@94 30 ###
cannam@94 31
cannam@94 32 # Default build target (or use "make <target>" to select one).
cannam@94 33 # Targets are:
cannam@94 34 # all -- build everything
cannam@94 35 # sdk -- build all the Vamp SDK libraries for plugins and hosts
cannam@94 36 # sdkstatic -- build only the static versions of the SDK libraries
cannam@94 37 # plugins -- build the example plugins (and the SDK if required)
cannam@94 38 # host -- build the simple Vamp plugin host (and the SDK if required)
cannam@94 39 # test -- build the host and example plugins, and run a quick test
cannam@94 40 # clean -- remove binary targets
cannam@94 41 # distclean -- remove all targets
cannam@94 42 #
cannam@94 43 default: all
cannam@94 44
cannam@94 45 # Compile flags
cannam@94 46 #
cannam@163 47 CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I. -fPIC
cannam@94 48
cannam@94 49 # ar, ranlib
cannam@94 50 #
cannam@94 51 AR := ar
cannam@94 52 RANLIB := ranlib
cannam@94 53
cannam@94 54 # Libraries required for the plugins.
cannam@94 55 # (Note that it is desirable to statically link libstdc++ if possible,
cannam@94 56 # because our plugin exposes only a C API so there are no boundary
cannam@94 57 # compatibility problems.)
cannam@94 58 #
cannam@94 59 PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a
cannam@94 60
cannam@94 61 # File extension for a dynamically loadable object
cannam@94 62 #
cannam@94 63 PLUGIN_EXT = .dylib
cannam@94 64
cannam@94 65 # Libraries required for the host.
cannam@94 66 #
cannam@163 67 HOST_LIBS = $(SDKDIR)/libvamp-hostsdk.a -lsndfile -ldl
cannam@94 68
cannam@94 69 # Flags required to tell the compiler to create a dynamically loadable object
cannam@94 70 #
cannam@163 71 DYNAMIC_LDFLAGS = -dynamiclib
cannam@128 72 PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name vamp-example-plugins.dylib
cannam@128 73 SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib
cannam@128 74 HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib
cannam@94 75
cannam@94 76
cannam@94 77 ### End of user-serviceable parts
cannam@94 78
cannam@94 79
cannam@94 80 API_HEADERS = \
cannam@94 81 $(APIDIR)/vamp.h
cannam@94 82
cannam@94 83 SDK_HEADERS = \
cannam@94 84 $(SDKDIR)/Plugin.h \
cannam@94 85 $(SDKDIR)/PluginAdapter.h \
cannam@94 86 $(SDKDIR)/PluginBase.h \
cannam@94 87 $(SDKDIR)/RealTime.h
cannam@94 88
cannam@94 89 HOSTSDK_HEADERS = \
cannam@94 90 $(SDKDIR)/Plugin.h \
cannam@94 91 $(SDKDIR)/PluginBase.h \
cannam@94 92 $(SDKDIR)/PluginHostAdapter.h \
cannam@94 93 $(SDKDIR)/RealTime.h
cannam@94 94
cannam@94 95 HOSTEXT_HEADERS = \
cannam@94 96 $(HOSTEXTDIR)/PluginBufferingAdapter.h \
cannam@94 97 $(HOSTEXTDIR)/PluginChannelAdapter.h \
cannam@94 98 $(HOSTEXTDIR)/PluginInputDomainAdapter.h \
cannam@94 99 $(HOSTEXTDIR)/PluginLoader.h \
cannam@213 100 $(HOSTEXTDIR)/PluginSummarisingAdapter.h \
cannam@94 101 $(HOSTEXTDIR)/PluginWrapper.h
cannam@94 102
cannam@94 103 SDK_OBJECTS = \
cannam@94 104 $(SDKDIR)/PluginAdapter.o \
cannam@94 105 $(SDKDIR)/RealTime.o
cannam@94 106
cannam@94 107 HOSTSDK_OBJECTS = \
cannam@94 108 $(SDKDIR)/PluginHostAdapter.o \
cannam@94 109 $(HOSTEXTDIR)/PluginBufferingAdapter.o \
cannam@94 110 $(HOSTEXTDIR)/PluginChannelAdapter.o \
cannam@94 111 $(HOSTEXTDIR)/PluginInputDomainAdapter.o \
cannam@94 112 $(HOSTEXTDIR)/PluginLoader.o \
cannam@213 113 $(HOSTEXTDIR)/PluginSummarisingAdapter.o \
cannam@94 114 $(HOSTEXTDIR)/PluginWrapper.o \
cannam@94 115 $(SDKDIR)/RealTime.o
cannam@94 116
cannam@94 117 SDK_STATIC = \
cannam@94 118 $(SDKDIR)/libvamp-sdk.a
cannam@94 119
cannam@94 120 HOSTSDK_STATIC = \
cannam@94 121 $(SDKDIR)/libvamp-hostsdk.a
cannam@94 122
cannam@94 123 SDK_DYNAMIC = \
cannam@94 124 $(SDKDIR)/libvamp-sdk$(PLUGIN_EXT)
cannam@94 125
cannam@94 126 HOSTSDK_DYNAMIC = \
cannam@94 127 $(SDKDIR)/libvamp-hostsdk$(PLUGIN_EXT)
cannam@94 128
cannam@94 129 SDK_LA = \
cannam@94 130 $(SDKDIR)/libvamp-sdk.la
cannam@94 131
cannam@94 132 HOSTSDK_LA = \
cannam@94 133 $(SDKDIR)/libvamp-hostsdk.la
cannam@94 134
cannam@94 135 PLUGIN_HEADERS = \
cannam@94 136 $(EXAMPLEDIR)/SpectralCentroid.h \
cannam@94 137 $(EXAMPLEDIR)/PercussionOnsetDetector.h \
cannam@213 138 $(EXAMPLEDIR)/FixedTempoEstimator.h \
cannam@94 139 $(EXAMPLEDIR)/AmplitudeFollower.h \
cannam@94 140 $(EXAMPLEDIR)/ZeroCrossing.h
cannam@94 141
cannam@94 142 PLUGIN_OBJECTS = \
cannam@94 143 $(EXAMPLEDIR)/SpectralCentroid.o \
cannam@94 144 $(EXAMPLEDIR)/PercussionOnsetDetector.o \
cannam@213 145 $(EXAMPLEDIR)/FixedTempoEstimator.o \
cannam@94 146 $(EXAMPLEDIR)/AmplitudeFollower.o \
cannam@94 147 $(EXAMPLEDIR)/ZeroCrossing.o \
cannam@94 148 $(EXAMPLEDIR)/plugins.o
cannam@94 149
cannam@94 150 PLUGIN_TARGET = \
cannam@94 151 $(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT)
cannam@94 152
cannam@94 153 HOST_HEADERS = \
cannam@94 154 $(HOSTDIR)/system.h
cannam@94 155
cannam@94 156 HOST_OBJECTS = \
cannam@94 157 $(HOSTDIR)/vamp-simple-host.o
cannam@94 158
cannam@94 159 HOST_TARGET = \
cannam@94 160 $(HOSTDIR)/vamp-simple-host
cannam@94 161
cannam@94 162 sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC)
cannam@94 163
cannam@94 164 sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC)
cannam@94 165 $(RANLIB) $(SDK_STATIC)
cannam@94 166 $(RANLIB) $(HOSTSDK_STATIC)
cannam@94 167
cannam@94 168 plugins: $(PLUGIN_TARGET)
cannam@94 169
cannam@94 170 host: $(HOST_TARGET)
cannam@94 171
cannam@94 172 all: sdk plugins host test
cannam@94 173
cannam@94 174 $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
cannam@94 175 $(AR) r $@ $(SDK_OBJECTS)
cannam@94 176
cannam@94 177 $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS)
cannam@94 178 $(AR) r $@ $(HOSTSDK_OBJECTS)
cannam@94 179
cannam@94 180 $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
cannam@94 181 $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS)
cannam@94 182
cannam@94 183 $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS)
cannam@94 184 $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
cannam@94 185
cannam@94 186 $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS)
cannam@94 187 $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
cannam@94 188
cannam@94 189 $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS)
cannam@94 190 $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
cannam@94 191
cannam@94 192 test: plugins host
cannam@94 193 VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l
cannam@94 194
cannam@94 195 clean:
cannam@94 196 rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS)
cannam@94 197
cannam@94 198 distclean: clean
cannam@94 199 rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~
cannam@94 200
cannam@213 201
cannam@213 202 # DO NOT DELETE
cannam@213 203
cannam@213 204 examples/AmplitudeFollower.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 205 examples/AmplitudeFollower.o: vamp-sdk/RealTime.h
cannam@213 206 examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 207 examples/PercussionOnsetDetector.o: vamp-sdk/RealTime.h
cannam@213 208 examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 209 examples/FixedTempoEstimator.o: vamp-sdk/RealTime.h
cannam@213 210 examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h
cannam@213 211 examples/SpectralCentroid.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 212 examples/SpectralCentroid.o: vamp-sdk/RealTime.h
cannam@213 213 examples/ZeroCrossing.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 214 examples/ZeroCrossing.o: vamp-sdk/RealTime.h
cannam@213 215 vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 216 vamp-sdk/PluginAdapter.o: vamp-sdk/RealTime.h
cannam@213 217 vamp-sdk/Plugin.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 218 vamp-sdk/PluginHostAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 219 vamp-sdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
cannam@213 220 examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h
cannam@213 221 examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 222 examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h
cannam@213 223 examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 224 examples/PercussionOnsetDetector.o: vamp-sdk/RealTime.h
cannam@213 225 examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h
cannam@213 226 examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 227 examples/plugins.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
cannam@213 228 examples/plugins.o: examples/SpectralCentroid.h
cannam@213 229 examples/plugins.o: examples/PercussionOnsetDetector.h
cannam@213 230 examples/plugins.o: examples/FixedTempoEstimator.h
cannam@213 231 examples/plugins.o: examples/AmplitudeFollower.h
cannam@213 232 examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h
cannam@213 233 examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 234 examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h
cannam@213 235 examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 236 host/vamp-simple-host.o: vamp-sdk/PluginHostAdapter.h vamp-sdk/Plugin.h
cannam@213 237 host/vamp-simple-host.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h
cannam@213 238 host/vamp-simple-host.o: vamp-sdk/hostext/PluginChannelAdapter.h
cannam@213 239 host/vamp-simple-host.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 240 host/vamp-simple-host.o: vamp-sdk/hostext/PluginInputDomainAdapter.h
cannam@213 241 host/vamp-simple-host.o: vamp-sdk/hostext/PluginLoader.h vamp/vamp.h
cannam@213 242 host/vamp-simple-host.o: host/system.h
cannam@213 243 vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h
cannam@213 244 vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 245 vamp-sdk/PluginAdapter.o: vamp-sdk/RealTime.h
cannam@213 246 vamp-sdk/PluginHostAdapter.o: vamp-sdk/PluginHostAdapter.h vamp/vamp.h
cannam@213 247 vamp-sdk/PluginHostAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 248 vamp-sdk/PluginHostAdapter.o: vamp-sdk/RealTime.h
cannam@213 249 vamp-sdk/RealTime.o: vamp-sdk/RealTime.h
cannam@213 250 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 251 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
cannam@213 252 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
cannam@213 253 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
cannam@213 254 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 255 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/Plugin.h
cannam@213 256 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
cannam@213 257 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/RealTime.h
cannam@213 258 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 259 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
cannam@213 260 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
cannam@213 261 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
cannam@213 262 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 263 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 264 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/RealTime.h
cannam@213 265 vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 266 vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/RealTime.h
cannam@213 267 rdf/generator/template-generator.o: vamp-sdk/PluginHostAdapter.h
cannam@213 268 rdf/generator/template-generator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 269 rdf/generator/template-generator.o: vamp-sdk/RealTime.h
cannam@213 270 rdf/generator/template-generator.o: vamp-sdk/hostext/PluginChannelAdapter.h
cannam@213 271 rdf/generator/template-generator.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 272 rdf/generator/template-generator.o: vamp-sdk/hostext/PluginInputDomainAdapter.h
cannam@213 273 rdf/generator/template-generator.o: vamp-sdk/hostext/PluginLoader.h
cannam@213 274 rdf/generator/template-generator.o: vamp/vamp.h
cannam@213 275 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginBufferingAdapter.h
cannam@213 276 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 277 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/Plugin.h
cannam@213 278 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h
cannam@213 279 vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/RealTime.h
cannam@213 280 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginChannelAdapter.h
cannam@213 281 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 282 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/Plugin.h
cannam@213 283 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/PluginBase.h
cannam@213 284 vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/RealTime.h
cannam@213 285 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginInputDomainAdapter.h
cannam@213 286 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 287 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h
cannam@213 288 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h
cannam@213 289 vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h
cannam@213 290 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/PluginHostAdapter.h
cannam@213 291 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 292 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/RealTime.h
cannam@213 293 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginLoader.h
cannam@213 294 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 295 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginInputDomainAdapter.h
cannam@213 296 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginChannelAdapter.h
cannam@213 297 vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginBufferingAdapter.h
cannam@213 298 vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/hostext/PluginWrapper.h
cannam@213 299 vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h
cannam@213 300 vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/RealTime.h