Add plugin constructor registration for all libraries that provide plugins
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Apr 2017 15:49:50 +0000 (17:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 23 May 2017 16:29:12 +0000 (18:29 +0200)
commit4a0b6d659d2fb0473b75cf53bb1a0934983d270c
treedfe74308338c55e470c99af6221ee2f3193c6e3a
parent8699275ed6954037f598a1824319f2cdf9deb4b1
Add plugin constructor registration for all libraries that provide plugins

Unfortunately, we can't just add the generated C file to the sources in
Makefile.am as the linker would remove that object file when it notices
that no symbol in it is ever referenced.  So we include it in the file
that contains the library initialization, which will definitely be
referenced by the executable.

This allows building an almost stand-alone static version of e.g. charon
when building with `--enable-monolithic --enable-static --disable-shared`
(without `--disable-shared` libtool will only build a version that links
the libraries dynamically).  External libraries (e.g. gmp or openssl) are
not linked statically this way, though.
.gitignore
src/libcharon/Makefile.am
src/libcharon/daemon.c
src/libstrongswan/Makefile.am
src/libstrongswan/library.c
src/libtnccs/Makefile.am
src/libtnccs/tnc/tnc.c
src/libtpmtss/Makefile.am
src/libtpmtss/tpm_tss.c