diff --git a/examples/Makefile.am b/examples/Makefile.am
index 40b1f5898eb8020553245c796337ca95bafcd5e3..9037cec2a1aeecce5cf34d36bac8184efcf81e2c 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)
+AM_CPPFLAGS = -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
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index e27c42898e05bc5b602194706f189e3e0818dcb5..545916429e45e169e56b1a35620768018d6fda82 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)
+AM_CPPFLAGS = -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