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