diff --git a/examples/Makefile.am b/examples/Makefile.am
index b74b8c6873c94bf18ef42da8746eda29bf951b30..1638c4b33b1ada0cd110996919c67a4b86a59c12 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,3 +1,5 @@
+AM_CFLAGS = -I$(top_srcdir)
+
 # We need .. to be searched before standard places, in order to pick
 # up the newly built libnettle.a/libnettle.so, rather than any
 # installed version.
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 7a17d8f4a2f302e0e79d3f0b5e939f7374347be2..7555722c4737beb1da475091ebc643eb6a251324 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,3 +1,5 @@
+AM_CFLAGS = -I$(top_srcdir)
+
 # We need .. to be searched before standard places, in order to pick
 # up the newly built libnettle.a/libnettle.so, rather than any
 # installed version.
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f21b5b235abdaee1695838573e6b43674888a2f1..46a68f7cd3736f4b1b7a61400427ca07d2532b98 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,3 +1,5 @@
+AM_CFLAGS = -I$(top_srcdir)
+
 # We need .. to be searched before standard places, in order to pick
 # up the newly built libnettle.a/libnettle.so, rather than any
 # installed version.