added -module -avoid-version LDFLAGS
[strongswan.git] / src / checksum / Makefile.am
index aaed128..f9c1be2 100644 (file)
@@ -1,17 +1,27 @@
 ipsec_LTLIBRARIES = libchecksum.la
 noinst_PROGRAMS = checksum_builder
 
 ipsec_LTLIBRARIES = libchecksum.la
 noinst_PROGRAMS = checksum_builder
 
-libchecksum_la_SOURCES = checksum.c
+nodist_libchecksum_la_SOURCES = checksum.c
+libchecksum_la_LDFLAGS = -module -avoid-version
 
 checksum_builder_SOURCES = checksum_builder.c
 checksum_builder_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
 
 BUILT_SOURCES = checksum.c
 
 checksum_builder_SOURCES = checksum_builder.c
 checksum_builder_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la
 
 BUILT_SOURCES = checksum.c
-CLEANFILES = checksum.c checksum_builder
+CLEANFILES = checksum.c
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = -rdynamic
 
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = -rdynamic
 
-libs = $(shell find $(top_builddir)/src -name 'libstrongswan*.so')
+libs = $(shell find $(top_builddir)/src/libstrongswan $(top_builddir)/src/charon \
+                       -name 'libstrongswan*.so')
+
+if USE_CHARON
+  libs += $(top_builddir)/src/charon/.libs/charon
+endif
+
+if USE_PLUTO
+  libs += $(top_builddir)/src/pluto/.libs/pluto
+endif
 
 checksum.c : checksum_builder $(libs)
                ./checksum_builder $(libs) > checksum.c
 
 checksum.c : checksum_builder $(libs)
                ./checksum_builder $(libs) > checksum.c