-CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) -I$(PRJDIR)/$(SIMDIR)
-CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
-CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir) -I$(srcdir) \
+ -I$(top_srcdir)/$(SIMDIR) \
+ -I$(top_srcdir)/$(CMDDIR) -I$(top_srcdir)/$(GUIDIR)
+CFLAGS = @CFLAGS@ -I$(top_builddir) -Wall
+CXXFLAGS = @CXXFLAGS@ -I$(top_builddir) -Wall