Modified the automatic dependency generation to use a variant of an old
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 19 Sep 2007 00:59:27 +0000 (00:59 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Wed, 19 Sep 2007 00:59:27 +0000 (00:59 +0000)
method developed by Tom Tromey and found on Paul D. Smith's GNU Make web
site[1].  This should fix problems caused by missing header files being
referenced from dependency Makefiles.

[1] http://make.mad-scientist.us/autodep.html

git-svn-id: https://s.snth.net/svn/neverball/trunk@1132 78b8d119-cf0a-0410-b17c-f493084dd1d7

Makefile

index 514d629..be3987a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -144,10 +144,8 @@ SOLS := $(MAPS:%.map=%.sol)
 
 #------------------------------------------------------------------------------
 
-%.d : %.c
-       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) -MM -MF $@ -MT '$*.o $@' $<
-
 %.o : %.c
+       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) -MM -MP -MF $*.d $<
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) -o $@ -c $<
 
 %.sol : %.map $(MAPC_TARG)