--- a/incdefs.sh +++ b/incdefs.sh @@ -27,7 +27,7 @@ printf " -D_GNU_SOURCE" # Get list of directories searched for header files. - dirs=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") + dirs=$(echo "" | ${CPP} -Wp,-v - 2>&1 >/dev/null | grep ^" /") # Look for clock_adjtime(). for d in $dirs; do diff --git a/makefile b/makefile index 3c2406b..c2fadb1 100644 --- a/makefile +++ b/makefile @@ -40,7 +40,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \ SRC = $(OBJECTS:.o=.c) DEPEND = $(OBJECTS:.o=.d) srcdir := $(dir $(lastword $(MAKEFILE_LIST))) -incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh) +incdefs := $(shell CPP="$(CPP)" $(srcdir)/incdefs.sh) version := $(shell $(srcdir)/version.sh $(srcdir)) VPATH = $(srcdir)