libtpmtss: Added to integrity checks
[strongswan.git] / src / checksum / Makefile.am
1 # this lib is not built until make install is called (see rules at the bottom)
2 EXTRA_LTLIBRARIES = libchecksum.la
3 ipseclib_LTLIBRARIES = $(LIBCHECKSUM_LIBS)
4 nodist_libchecksum_la_SOURCES = checksum.c
5 libchecksum_la_LDFLAGS = -module -avoid-version -rpath '$(ipseclibdir)'
6
7 EXTRA_PROGRAMS = checksum_builder
8 checksum_builder_SOURCES = checksum_builder.c
9 checksum_builder_LDADD = \
10         $(top_builddir)/src/libstrongswan/libstrongswan.la \
11         $(top_builddir)/src/libcharon/libcharon.la \
12         $(DLLIB)
13 checksum_builder_LDFLAGS = -rpath '$(DESTDIR)$(ipseclibdir)'
14
15 CLEANFILES = checksum.c $(EXTRA_PROGRAMS)
16
17 AM_CPPFLAGS = \
18         -I$(top_srcdir)/src/libstrongswan \
19         -I$(top_srcdir)/src/libcharon \
20         -DPLUGINDIR=\"${DESTDIR}${plugindir}\"
21
22 AM_CFLAGS = \
23         $(PLUGIN_CFLAGS)
24
25 # we keep track of build dependencies in deps and use libs to store the paths
26 # to the installed libraries. for executables we use the built files directly
27 # as these are not relinked during installation.
28 deps = $(top_builddir)/src/libstrongswan/libstrongswan.la
29 libs = $(DESTDIR)$(ipseclibdir)/libstrongswan.so
30 exes =
31
32 if !MONOLITHIC
33   AM_CPPFLAGS += -DS_PLUGINS=\""${s_plugins}\""
34 endif
35
36 if USE_LIBIPSEC
37   deps += $(top_builddir)/src/libipsec/libipsec.la
38   libs += $(DESTDIR)$(ipseclibdir)/libipsec.so
39 endif
40
41 if USE_TLS
42   deps += $(top_builddir)/src/libtls/libtls.la
43   libs += $(DESTDIR)$(ipseclibdir)/libtls.so
44 endif
45
46 if USE_RADIUS
47   deps += $(top_builddir)/src/libradius/libradius.la
48   libs += $(DESTDIR)$(ipseclibdir)/libradius.so
49 endif
50
51 if USE_LIBPTTLS
52   deps += $(top_builddir)/src/libpttls/libpttls.la
53   libs += $(DESTDIR)$(ipseclibdir)/libpttls.so
54 endif
55
56 if USE_LIBTPMTSS
57   deps += $(top_builddir)/src/libtpmtss/libtpmtss.la
58   libs += $(DESTDIR)$(ipseclibdir)/libtpmtss.so
59 endif
60
61 if USE_LIBTNCCS
62   deps += $(top_builddir)/src/libtnccs/libtnccs.la
63   libs += $(DESTDIR)$(ipseclibdir)/libtnccs.so
64 if !MONOLITHIC
65   AM_CPPFLAGS += -DT_PLUGINS=\""${t_plugins}\""
66 endif
67 endif
68
69 if USE_SIMAKA
70   deps += $(top_builddir)/src/libsimaka/libsimaka.la
71   libs += $(DESTDIR)$(ipseclibdir)/libsimaka.so
72 endif
73
74 if USE_IMCV
75   deps += $(top_builddir)/src/libimcv/libimcv.la
76   libs += $(DESTDIR)$(ipseclibdir)/libimcv.so
77 endif
78
79 if USE_CHARON
80   deps += $(top_builddir)/src/libcharon/libcharon.la
81   libs += $(DESTDIR)$(ipseclibdir)/libcharon.so
82   exes += $(DESTDIR)$(ipsecdir)/charon
83 if !MONOLITHIC
84   AM_CPPFLAGS += -DC_PLUGINS=\""${c_plugins}\""
85 endif
86 endif
87
88 if USE_CMD
89   exes += $(DESTDIR)$(sbindir)/charon-cmd
90 endif
91
92 if USE_SCEPCLIENT
93   exes += $(DESTDIR)$(ipsecdir)/scepclient
94 endif
95
96 if USE_PKI
97   exes += $(DESTDIR)$(bindir)/pki
98 endif
99
100 if USE_SWANCTL
101   exes += $(DESTDIR)$(sbindir)/swanctl
102 endif
103
104 if USE_ATTR_SQL
105   exes += $(DESTDIR)$(ipsecdir)/pool
106 endif
107
108 if USE_IMV_ATTESTATION
109   exes += $(DESTDIR)$(ipsecdir)/attest
110 endif
111
112 checksum.c : checksum_builder $(deps) $(exes)
113                 ./checksum_builder $(libs) $(exes) > checksum.c
114
115 install-data-hook : $(EXTRA_LTLIBRARIES)
116         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES
117
118 uninstall-hook :
119         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES
120
121 clean-local :
122         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES