Files
strongswan-ext/src/libtpmtss/Makefile.am
T
Tobias Brunner 4a0b6d659d 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.
2017-05-23 18:29:12 +02:00

53 lines
1.0 KiB
Makefile

AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan
AM_CFLAGS = \
$(tss2_CFLAGS)
AM_LDFLAGS = \
-no-undefined
ipseclib_LTLIBRARIES = libtpmtss.la
libtpmtss_la_LIBADD = \
$(top_builddir)/src/libstrongswan/libstrongswan.la
if USE_TSS2
libtpmtss_la_LIBADD += $(tss2_LIBS)
endif
if USE_TROUSERS
libtpmtss_la_LIBADD += -ltspi
endif
libtpmtss_la_SOURCES = \
tpm_tss.h tpm_tss.c \
tpm_tss_quote_info.h tpm_tss_quote_info.c \
tpm_tss_trousers.h tpm_tss_trousers.c \
tpm_tss_tss2.h tpm_tss_tss2.c \
tpm_tss_tss2_names.h tpm_tss_tss2_names.c
if MONOLITHIC
SUBDIRS =
else
SUBDIRS = .
endif
if STATIC_PLUGIN_CONSTRUCTORS
BUILT_SOURCES = $(srcdir)/plugin_constructors.c
CLEANFILES = $(srcdir)/plugin_constructors.c
$(srcdir)/plugin_constructors.c: $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py
$(AM_V_GEN) \
$(PYTHON) $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py ${p_plugins} > $@
endif
if USE_TPM
SUBDIRS += plugins/tpm
if MONOLITHIC
libtpmtss_la_LIBADD += plugins/tpm/libstrongswan-tpm.la
endif
endif