? make.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	21 Aug 2002 17:42:59 -0000	1.4
+++ Makefile	21 Aug 2002 18:43:34 -0000
@@ -1,6 +1,18 @@
 # $Header: /cvsroot/scummvm/scummvm-new/Makefile,v 1.4 2002/08/21 17:42:59 fingolfin Exp $
 
 CXX      = c++
+AR        = ar cru
+RANLIB = ranlib
+RM      = rm -f
+MKDIR = mkdir -p
+ECHO  = echo -n
+CAT    = cat
+RM      = rm -f
+# recursive version of RM
+RM_REC = $(RM) -r
+ZIP = zip -q
+CP  = cp
+
 CFLAGS   = -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar
 DEFINES  =
 LDFLAGS :=
@@ -29,9 +41,9 @@
 include Makefile.common
 
 dist:
-	rm -f $(ZIPFILE)
-	zip -q $(ZIPFILE) $(DISTFILES)
+	$(RM) $(ZIPFILE)
+	$(ZIP) $(ZIPFILE) $(DISTFILES)
 
 # Until we add a nice configure tool, default to the SDL build rules
 build.rules:
-	cp backends/sdl/build.rules build.rules
+	$(CP) backends/sdl/build.rules build.rules
Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/Makefile.common,v
retrieving revision 1.6
diff -u -r1.6 Makefile.common
--- Makefile.common	21 Aug 2002 17:35:45 -0000	1.6
+++ Makefile.common	21 Aug 2002 18:43:34 -0000
@@ -39,15 +39,15 @@
 	$(CXX) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS)
 
 scumm/libscumm.a: $(SCUMM_OBJS)
-	ar cru $@ $+
-	ranlib $@ 
+	$(AR) $@ $+
+	$(RANLIB) $@ 
 
 simon/libsimon.a: $(SIMON_OBJS)
-	ar cru $@ $+
-	ranlib $@ 
+	$(AR) $@ $+
+	$(RANLIB) $@ 
 
 clean:
-	rm -f $(OBJS) $(SCUMM_OBJS) $(SIMON_OBJS) scummvm$(EXEEXT)
+	$(RM) $(OBJS) $(SCUMM_OBJS) $(SIMON_OBJS) scummvm$(EXEEXT)
 
 .PHONY: all clean dist distclean
 
@@ -64,13 +64,13 @@
 DEPFILES = $(wildcard $(patsubst %,%/$(DEPDIR)/*.d,$(MODULES)))
 
 .cpp.o:
-	mkdir -p $(*D)/$(DEPDIR)
+	$(MKDIR) $(*D)/$(DEPDIR)
 	$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-	echo -n "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
-	cat "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
-	rm -f "$(*D)/$(DEPDIR)/$(*F).d2"
+	$(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d
+	$(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d"
+	$(RM) "$(*D)/$(DEPDIR)/$(*F).d2"
 
 -include $(DEPFILES) /dev/null
 
 distclean: clean
-	rm -rf $(DEPDIRS)
+	$(RM_REC) $(DEPDIRS)
