From 72dc71335e1d616f7fad8c20134a433eb49e159b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 6 Jul 2002 13:02:57 +0000 Subject: added intelligent dependency tracking for anybody who uses GCC svn-id: r4467 --- Makefile.common | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Makefile.common') diff --git a/Makefile.common b/Makefile.common index 6b7fca84eb..1079bfab0a 100644 --- a/Makefile.common +++ b/Makefile.common @@ -21,8 +21,24 @@ DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \ debugrl.h whatsnew.txt readme.txt copying.txt \ scummvm.dsp scummvm.dsw sound/fmopl.h gui.h sound.h +# Default (dumb) compile & dependcy rules .cpp.o: $(CC) $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +$(OBJS): $(INCS) + + +# If you use GCC, disable the above and enable this for intelligent +# dependency tracking. +# +#DEPDIR := .deps +#.cpp.o: +# mkdir -p $(DEPDIR) +# $(CC) -Wp,-MMD,"$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +# echo -n "$(*D)/" > $(DEPDIR)/$(*F).d +# cat "$(DEPDIR)/$(*F).d2" >> "$(DEPDIR)/$(*F).d" +# rm -f "$(DEPDIR)/$(*F).d2" +# +#-include $(DEPDIR)/*.d all: scummvm$(EXEEXT) @@ -32,6 +48,4 @@ scummvm$(EXEEXT): $(OBJS) clean: rm -f $(OBJS) scummvm$(EXEEXT) -$(OBJS): $(INCS) - .PHONY: all clean dist -- cgit v1.2.3