summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makeconf12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makeconf b/Makeconf
index 15664353..201d205d 100644
--- a/Makeconf
+++ b/Makeconf
@@ -55,7 +55,17 @@ include $(..)config.make
# It is important to have this inclusion first; that picks up our
# library header files locally rather than from installed copies.
# Append to any value set by the specific Makefile or by configure.
-CPPFLAGS += -I. -I$(srcdir) -I.. -I$(top_srcdir)
+ifeq ($(srcdir),.)
+srcdirinc=
+else
+srcdirinc=-I$(srcdir)
+endif
+ifeq ($(top_srcdir),..)
+top_srcdirinc=
+else
+top_srcdirinc=-I$(top_srcdir)
+endif
+CPPFLAGS += -I. $(srcdirinc) -I.. $(top_srcdirinc)
CFLAGS += -Wall
# Decode makemode: