a22e91ed1ff3da2039ff01133911fab0f26f95c0
[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 noinst_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/libhydra/libhydra.la \
12         $(top_builddir)/src/libcharon/libcharon.la \
13         $(DLLIB)
14
15 CLEANFILES = checksum.c
16
17 AM_CPPFLAGS = \
18         -I$(top_srcdir)/src/libstrongswan \
19         -I$(top_srcdir)/src/libhydra \
20         -I$(top_srcdir)/src/libcharon \
21         -DPLUGINDIR=\"${DESTDIR}${plugindir}\"
22
23 AM_CFLAGS = \
24         -rdynamic
25
26 # we keep track of build dependencies in deps and use libs to store the paths
27 # to the installed libraries. for executables we use the built files directly
28 # as these are not relinked during installation.
29 deps = $(top_builddir)/src/libstrongswan/libstrongswan.la
30 libs = $(DESTDIR)$(ipseclibdir)/libstrongswan.so
31 exes =
32
33 if !MONOLITHIC
34   AM_CPPFLAGS += -DS_PLUGINS=\""${s_plugins}\""
35 endif
36
37 if USE_LIBHYDRA
38   deps += $(top_builddir)/src/libhydra/libhydra.la
39   libs += $(DESTDIR)$(ipseclibdir)/libhydra.so
40 if !MONOLITHIC
41   AM_CPPFLAGS += -DH_PLUGINS=\""${h_plugins}\""
42 endif
43 endif
44
45 if USE_LIBIPSEC
46   deps += $(top_builddir)/src/libipsec/libipsec.la
47   libs += $(DESTDIR)$(ipseclibdir)/libipsec.so
48 endif
49
50 if USE_TLS
51   deps += $(top_builddir)/src/libtls/libtls.la
52   libs += $(DESTDIR)$(ipseclibdir)/libtls.so
53 endif
54
55 if USE_RADIUS
56   deps += $(top_builddir)/src/libradius/libradius.la
57   libs += $(DESTDIR)$(ipseclibdir)/libradius.so
58 endif
59
60 if USE_LIBPTTLS
61   deps += $(top_builddir)/src/libpttls/libpttls.la
62   libs += $(DESTDIR)$(ipseclibdir)/libpttls.so
63 endif
64
65 if USE_LIBTNCCS
66   deps += $(top_builddir)/src/libtnccs/libtnccs.la
67   libs += $(DESTDIR)$(ipseclibdir)/libtnccs.so
68 if !MONOLITHIC
69   AM_CPPFLAGS += -DT_PLUGINS=\""${t_plugins}\""
70 endif
71 endif
72
73 if USE_SIMAKA
74   deps += $(top_builddir)/src/libsimaka/libsimaka.la
75   libs += $(DESTDIR)$(ipseclibdir)/libsimaka.so
76 endif
77
78 if USE_IMCV
79   deps += $(top_builddir)/src/libimcv/libimcv.la
80   libs += $(DESTDIR)$(ipseclibdir)/libimcv.so
81 endif
82
83 if USE_PTS
84   deps += $(top_builddir)/src/libpts/libpts.la
85   libs += $(DESTDIR)$(ipseclibdir)/libpts.so
86 endif
87
88 if USE_CHARON
89   deps += $(top_builddir)/src/libcharon/libcharon.la
90   libs += $(DESTDIR)$(ipseclibdir)/libcharon.so
91   exes += $(top_builddir)/src/charon/.libs/charon
92 if !MONOLITHIC
93   AM_CPPFLAGS += -DC_PLUGINS=\""${c_plugins}\""
94 endif
95 endif
96
97 if USE_CMD
98   exes += $(top_builddir)/src/charon-cmd/.libs/charon-cmd
99 endif
100
101 if USE_TOOLS
102   exes += $(top_builddir)/src/openac/.libs/openac
103   exes += $(top_builddir)/src/pki/.libs/pki
104   exes += $(top_builddir)/src/scepclient/.libs/scepclient
105 endif
106
107 if USE_ATTR_SQL
108   exes += $(top_builddir)/src/pool/.libs/pool
109 endif
110
111 if USE_IMV_ATTESTATION
112   exes += $(top_builddir)/src/libpts/plugins/imv_attestation/.libs/attest
113 endif
114
115 checksum.c : checksum_builder $(deps) $(exes)
116                 ./checksum_builder $(libs) $(exes) > checksum.c
117
118 install-data-hook : $(EXTRA_LTLIBRARIES)
119         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES
120
121 uninstall-hook :
122         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES
123
124 clean-local :
125         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES