diff --git a/lib/Makefile.in b/lib/Makefile.in
index 29bbf92..cf2bf3c 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -61,7 +61,7 @@ SHELL = /bin/sh
 VPATH = $(srcdir)
 
 OBJECTS  = getopt.$(OBJEXT) getopt1.$(OBJEXT) getline.$(OBJEXT) hash.$(OBJEXT)
-CPPFLAGS = @CPPFLAGS@ -I$(srcdir)
+CPPFLAGS = -I$(srcdir) @CPPFLAGS@
 
 TARGETLIB = libgp.a
 
diff --git a/src/Makefile.in b/src/Makefile.in
index 6866ffd..bd4df14 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -64,7 +64,7 @@ VPATH = $(srcdir)
 OBJECTS  = version.$(OBJEXT) positions.$(OBJEXT) options.$(OBJEXT) keyword.$(OBJEXT) keyword-list.$(OBJEXT) \
            input.$(OBJEXT) bool-array.$(OBJEXT) hash-table.$(OBJEXT) search.$(OBJEXT) output.$(OBJEXT) main.$(OBJEXT)
 LIBS     = ../lib/libgp.a @GPERF_LIBM@
-CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir)/../lib
+CPPFLAGS = -I. -I$(srcdir)/../lib @CPPFLAGS@
 
 TARGETPROG = gperf$(EXEEXT)
 
