changeset 51:2403ae53b8a5 vamp-plugin-sdk-v1.0pre1

* Split out the host adapter code into a separate host sdk library. Plugins link against libvamp-sdk, hosts against libvamp-hostsdk.
author cannam
date Fri, 02 Mar 2007 12:26:53 +0000
parents b907557b2fb9
children d3995d2b5e08
files Makefile README vamp-sdk/libvamp-sdk.la.in vamp-sdk/vamp-hostsdk.pc.in vamp-sdk/vamp-sdk.pc.in vamp/vamp.pc.in
diffstat 6 files changed, 81 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Feb 27 12:48:17 2007 +0000
+++ b/Makefile	Fri Mar 02 12:26:53 2007 +0000
@@ -1,7 +1,7 @@
 
 # Makefile for the Vamp plugin SDK.  This builds the SDK objects,
-# example plugins, and the test host.  Please adjust to suit your
-# operating system requirements.
+# libraries, example plugins, and the test host.  Please adjust to
+# suit your operating system requirements.
 
 SDKDIR		= vamp-sdk
 APIDIR		= vamp
@@ -15,25 +15,32 @@
 # editing for non-Linux platforms.  Of course you don't necessarily
 # have to use "make install".
 #
-INSTALL_PREFIX		:= /usr/local
-INSTALL_API_HEADERS	:= $(INSTALL_PREFIX)/include/vamp
-INSTALL_SDK_HEADERS	:= $(INSTALL_PREFIX)/include/vamp-sdk
-INSTALL_SDK_LIBS	:= $(INSTALL_PREFIX)/lib
-INSTALL_SDK_LIBNAME	:= libvamp-sdk.so.0.0.5
-INSTALL_SDK_LINK_ABI	:= libvamp-sdk.so.0
-INSTALL_SDK_LINK_DEV	:= libvamp-sdk.so
-INSTALL_SDK_STATIC      := libvamp-sdk.a
-INSTALL_SDK_LA          := libvamp-sdk.la
-INSTALL_PKGCONFIG	:= $(INSTALL_PREFIX)/lib/pkgconfig
+INSTALL_PREFIX	 	  := /usr/local
+INSTALL_API_HEADERS	  := $(INSTALL_PREFIX)/include/vamp
+INSTALL_SDK_HEADERS	  := $(INSTALL_PREFIX)/include/vamp-sdk
+INSTALL_SDK_LIBS	  := $(INSTALL_PREFIX)/lib
+
+INSTALL_SDK_LIBNAME	  := libvamp-sdk.so.1.0.0
+INSTALL_SDK_LINK_ABI	  := libvamp-sdk.so.1
+INSTALL_SDK_LINK_DEV	  := libvamp-sdk.so
+INSTALL_SDK_STATIC        := libvamp-sdk.a
+INSTALL_SDK_LA            := libvamp-sdk.la
+
+INSTALL_HOSTSDK_LIBNAME   := libvamp-hostsdk.so.1.0.0
+INSTALL_HOSTSDK_LINK_ABI  := libvamp-hostsdk.so.1
+INSTALL_HOSTSDK_LINK_DEV  := libvamp-hostsdk.so
+INSTALL_HOSTSDK_STATIC    := libvamp-hostsdk.a
+INSTALL_HOSTSDK_LA        := libvamp-hostsdk.la
+
+INSTALL_PKGCONFIG	  := $(INSTALL_PREFIX)/lib/pkgconfig
 
 # Compile flags
 #
 CXXFLAGS	:= $(CXXFLAGS) -O2 -Wall -I$(SDKDIR) -I$(APIDIR) -I.
-#CXXFLAGS	:= $(CXXFLAGS) -g -Wall -I$(SDKDIR) -I$(APIDIR) -I.
 
 # Libraries required for the host at link time
 #
-HOST_LIBS	= vamp-sdk/libvamp-sdk.a -lsndfile -ldl
+HOST_LIBS	= vamp-sdk/libvamp-hostsdk.a -lsndfile -ldl
 
 # Libraries required for the plugin.  Note that we can (and actively
 # want to) statically link libstdc++, because our plugin exposes only
@@ -64,20 +71,34 @@
 		$(SDKDIR)/Plugin.h \
 		$(SDKDIR)/PluginAdapter.h \
 		$(SDKDIR)/PluginBase.h \
