From: Andre Noll Date: Mon, 25 Jun 2012 16:23:15 +0000 (+0200) Subject: Makefile: Honor CPPFLAGS also when creating dependencies. X-Git-Tag: v1.0.0~24 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=a134d110dad79ec350f6883d473f29beadb06abe;p=adu.git Makefile: Honor CPPFLAGS also when creating dependencies. Makefile.deps is created using a cc -MM -MG command which might need the CPPFLAGS provided by the user, just as the ordinary cc commands for creating an object file. For example, the user might have passed -I$HOME/include, since libosl was installed in $HOME. In this case we need to pass this to the cc command that creates the Makefile as well. --- diff --git a/Makefile b/Makefile index 1cb6956..8e2c965 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ endif Makefile.deps: $(wildcard *.c *.h) - $(CC) -MM -MG *.c > $@ + $(CC) $(CPPFLAGS) -MM -MG *.c > $@ -include Makefile.deps