charon-cmd: add a stub for charon-cmd, a simple command line IKE client
[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=\"${DESTDIR}${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_LIBIPSEC
44   deps += $(top_builddir)/src/libipsec/libipsec.la
45   libs += $(DESTDIR)$(ipseclibdir)/libipsec.so
46 endif
47
48 if USE_TLS
49   deps += $(top_builddir)/src/libtls/libtls.la
50   libs += $(DESTDIR)$(ipseclibdir)/libtls.so
51 endif
52
53 if USE_RADIUS
54   deps += $(top_builddir)/src/libradius/libradius.la
55   libs += $(DESTDIR)$(ipseclibdir)/libradius.so
56 endif
57
58 if USE_LIBTNCCS
59   deps += $(top_builddir)/src/libtnccs/libtnccs.la
60   libs += $(DESTDIR)$(ipseclibdir)/libtnccs.so
61 endif
62
63 if USE_SIMAKA
64   deps += $(top_builddir)/src/libsimaka/libsimaka.la
65   libs += $(DESTDIR)$(ipseclibdir)/libsimaka.so
66 endif
67
68 if USE_IMCV
69   deps += $(top_builddir)/src/libimcv/libimcv.la
70   libs += $(DESTDIR)$(ipseclibdir)/libimcv.so
71 endif
72
73 if USE_PTS
74   deps += $(top_builddir)/src/libpts/libpts.la
75   libs += $(DESTDIR)$(ipseclibdir)/libpts.so
76 endif
77
78 if USE_CHARON
79   deps += $(top_builddir)/src/libcharon/libcharon.la
80   libs += $(DESTDIR)$(ipseclibdir)/libcharon.so
81   exes += $(top_builddir)/src/charon/.libs/charon
82 if !MONOLITHIC
83   AM_CFLAGS += -DC_PLUGINS=\""${c_plugins}\""
84 endif
85 endif
86
87 if USE_CMD
88   exes += $(top_builddir)/src/charon-cmd/.libs/charon-cmd
89 endif
90
91 if USE_TOOLS
92   exes += $(top_builddir)/src/openac/.libs/openac
93   exes += $(top_builddir)/src/pki/.libs/pki
94   exes += $(top_builddir)/src/scepclient/.libs/scepclient
95 endif
96
97 if USE_ATTR_SQL
98   exes += $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool
99 endif
100
101 if USE_IMV_ATTESTATION
102   exes += $(top_builddir)/src/libpts/plugins/imv_attestation/.libs/attest
103 endif
104
105 checksum.c : checksum_builder $(deps) $(exes)
106                 ./checksum_builder $(libs) $(exes) > checksum.c
107
108 install-data-hook : $(EXTRA_LTLIBRARIES)
109         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' install-ipseclibLTLIBRARIES
110
111 uninstall-hook :
112         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' uninstall-ipseclibLTLIBRARIES
113
114 clean-local :
115         $(MAKE) $(AM_MAKEFLAGS) LIBCHECKSUM_LIBS='$(EXTRA_LTLIBRARIES)' clean-ipseclibLTLIBRARIES