Mercurial > hg > vamp-plugin-sdk
comparison build/README.linux @ 239:cc467e52da4c
* Add platform README files
author | cannam |
---|---|
date | Mon, 10 Nov 2008 12:39:19 +0000 |
parents | |
children | 683f4bc92a69 |
comparison
equal
deleted
inserted
replaced
238:4b5a3031cd08 | 239:cc467e52da4c |
---|---|
1 | |
2 The Vamp Plugin SDK -- Platform Notes for Linux and other GNU platforms | |
3 ======================================================================= | |
4 | |
5 Building at the command line | |
6 ---------------------------- | |
7 | |
8 To build the SDK, example plugins, and command-line host, first edit | |
9 the Makefile to suit your platform according to the comments in it, | |
10 then run "make". | |
11 | |
12 Note that you must have libsndfile | |
13 (http://www.mega-nerd.com/libsndfile/) installed in order to build the | |
14 command-line host successfully. To build only the SDK and examples, | |
15 run "make sdk examples" instead of just "make". | |
16 | |
17 | |
18 Installing the Example Plugins | |
19 ------------------------------ | |
20 | |
21 To install the example plugins so you can load them in Vamp hosts, | |
22 copy the files | |
23 | |
24 examples/vamp-example-plugins.so | |
25 and | |
26 examples/vamp-example-plugins.cat | |
27 | |
28 to | |
29 /usr/local/lib/vamp/ | |
30 or | |
31 $HOME/vamp/ | |
32 | |
33 | |
34 Plugin Linkage | |
35 -------------- | |
36 | |
37 Vamp plugins are distributed as dynamic libraries (.so files). A | |
38 properly packaged Vamp plugin library should export exactly one public | |
39 symbol, namely the Vamp API entry point vampGetPluginDescriptor. | |
40 | |
41 The default for the GNU linker is to export all of the symbols in the | |
42 library. This will work (the host will be able to load the plugin), | |
43 but it unnecessarily pollutes the host's symbol namespace, it may | |
44 cause symbol collisions in some esoteric circumstances, and it | |
45 increases the amount of time the plugin takes to load. | |
46 | |
47 To improve this behaviour, you can instruct the linker to export only | |
48 the one required symbol using a linker script. To do this, place the | |
49 text | |
50 | |
51 { | |
52 global: vampGetPluginDescriptor; | |
53 local: *; | |
54 }; | |
55 | |
56 into a text file, and then use the --version-script option to the | |
57 linker to tell it to refer to this file. All other symbols will then | |
58 be properly hidden. | |
59 | |
60 The Makefile included in this SDK uses this method to manage symbol | |
61 visibility for the included example plugins, using the file | |
62 build/vamp-plugin.map. There are other methods that will work too, | |
63 but this one is simple and has the advantage of requiring no changes | |
64 to the code. | |
65 |