cannam@94: cannam@94: # Makefile for the Vamp plugin SDK. This builds the SDK objects, cannam@94: # libraries, example plugins, and the test host. Please adjust to cannam@94: # suit your operating system requirements. cannam@94: # cannam@94: # This version of the Makefile is approximately correct for OS/X. cannam@94: # Note that it has no "install" target; the following are the cannam@94: # library and related files that may be of interest resulting from cannam@94: # the build: cannam@94: # cannam@94: # vamp-sdk/libvamp-sdk.dylib [SDK dynamic library for plugins] cannam@94: # vamp-sdk/libvamp-hostsdk.dylib [SDK dynamic library for hosts] cannam@94: # cannam@94: # vamp-sdk/libvamp-sdk.a [SDK static library for plugins] cannam@94: # vamp-sdk/libvamp-hostsdk.a [SDK static library for hosts] cannam@94: # cannam@94: # examples/vamp-example-plugins.cat [copy this to your Vamp plugin dir] cannam@94: # examples/vamp-example-plugins.dylib [copy this to your Vamp plugin dir] cannam@94: # cannam@94: # host/vamp-simple-host [requires libsndfile to build] cannam@94: cannam@94: APIDIR = vamp cannam@94: SDKDIR = vamp-sdk cannam@94: HOSTEXTDIR = vamp-sdk/hostext cannam@94: EXAMPLEDIR = examples cannam@94: HOSTDIR = host cannam@94: cannam@94: ### cannam@94: ### Start of user-serviceable parts cannam@94: ### cannam@94: cannam@94: # Default build target (or use "make " to select one). cannam@94: # Targets are: cannam@94: # all -- build everything cannam@94: # sdk -- build all the Vamp SDK libraries for plugins and hosts cannam@94: # sdkstatic -- build only the static versions of the SDK libraries cannam@94: # plugins -- build the example plugins (and the SDK if required) cannam@94: # host -- build the simple Vamp plugin host (and the SDK if required) cannam@94: # test -- build the host and example plugins, and run a quick test cannam@94: # clean -- remove binary targets cannam@94: # distclean -- remove all targets cannam@94: # cannam@94: default: all cannam@94: cannam@94: # Compile flags cannam@94: # cannam@163: CXXFLAGS := $(CXXFLAGS) -O2 -Wall -I. -fPIC cannam@94: cannam@94: # ar, ranlib cannam@94: # cannam@94: AR := ar cannam@94: RANLIB := ranlib cannam@94: cannam@94: # Libraries required for the plugins. cannam@94: # (Note that it is desirable to statically link libstdc++ if possible, cannam@94: # because our plugin exposes only a C API so there are no boundary cannam@94: # compatibility problems.) cannam@94: # cannam@94: PLUGIN_LIBS = $(SDKDIR)/libvamp-sdk.a cannam@94: cannam@94: # File extension for a dynamically loadable object cannam@94: # cannam@94: PLUGIN_EXT = .dylib cannam@94: cannam@94: # Libraries required for the host. cannam@94: # cannam@163: HOST_LIBS = $(SDKDIR)/libvamp-hostsdk.a -lsndfile -ldl cannam@94: cannam@94: # Flags required to tell the compiler to create a dynamically loadable object cannam@94: # cannam@163: DYNAMIC_LDFLAGS = -dynamiclib cannam@128: PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name vamp-example-plugins.dylib cannam@128: SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-sdk.dylib cannam@128: HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) -install_name libvamp-hostsdk.dylib cannam@94: cannam@94: cannam@94: ### End of user-serviceable parts cannam@94: cannam@94: cannam@94: API_HEADERS = \ cannam@94: $(APIDIR)/vamp.h cannam@94: cannam@94: SDK_HEADERS = \ cannam@94: $(SDKDIR)/Plugin.h \ cannam@94: $(SDKDIR)/PluginAdapter.h \ cannam@94: $(SDKDIR)/PluginBase.h \ cannam@94: $(SDKDIR)/RealTime.h cannam@94: cannam@94: HOSTSDK_HEADERS = \ cannam@94: $(SDKDIR)/Plugin.h \ cannam@94: $(SDKDIR)/PluginBase.h \ cannam@94: $(SDKDIR)/PluginHostAdapter.h \ cannam@94: $(SDKDIR)/RealTime.h cannam@94: cannam@94: HOSTEXT_HEADERS = \ cannam@94: $(HOSTEXTDIR)/PluginBufferingAdapter.h \ cannam@94: $(HOSTEXTDIR)/PluginChannelAdapter.h \ cannam@94: $(HOSTEXTDIR)/PluginInputDomainAdapter.h \ cannam@94: $(HOSTEXTDIR)/PluginLoader.h \ cannam@213: $(HOSTEXTDIR)/PluginSummarisingAdapter.h \ cannam@94: $(HOSTEXTDIR)/PluginWrapper.h cannam@94: cannam@94: SDK_OBJECTS = \ cannam@94: $(SDKDIR)/PluginAdapter.o \ cannam@94: $(SDKDIR)/RealTime.o cannam@94: cannam@94: HOSTSDK_OBJECTS = \ cannam@94: $(SDKDIR)/PluginHostAdapter.o \ cannam@94: $(HOSTEXTDIR)/PluginBufferingAdapter.o \ cannam@94: $(HOSTEXTDIR)/PluginChannelAdapter.o \ cannam@94: $(HOSTEXTDIR)/PluginInputDomainAdapter.o \ cannam@94: $(HOSTEXTDIR)/PluginLoader.o \ cannam@213: $(HOSTEXTDIR)/PluginSummarisingAdapter.o \ cannam@94: $(HOSTEXTDIR)/PluginWrapper.o \ cannam@94: $(SDKDIR)/RealTime.o cannam@94: cannam@94: SDK_STATIC = \ cannam@94: $(SDKDIR)/libvamp-sdk.a cannam@94: cannam@94: HOSTSDK_STATIC = \ cannam@94: $(SDKDIR)/libvamp-hostsdk.a cannam@94: cannam@94: SDK_DYNAMIC = \ cannam@94: $(SDKDIR)/libvamp-sdk$(PLUGIN_EXT) cannam@94: cannam@94: HOSTSDK_DYNAMIC = \ cannam@94: $(SDKDIR)/libvamp-hostsdk$(PLUGIN_EXT) cannam@94: cannam@94: SDK_LA = \ cannam@94: $(SDKDIR)/libvamp-sdk.la cannam@94: cannam@94: HOSTSDK_LA = \ cannam@94: $(SDKDIR)/libvamp-hostsdk.la cannam@94: cannam@94: PLUGIN_HEADERS = \ cannam@94: $(EXAMPLEDIR)/SpectralCentroid.h \ cannam@94: $(EXAMPLEDIR)/PercussionOnsetDetector.h \ cannam@213: $(EXAMPLEDIR)/FixedTempoEstimator.h \ cannam@94: $(EXAMPLEDIR)/AmplitudeFollower.h \ cannam@94: $(EXAMPLEDIR)/ZeroCrossing.h cannam@94: cannam@94: PLUGIN_OBJECTS = \ cannam@94: $(EXAMPLEDIR)/SpectralCentroid.o \ cannam@94: $(EXAMPLEDIR)/PercussionOnsetDetector.o \ cannam@213: $(EXAMPLEDIR)/FixedTempoEstimator.o \ cannam@94: $(EXAMPLEDIR)/AmplitudeFollower.o \ cannam@94: $(EXAMPLEDIR)/ZeroCrossing.o \ cannam@94: $(EXAMPLEDIR)/plugins.o cannam@94: cannam@94: PLUGIN_TARGET = \ cannam@94: $(EXAMPLEDIR)/vamp-example-plugins$(PLUGIN_EXT) cannam@94: cannam@94: HOST_HEADERS = \ cannam@94: $(HOSTDIR)/system.h cannam@94: cannam@94: HOST_OBJECTS = \ cannam@94: $(HOSTDIR)/vamp-simple-host.o cannam@94: cannam@94: HOST_TARGET = \ cannam@94: $(HOSTDIR)/vamp-simple-host cannam@94: cannam@94: sdk: sdkstatic $(SDK_DYNAMIC) $(HOSTSDK_DYNAMIC) cannam@94: cannam@94: sdkstatic: $(SDK_STATIC) $(HOSTSDK_STATIC) cannam@94: $(RANLIB) $(SDK_STATIC) cannam@94: $(RANLIB) $(HOSTSDK_STATIC) cannam@94: cannam@94: plugins: $(PLUGIN_TARGET) cannam@94: cannam@94: host: $(HOST_TARGET) cannam@94: cannam@94: all: sdk plugins host test cannam@94: cannam@94: $(SDK_STATIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS) cannam@94: $(AR) r $@ $(SDK_OBJECTS) cannam@94: cannam@94: $(HOSTSDK_STATIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS) cannam@94: $(AR) r $@ $(HOSTSDK_OBJECTS) cannam@94: cannam@94: $(SDK_DYNAMIC): $(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS) cannam@94: $(CXX) $(LDFLAGS) $(SDK_DYNAMIC_LDFLAGS) -o $@ $(SDK_OBJECTS) cannam@94: cannam@94: $(HOSTSDK_DYNAMIC): $(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS) $(HOSTEXT_HEADERS) cannam@94: $(CXX) $(LDFLAGS) $(HOSTSDK_DYNAMIC_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS) cannam@94: cannam@94: $(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(SDK_STATIC) $(PLUGIN_HEADERS) cannam@94: $(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS) cannam@94: cannam@94: $(HOST_TARGET): $(HOST_OBJECTS) $(HOSTSDK_STATIC) $(HOST_HEADERS) cannam@94: $(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS) cannam@94: cannam@94: test: plugins host cannam@94: VAMP_PATH=$(EXAMPLEDIR) $(HOST_TARGET) -l cannam@94: cannam@94: clean: cannam@94: rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS) cannam@94: cannam@94: distclean: clean cannam@94: rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~ cannam@94: cannam@213: cannam@213: # DO NOT DELETE cannam@213: cannam@213: examples/AmplitudeFollower.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/AmplitudeFollower.o: vamp-sdk/RealTime.h cannam@213: examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/PercussionOnsetDetector.o: vamp-sdk/RealTime.h cannam@213: examples/FixedTempoEstimator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/FixedTempoEstimator.o: vamp-sdk/RealTime.h cannam@213: examples/FixedTempoEstimator.o: examples/FixedTempoEstimator.h cannam@213: examples/SpectralCentroid.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/SpectralCentroid.o: vamp-sdk/RealTime.h cannam@213: examples/ZeroCrossing.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/ZeroCrossing.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/PluginAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/Plugin.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: vamp-sdk/PluginHostAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/PluginHostAdapter.o: vamp-sdk/RealTime.h cannam@213: examples/AmplitudeFollower.o: examples/AmplitudeFollower.h vamp-sdk/Plugin.h cannam@213: examples/AmplitudeFollower.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: examples/PercussionOnsetDetector.o: examples/PercussionOnsetDetector.h cannam@213: examples/PercussionOnsetDetector.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: examples/PercussionOnsetDetector.o: vamp-sdk/RealTime.h cannam@213: examples/plugins.o: vamp/vamp.h vamp-sdk/PluginAdapter.h vamp-sdk/Plugin.h cannam@213: examples/plugins.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: examples/plugins.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h cannam@213: examples/plugins.o: examples/SpectralCentroid.h cannam@213: examples/plugins.o: examples/PercussionOnsetDetector.h cannam@213: examples/plugins.o: examples/FixedTempoEstimator.h cannam@213: examples/plugins.o: examples/AmplitudeFollower.h cannam@213: examples/SpectralCentroid.o: examples/SpectralCentroid.h vamp-sdk/Plugin.h cannam@213: examples/SpectralCentroid.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: examples/ZeroCrossing.o: examples/ZeroCrossing.h vamp-sdk/Plugin.h cannam@213: examples/ZeroCrossing.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: host/vamp-simple-host.o: vamp-sdk/PluginHostAdapter.h vamp-sdk/Plugin.h cannam@213: host/vamp-simple-host.o: vamp-sdk/PluginBase.h vamp-sdk/RealTime.h cannam@213: host/vamp-simple-host.o: vamp-sdk/hostext/PluginChannelAdapter.h cannam@213: host/vamp-simple-host.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: host/vamp-simple-host.o: vamp-sdk/hostext/PluginInputDomainAdapter.h cannam@213: host/vamp-simple-host.o: vamp-sdk/hostext/PluginLoader.h vamp/vamp.h cannam@213: host/vamp-simple-host.o: host/system.h cannam@213: vamp-sdk/PluginAdapter.o: vamp-sdk/PluginAdapter.h vamp/vamp.h cannam@213: vamp-sdk/PluginAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/PluginAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/PluginHostAdapter.o: vamp-sdk/PluginHostAdapter.h vamp/vamp.h cannam@213: vamp-sdk/PluginHostAdapter.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/PluginHostAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/RealTime.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/RealTime.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/PluginHostAdapter.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/RealTime.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/hostext/PluginChannelAdapter.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/hostext/PluginInputDomainAdapter.h cannam@213: rdf/generator/template-generator.o: vamp-sdk/hostext/PluginLoader.h cannam@213: rdf/generator/template-generator.o: vamp/vamp.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginBufferingAdapter.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginBufferingAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginChannelAdapter.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginChannelAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginInputDomainAdapter.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/Plugin.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginInputDomainAdapter.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/PluginHostAdapter.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/RealTime.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginLoader.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginInputDomainAdapter.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginChannelAdapter.h cannam@213: vamp-sdk/hostext/PluginLoader.o: vamp-sdk/hostext/PluginBufferingAdapter.h cannam@213: vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/hostext/PluginWrapper.h cannam@213: vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/Plugin.h vamp-sdk/PluginBase.h cannam@213: vamp-sdk/hostext/PluginWrapper.o: vamp-sdk/RealTime.h