cannam@239: cannam@239: The Vamp Plugin SDK -- Platform Notes for Linux and other GNU platforms cannam@239: ======================================================================= cannam@239: cannam@239: Building at the command line cannam@239: ---------------------------- cannam@239: cannam@239: To build the SDK, example plugins, and command-line host, first edit cannam@239: the Makefile to suit your platform according to the comments in it, cannam@239: then run "make". cannam@239: cannam@239: Note that you must have libsndfile cannam@239: (http://www.mega-nerd.com/libsndfile/) installed in order to build the cannam@239: command-line host successfully. To build only the SDK and examples, cannam@239: run "make sdk examples" instead of just "make". cannam@239: cannam@239: cannam@239: Installing the Example Plugins cannam@239: ------------------------------ cannam@239: cannam@239: To install the example plugins so you can load them in Vamp hosts, cannam@239: copy the files cannam@239: cannam@239: examples/vamp-example-plugins.so cannam@239: and cannam@239: examples/vamp-example-plugins.cat cannam@239: cannam@239: to cannam@239: /usr/local/lib/vamp/ cannam@239: or cannam@239: $HOME/vamp/ cannam@239: cannam@239: cannam@239: Plugin Linkage cannam@239: -------------- cannam@239: cannam@239: Vamp plugins are distributed as dynamic libraries (.so files). A cannam@239: properly packaged Vamp plugin library should export exactly one public cannam@239: symbol, namely the Vamp API entry point vampGetPluginDescriptor. cannam@239: cannam@239: The default for the GNU linker is to export all of the symbols in the cannam@239: library. This will work (the host will be able to load the plugin), cannam@239: but it unnecessarily pollutes the host's symbol namespace, it may cannam@239: cause symbol collisions in some esoteric circumstances, and it cannam@239: increases the amount of time the plugin takes to load. cannam@239: cannam@239: To improve this behaviour, you can instruct the linker to export only cannam@239: the one required symbol using a linker script. To do this, place the cannam@239: text cannam@239: cannam@239: { cannam@239: global: vampGetPluginDescriptor; cannam@239: local: *; cannam@239: }; cannam@239: cannam@239: into a text file, and then use the --version-script option to the cannam@239: linker to tell it to refer to this file. All other symbols will then cannam@239: be properly hidden. cannam@239: cannam@239: The Makefile included in this SDK uses this method to manage symbol cannam@239: visibility for the included example plugins, using the file cannam@239: build/vamp-plugin.map. There are other methods that will work too, cannam@239: but this one is simple and has the advantage of requiring no changes cannam@239: to the code. cannam@239: