Mercurial > hg > vamp-plugin-sdk
changeset 234:7b12c3decc42 distinct-libraries
* install fixes, mostly
author | cannam |
---|---|
date | Fri, 07 Nov 2008 16:39:24 +0000 |
parents | 521734d2b498 |
children | 7739a9ee3fa4 |
files | Makefile pkgconfig/vamp.pc.in src/vamp-hostsdk/PluginHostAdapter.cpp src/vamp-sdk/PluginAdapter.cpp vamp-hostsdk/hostguard.h vamp-sdk/PluginBase.h vamp-sdk/plugguard.h |
diffstat | 7 files changed, 33 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri Nov 07 15:28:33 2008 +0000 +++ b/Makefile Fri Nov 07 16:39:24 2008 +0000 @@ -15,6 +15,7 @@ EXAMPLEDIR = examples HOSTDIR = host PCDIR = pkgconfig +LADIR = build RDFGENDIR = rdf/generator ### @@ -115,7 +116,9 @@ $(SDKDIR)/Plugin.h \ $(SDKDIR)/PluginAdapter.h \ $(SDKDIR)/PluginBase.h \ - $(SDKDIR)/RealTime.h + $(SDKDIR)/RealTime.h \ + $(SDKDIR)/plugguard.h \ + $(SDKDIR)/vamp-sdk.h HOSTSDK_HEADERS = \ $(HOSTSDKDIR)/Plugin.h \ @@ -127,7 +130,9 @@ $(HOSTSDKDIR)/PluginInputDomainAdapter.h \ $(HOSTSDKDIR)/PluginLoader.h \ $(HOSTSDKDIR)/PluginSummarisingAdapter.h \ - $(HOSTSDKDIR)/PluginWrapper.h + $(HOSTSDKDIR)/PluginWrapper.h \ + $(HOSTSDKDIR)/hostguard.h \ + $(HOSTSDKDIR)/vamp-hostsdk.h SDK_OBJECTS = \ $(SDKSRCDIR)/PluginAdapter.o \ @@ -156,10 +161,10 @@ $(SRCDIR)/libvamp-hostsdk$(PLUGIN_EXT) SDK_LA = \ - $(SRCDIR)/libvamp-sdk.la + $(LADIR)/libvamp-sdk.la HOSTSDK_LA = \ - $(SRCDIR)/libvamp-hostsdk.la + $(LADIR)/libvamp-hostsdk.la PLUGIN_HEADERS = \ $(EXAMPLEDIR)/SpectralCentroid.h \ @@ -241,6 +246,7 @@ install: $(SDK_STATIC) $(SDK_DYNAMIC) $(HOSTSDK_STATIC) $(HOSTSDK_DYNAMIC) $(PLUGIN_TARGET) $(HOST_TARGET) mkdir -p $(DESTDIR)$(INSTALL_API_HEADERS) mkdir -p $(DESTDIR)$(INSTALL_SDK_HEADERS) + mkdir -p $(DESTDIR)$(INSTALL_HOSTSDK_HEADERS) mkdir -p $(DESTDIR)$(INSTALL_SDK_LIBS) mkdir -p $(DESTDIR)$(INSTALL_PKGCONFIG) cp $(API_HEADERS) $(DESTDIR)$(INSTALL_API_HEADERS) @@ -258,11 +264,11 @@ ln -s $(INSTALL_SDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_SDK_LINK_DEV) rm -f $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV) ln -s $(INSTALL_HOSTSDK_LIBNAME) $(DESTDIR)$(INSTALL_SDK_LIBS)/$(INSTALL_HOSTSDK_LINK_DEV) - sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(APIDIR)/vamp.pc.in \ + sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp.pc.in \ > $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp.pc - sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(SDKDIR)/vamp-sdk.pc.in \ + sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp-sdk.pc.in \ > $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp-sdk.pc - sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(SDKDIR)/vamp-hostsdk.pc.in \ + sed "s,%PREFIX%,$(INSTALL_PREFIX)," $(PCDIR)/vamp-hostsdk.pc.in \ > $(DESTDIR)$(INSTALL_PKGCONFIG)/vamp-hostsdk.pc sed -e "s,%LIBNAME%,$(INSTALL_SDK_LIBNAME),g" \ -e "s,%LINK_ABI%,$(INSTALL_SDK_LINK_ABI),g" \
--- a/pkgconfig/vamp.pc.in Fri Nov 07 15:28:33 2008 +0000 +++ b/pkgconfig/vamp.pc.in Fri Nov 07 16:39:24 2008 +0000 @@ -4,7 +4,7 @@ includedir=${prefix}/include Name: vamp -Version: 1.0 +Version: 2.0 Description: An API for audio analysis and feature extraction plugins Libs: Cflags: -I${includedir}
--- a/src/vamp-hostsdk/PluginHostAdapter.cpp Fri Nov 07 15:28:33 2008 +0000 +++ b/src/vamp-hostsdk/PluginHostAdapter.cpp Fri Nov 07 16:39:24 2008 +0000 @@ -37,6 +37,10 @@ #include <vamp-hostsdk/PluginHostAdapter.h> #include <cstdlib> +#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 0 ) +#error Incorrect Vamp SDK header included (not the expected 2.0 SDK) +#endif + namespace Vamp {
--- a/src/vamp-sdk/PluginAdapter.cpp Fri Nov 07 15:28:33 2008 +0000 +++ b/src/vamp-sdk/PluginAdapter.cpp Fri Nov 07 16:39:24 2008 +0000 @@ -39,6 +39,11 @@ #include <cstring> #include <cstdlib> +#if ( VAMP_SDK_MAJOR_VERSION != 2 || VAMP_SDK_MINOR_VERSION != 0 ) +#error Incorrect Vamp SDK header included (not the expected 2.0 SDK) +#endif + + //#define DEBUG_PLUGIN_ADAPTER 1 _VAMP_SDK_PLUGSPACE_BEGIN(PluginAdapter.cpp)
--- a/vamp-hostsdk/hostguard.h Fri Nov 07 15:28:33 2008 +0000 +++ b/vamp-hostsdk/hostguard.h Fri Nov 07 16:39:24 2008 +0000 @@ -34,8 +34,8 @@ authorization. */ -#ifndef _VAMP_HOSTSDK_GUARDS_H_ -#define _VAMP_HOSTSDK_GUARDS_H_ +#ifndef _VAMP_HOSTSDK_HOSTGUARD_H_ +#define _VAMP_HOSTSDK_HOSTGUARD_H_ #ifdef _VAMP_IN_PLUGINSDK #error You have included headers from both vamp-sdk and vamp-hostsdk in the same source file. Please include only vamp-sdk headers in plugin code, and only vamp-hostsdk headers in host code.
--- a/vamp-sdk/PluginBase.h Fri Nov 07 15:28:33 2008 +0000 +++ b/vamp-sdk/PluginBase.h Fri Nov 07 16:39:24 2008 +0000 @@ -40,6 +40,10 @@ #include <string> #include <vector> +#define VAMP_SDK_VERSION "2.0" +#define VAMP_SDK_MAJOR_VERSION 2 +#define VAMP_SDK_MINOR_VERSION 0 + #include "plugguard.h" _VAMP_SDK_PLUGSPACE_BEGIN(PluginBase.h)
--- a/vamp-sdk/plugguard.h Fri Nov 07 15:28:33 2008 +0000 +++ b/vamp-sdk/plugguard.h Fri Nov 07 16:39:24 2008 +0000 @@ -34,12 +34,8 @@ authorization. */ -#ifndef _VAMP_SDK_GUARDS_H_ -#define _VAMP_SDK_GUARDS_H_ - -#define VAMP_SDK_VERSION "2.0" -#define VAMP_SDK_MAJOR_VERSION 2 -#define VAMP_SDK_MINOR_VERSION 0 +#ifndef _VAMP_SDK_PLUGGUARD_H_ +#define _VAMP_SDK_PLUGGUARD_H_ /** * Normal usage should be: @@ -67,8 +63,8 @@ * What if the host does include a vamp-sdk header by mistake? We can * catch it if it's included before something from vamp-hostsdk. If * it's included after something from vamp-hostsdk, it will work OK - * anyway. The problem case is where nothing from vamp-hostsdk is - * included in the same file. + * anyway. The remaining problem case is where nothing from + * vamp-hostsdk is included in the same file. We can't catch that. */ #ifdef _VAMP_IN_HOSTSDK