303f0b318751b7147ba79bd536eecb798c1ffa20
[strongswan.git] / src / checksum / Makefile.am
1 ipseclib_LTLIBRARIES = libchecksum.la
2 noinst_PROGRAMS = checksum_builder
3
4 nodist_libchecksum_la_SOURCES = checksum.c
5 libchecksum_la_LDFLAGS = -module -avoid-version
6
7 checksum_builder_SOURCES = checksum_builder.c
8 checksum_builder_LDADD = \
9         $(top_builddir)/src/libstrongswan/libstrongswan.la \
10         $(top_builddir)/src/libhydra/libhydra.la \
11         $(top_builddir)/src/libcharon/libcharon.la \
12         $(DLLIB)
13
14 BUILT_SOURCES = checksum.c
15 CLEANFILES = checksum.c
16 INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
17         -I$(top_srcdir)/src/libcharon
18 AM_CFLAGS = -rdynamic
19
20 libs = $(top_builddir)/src/libstrongswan/.libs/libstrongswan.so
21
22 if !MONOLITHIC
23   AM_CFLAGS += -DS_PLUGINS=\""${s_plugins}\"" -DS_PATH=\""${top_builddir}/src/libstrongswan/plugins\""
24 endif
25
26 if USE_LIBHYDRA
27   libs += $(top_builddir)/src/libhydra/.libs/libhydra.so
28 if !MONOLITHIC
29   AM_CFLAGS += -DH_PLUGINS=\""${h_plugins}\"" -DH_PATH=\""${top_builddir}/src/libhydra/plugins\""
30 endif
31 endif
32
33 if USE_LIBTNCCS
34   libs += $(top_builddir)/src/libtnccs/.libs/libtnccs.so
35   checksum_builder_LDADD += $(top_builddir)/src/libtnccs/libtnccs.la
36   INCLUDES += -I$(top_srcdir)/src/libtncif -I$(top_srcdir)/src/libtnccs
37   AM_CFLAGS += -DHAS_TNC
38 endif
39
40 if USE_SIMAKA
41   checksum_builder_LDADD += $(top_builddir)/src/libsimaka/libsimaka.la
42 endif
43
44 if USE_CHARON
45   libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
46   libs += $(top_builddir)/src/charon/.libs/charon
47 if !MONOLITHIC
48   AM_CFLAGS += -DC_PLUGINS=\""${c_plugins}\"" -DC_PATH=\""${top_builddir}/src/libcharon/plugins\""
49 endif
50 endif
51
52 if USE_PLUTO
53   libs += $(top_builddir)/src/pluto/.libs/pluto
54   AM_CFLAGS += -DP_PLUGINS=\""${p_plugins}\"" -DP_PATH=\""${top_builddir}/src/pluto/plugins\""
55 endif
56
57 if USE_TOOLS
58   libs += $(top_builddir)/src/openac/.libs/openac
59   libs += $(top_builddir)/src/pki/.libs/pki
60   libs += $(top_builddir)/src/scepclient/.libs/scepclient
61 endif
62
63 if USE_ATTR_SQL
64   libs += $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool
65 endif
66
67 checksum.c : checksum_builder $(libs)
68                 ./checksum_builder $(libs) > checksum.c