diff --git a/tools/Makefile.am b/tools/Makefile.am
index 1a4863c23b8fb073bafe9dea83f8c52cd5d04499..a60852a432209d9fc5163065d1db6ae6586e299a 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,7 +7,9 @@ AM_LDFLAGS = -L..
 
 bin_PROGRAMS = sexp-conv
 
-LDADD = -lnettle
+# libnettle.a is added at the end to make sure all programs depend on it.
+# It seems there's no DEPENDENCIES variable that affects all programs.
+LDADD = -lnettle ../libnettle.a
 
 EXTRA_DIST = misc.h input.h output.h parse.h