annotate build/README.osx @ 252:b03f1aefcd6a

* Add configure script
author cannam
date Wed, 12 Nov 2008 09:30:26 +0000
parents cc467e52da4c
children e02c93c4de8f
rev   line source
cannam@239 1
cannam@239 2 The Vamp Plugin SDK -- Platform Notes for OS/X
cannam@239 3 ==============================================
cannam@239 4
cannam@239 5 Building at the command line
cannam@239 6 ----------------------------
cannam@239 7
cannam@239 8 To build the SDK, example plugins, and command-line host:
cannam@239 9
cannam@239 10 $ make -f Makefile.osx
cannam@239 11
cannam@239 12 Note that you must have libsndfile
cannam@239 13 (http://www.mega-nerd.com/libsndfile/) installed in order to build the
cannam@239 14 command-line host successfully. To build only the SDK and examples:
cannam@239 15
cannam@239 16 $ make -f Makefile.osx sdk examples
cannam@239 17
cannam@239 18 If you are using an IDE, you may prefer to simply add the .h and .cpp
cannam@239 19 files in the vamp-sdk and/or vamp-hostsdk directories to your existing
cannam@239 20 project.
cannam@239 21
cannam@239 22
cannam@239 23 Installing the Example Plugins
cannam@239 24 ------------------------------
cannam@239 25
cannam@239 26 To install the example plugins so you can load them in Vamp hosts,
cannam@239 27 copy the files
cannam@239 28
cannam@239 29 examples/vamp-example-plugins.dylib
cannam@239 30 and
cannam@239 31 examples/vamp-example-plugins.cat
cannam@239 32
cannam@239 33 to
cannam@239 34 /Library/Audio/Plug-Ins/Vamp/
cannam@239 35 or
cannam@239 36 $HOME/Library/Audio/Plug-Ins/Vamp/
cannam@239 37
cannam@239 38
cannam@239 39 Plugin Linkage
cannam@239 40 --------------
cannam@239 41
cannam@239 42 Vamp plugins are distributed as dynamic libraries (.dylib). A
cannam@239 43 well-packaged Vamp plugin library should export exactly one public
cannam@239 44 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
cannam@239 45
cannam@239 46 The default for the OS/X linker is to export all of the symbols in the
cannam@239 47 library. This will work (the host will be able to load the plugin),
cannam@239 48 but it unnecessarily pollutes the host's symbol namespace, it may
cannam@239 49 cause symbol collisions in some esoteric circumstances, and it
cannam@239 50 increases the amount of time the plugin takes to load.
cannam@239 51
cannam@239 52 To improve this behaviour, you can instruct the linker to export only
cannam@239 53 the one required symbol using a symbols list file. To do this, place
cannam@239 54 the single line
cannam@239 55
cannam@239 56 _vampGetPluginDescriptor
cannam@239 57
cannam@239 58 (with leading underscore) into a text file, and then use the
cannam@239 59 -exported_symbols_list option to the linker to tell it to refer to
cannam@239 60 this file. All other symbols will then be properly hidden.
cannam@239 61
cannam@239 62 The Makefile.osx included in this SDK uses this method to manage
cannam@239 63 symbol visibility for the included example plugins, using the file
cannam@239 64 build/vamp-plugin.list. There are other methods that will work too,
cannam@239 65 but this one is simple and has the advantage of requiring no changes
cannam@239 66 to the code.
cannam@239 67