+		$(SDKDIR)/RealTime.h
+
+HOSTSDK_HEADERS	= \
+		$(SDKDIR)/Plugin.h \
+		$(SDKDIR)/PluginBase.h \
 		$(SDKDIR)/PluginHostAdapter.h \
 		$(SDKDIR)/RealTime.h
 
 SDK_OBJECTS	= \
 		$(SDKDIR)/PluginAdapter.o \
+		$(SDKDIR)/RealTime.o
+
+HOSTSDK_OBJECTS	= \
 		$(SDKDIR)/PluginHostAdapter.o \
 		$(SDKDIR)/RealTime.o
 
 SDK_STATIC	= \
 		$(SDKDIR)/libvamp-sdk.a
 
+HOSTSDK_STATIC	= \
+		$(SDKDIR)/libvamp-hostsdk.a
+
 SDK_DYNAMIC	= \
 		$(SDKDIR)/libvamp-sdk.so
 
+HOSTSDK_DYNAMIC	= \
+		$(SDKDIR)/libvamp-hostsdk.so
+
 SDK_LA		= \
 		$(SDKDIR)/libvamp-sdk.la
 
@@ -106,49 +127,71 @@
 HOST_TARGET	= \
 		$(HOSTDIR)/vamp-simple-host
 
-all:		$(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) test
+all:		$(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) test
 
 $(SDK_STATIC):	$(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
 		$(AR) r $@ $(SDK_OBJECTS)
 
+$(HOSTSDK_STATIC):	$(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
+		$(AR) r $@ $(HOSTSDK_OBJECTS)
+
 $(SDK_DYNAMIC):	$(SDK_OBJECTS) $(API_HEADERS) $(SDK_HEADERS)
 		$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(SDK_OBJECTS)
 
+$(HOSTSDK_DYNAMIC):	$(HOSTSDK_OBJECTS) $(API_HEADERS) $(HOSTSDK_HEADERS)
+		$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(HOSTSDK_OBJECTS)
+
 $(PLUGIN_TARGET):	$(PLUGIN_OBJECTS) $(SDK_TARGET) $(PLUGIN_HEADERS)
 		$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
 
-$(HOST_TARGET):	$(HOST_OBJECTS) $(SDK_TARGET) $(HOST_HEADERS)
+$(HOST_TARGET):	$(HOST_OBJECTS) $(HOSTSDK_TARGET) $(HOST_HEADERS)
 		$(CXX) $(LDFLAGS) $(HOST_LDFLAGS) -o $@ $(HOST_OBJECTS) $(HOST_LIBS)
 
 test:		$(HOST_TARGET) $(PLUGIN_TARGET)
 		$(HOST_TARGET) $(PLUGIN_TARGET)
 
 clean:		
-		rm -f $(SDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS)
+		rm -f $(SDK_OBJECTS) $(HOSTSDK_OBJECTS) $(PLUGIN_OBJECTS) $(HOST_OBJECTS)
 
 distclean:	clean
-		rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~
+		rm -f $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) *~ */*~
 
-install:	$(SDK_STATIC) $(SDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET)
+install:	$(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET)
 		mkdir -p $(INSTALL_API_HEADERS)
 		mkdir -p $(INSTALL_SDK_HEADERS)
 		mkdir -p $(INSTALL_SDK_LIBS)
 		mkdir -p $(INSTALL_PKGCONFIG)
 		cp $(API_HEADERS) $(INSTALL_API_HEADERS)
 		cp $(SDK_HEADERS) $(INSTALL_SDK_HEADERS)
+		cp $(HOSTSDK_HEADERS) $(INSTALL_SDK_HEADERS)
 		cp $(SDK_STATIC) $(INSTALL_SDK_LIBS)
+		cp $(HOSTSDK_STATIC) $(INSTALL_SDK_LIBS)
 		cp $(SDK_DYNAMIC) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LIBNAME)
+		cp $(HOSTSDK_DYNAMIC) $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LIBNAME)
 		rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI)
 		ln -s $(INSTALL_SDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_ABI)
+		rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_ABI)
+		ln -s $(INSTALL_HOSTSDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_ABI)
 		rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV)
 		ln -s $(INSTALL_SDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV)
+		rm -f $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV)
+		ln -s $(INSTALL_HOSTSDK_LIBNAME) $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV)
 		sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(APIDIR)/vamp.pc.in \
 		> $(INSTALL_PKGCONFIG)/vamp.pc
 		sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(SDKDIR)/vamp-sdk.pc.in \
 		> $(INSTALL_PKGCONFIG)/vamp-sdk.pc
+		sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(SDKDIR)/vamp-hostsdk.pc.in \
+		> $(INSTALL_PKGCONFIG)/vamp-hostsdk.pc
 		sed -e "s,%LIBNAME%,$(INSTALL_SDK_LIBNAME),g" \
 		    -e "s,%LINK_ABI%,$(INSTALL_SDK_LINK_ABI),g" \
 		    -e "s,%LINK_DEV%,$(INSTALL_SDK_LINK_DEV),g" \
 		    -e "s,%STATIC%,$(INSTALL_SDK_STATIC),g" \
 		    -e "s,%LIBS%,$(INSTALL_SDK_LIBS),g" $(SDK_LA).in \
 		> $(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LA)
+		sed -e "s,%LIBNAME%,$(INSTALL_HOSTSDK_LIBNAME),g" \
+		    -e "s,%LINK_ABI%,$(INSTALL_HOSTSDK_LINK_ABI),g" \
+		    -e "s,%LINK_DEV%,$(INSTALL_HOSTSDK_LINK_DEV),g" \
+		    -e "s,%STATIC%,$(INSTALL_HOSTSDK_STATIC),g" \
+		    -e "s,%LIBS%,$(INSTALL_SDK_LIBS),g" $(SDK_LA).in \
+		> $(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LA)
+
--- a/README	Tue Feb 27 12:48:17 2007 +0000
+++ b/README	Fri Mar 02 12:26:53 2007 +0000
@@ -70,10 +70,12 @@
 
 Plugins should subclass Vamp::Plugin and then use a
 Vamp::PluginAdapter to expose the correct C API for the plugin.  Read
-vamp-sdk/PluginBase.h and Plugin.h for code documentation.
+vamp-sdk/PluginBase.h and Plugin.h for code documentation.  Plugins
+should link with -lvamp-sdk.
 
 Hosts may use the Vamp::PluginHostAdapter to convert the loaded
-plugin's C API back into a Vamp::Plugin object.
+plugin's C API back into a Vamp::Plugin object.  Hosts should link
+with -lvamp-hostsdk.
 
  * examples
 
--- a/vamp-sdk/libvamp-sdk.la.in	Tue Feb 27 12:48:17 2007 +0000
+++ b/vamp-sdk/libvamp-sdk.la.in	Fri Mar 02 12:26:53 2007 +0000
@@ -2,8 +2,8 @@
 library_names='%LIBNAME% %LINK_ABI% %LINK_DEV%'
 old_library='%STATIC%'
 dependency_libs=''
-current=0
+current=1
 age=0
-revision=5
+revision=0
 installed=yes
 libdir='%LIBS%'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vamp-sdk/vamp-hostsdk.pc.in	Fri Mar 02 12:26:53 2007 +0000
@@ -0,0 +1,10 @@
+prefix=%PREFIX%
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: vamp-hostsdk
+Version: 1.0.0
+Description: Development library for Vamp audio analysis plugin hosts
+Libs: -L${libdir} -lvamp-hostsdk
+Cflags: -I${includedir} 
--- a/vamp-sdk/vamp-sdk.pc.in	Tue Feb 27 12:48:17 2007 +0000
+++ b/vamp-sdk/vamp-sdk.pc.in	Fri Mar 02 12:26:53 2007 +0000
@@ -4,7 +4,7 @@
 includedir=${prefix}/include
 
 Name: vamp-sdk
-Version: 0.9.5
-Description: Development libraries for Vamp audio analysis plugin API
+Version: 1.0.0
+Description: Development library for Vamp audio analysis plugins
 Libs: -L${libdir} -lvamp-sdk
 Cflags: -I${includedir} 
--- a/vamp/vamp.pc.in	Tue Feb 27 12:48:17 2007 +0000
+++ b/vamp/vamp.pc.in	Fri Mar 02 12:26:53 2007 +0000
@@ -4,7 +4,7 @@
 includedir=${prefix}/include
 
 Name: vamp
-Version: 0.9
+Version: 1.0
 Description: An API for audio analysis and feature extraction plugins
 Libs: 
 Cflags: -I${includedir}