Add plugin constructor registration for all libraries that provide plugins
[strongswan.git] / src / libtpmtss / Makefile.am
1 AM_CPPFLAGS = \
2         -I$(top_srcdir)/src/libstrongswan
3
4 AM_CFLAGS = \
5         $(tss2_CFLAGS)
6
7 AM_LDFLAGS = \
8         -no-undefined
9
10 ipseclib_LTLIBRARIES = libtpmtss.la
11
12 libtpmtss_la_LIBADD = \
13         $(top_builddir)/src/libstrongswan/libstrongswan.la
14
15 if USE_TSS2
16 libtpmtss_la_LIBADD += $(tss2_LIBS)
17 endif
18
19 if USE_TROUSERS
20 libtpmtss_la_LIBADD += -ltspi
21 endif
22
23 libtpmtss_la_SOURCES = \
24         tpm_tss.h tpm_tss.c \
25         tpm_tss_quote_info.h tpm_tss_quote_info.c \
26         tpm_tss_trousers.h tpm_tss_trousers.c \
27         tpm_tss_tss2.h tpm_tss_tss2.c \
28         tpm_tss_tss2_names.h tpm_tss_tss2_names.c
29
30 if MONOLITHIC
31 SUBDIRS =
32 else
33 SUBDIRS = .
34 endif
35
36 if STATIC_PLUGIN_CONSTRUCTORS
37 BUILT_SOURCES = $(srcdir)/plugin_constructors.c
38 CLEANFILES = $(srcdir)/plugin_constructors.c
39
40 $(srcdir)/plugin_constructors.c: $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py
41                 $(AM_V_GEN) \
42                 $(PYTHON) $(top_srcdir)/src/libstrongswan/plugins/plugin_constructors.py ${p_plugins} > $@
43 endif
44
45 if USE_TPM
46   SUBDIRS += plugins/tpm
47 if MONOLITHIC
48   libtpmtss_la_LIBADD += plugins/tpm/libstrongswan-tpm.la
49 endif
50 endif
51
52