Link libhydra to checksum_builder so the hydra object is defined.
[strongswan.git] / src / checksum / Makefile.am
1 ipsec_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
17 AM_CFLAGS = -rdynamic
18
19 libs =  $(shell find $(top_builddir)/src/libstrongswan \
20                         $(top_builddir)/src/libcharon \
21                         $(top_builddir)/src/libhydra \
22                         -name 'libstrongswan*.so')
23
24 if USE_LIBHYDRA
25   libs += $(top_builddir)/src/libhydra/.libs/libhydra.so
26 endif
27
28 if USE_CHARON
29   libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
30   libs += $(top_builddir)/src/charon/.libs/charon
31 endif
32
33 if USE_PLUTO
34   libs += $(top_builddir)/src/pluto/.libs/pluto
35 endif
36
37 if USE_TOOLS
38   libs += $(top_builddir)/src/openac/.libs/openac
39   libs += $(top_builddir)/src/pki/.libs/pki
40   libs += $(top_builddir)/src/scepclient/.libs/scepclient
41 endif
42
43 if USE_ATTR_SQL
44   libs += $(top_builddir)/src/libhydra/plugins/attr_sql/.libs/pool
45 endif
46
47 checksum.c : checksum_builder $(libs)
48                 ./checksum_builder $(libs) > checksum.c