aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorMax Horn2002-11-01 20:28:51 +0000
committerMax Horn2002-11-01 20:28:51 +0000
commita15e6df2bd5b3a305fa3933a85321cd7f16e36a4 (patch)
treecfd21a933bfe5a3277477e2c90de0d73a8cc637b /Makefile.common
parent797fc8159725b1e5c89ed9176e72ded481294518 (diff)
downloadscummvm-rg350-a15e6df2bd5b3a305fa3933a85321cd7f16e36a4.tar.gz
scummvm-rg350-a15e6df2bd5b3a305fa3933a85321cd7f16e36a4.tar.bz2
scummvm-rg350-a15e6df2bd5b3a305fa3933a85321cd7f16e36a4.zip
improved gcc build rule to avoid problems when files are removed from the repository, and to make it less likely that aborting a build leaves bad .d2 files around (thanks Willem!)
svn-id: r5369
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile.common b/Makefile.common
index 4908c32a09..1621c0b6c1 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -119,10 +119,7 @@ DEPFILES = $(wildcard $(patsubst %,%/$(DEPDIR)/*.d,$(MODULES)))
.cpp.o:
$(MKDIR) $(*D)/$(DEPDIR)
- $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
- $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
- $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
- $(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
+ $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-include $(DEPFILES) /dev/null