[Scummvm-cvs-logs] CVS: scummvm Makefile.common,1.6,1.7

Max Horn fingolfin at users.sourceforge.net
Sat Jul 6 06:04:01 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv3186

Modified Files:
	Makefile.common 
Log Message:
added intelligent dependency tracking for anybody who uses GCC

Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile.common,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Makefile.common	5 Jul 2002 17:00:18 -0000	1.6
+++ Makefile.common	6 Jul 2002 13:02:57 -0000	1.7
@@ -21,8 +21,24 @@
 	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)
 
@@ -31,7 +47,5 @@
 
 clean:
 	rm -f $(OBJS) scummvm$(EXEEXT)
-
-$(OBJS): $(INCS)
 
 .PHONY: all clean dist





More information about the Scummvm-git-logs mailing list