]> git.tuebingen.mpg.de Git - adu.git/commitdiff
Makefile: Honor CPPFLAGS also when creating dependencies.
authorAndre Noll <maan@systemlinux.org>
Mon, 25 Jun 2012 16:23:15 +0000 (18:23 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 25 Jun 2012 16:23:15 +0000 (18:23 +0200)
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.

Makefile

index 1cb69566d3d8844275b29a0890ce8e08095b9b51..8e2c965bf4aa2310f6ab69024554edaa6b4be835 100644 (file)
--- 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