Build all shared libraries with -no-undefined and link them properly
[strongswan.git] / src / libcharon / Makefile.am
index 9c7f676..5ee047b 100644 (file)
@@ -136,7 +136,13 @@ AM_CPPFLAGS = \
        -DIPSEC_DIR=\"${ipsecdir}\" \
        -DIPSEC_PIDDIR=\"${piddir}\"
 
        -DIPSEC_DIR=\"${ipsecdir}\" \
        -DIPSEC_PIDDIR=\"${piddir}\"
 
-libcharon_la_LIBADD = -lm $(PTHREADLIB) $(DLLIB) $(SOCKLIB)
+AM_LDFLAGS = \
+  -no-undefined
+
+libcharon_la_LIBADD = \
+  $(top_builddir)/src/libstrongswan/libstrongswan.la \
+  $(top_builddir)/src/libhydra/libhydra.la \
+  -lm $(PTHREADLIB) $(DLLIB) $(SOCKLIB)
 
 EXTRA_DIST = Android.mk
 
 
 EXTRA_DIST = Android.mk