svn-id: r4799
This commit is contained in:
Max Horn
2002-08-21 20:47:12 +00:00
parent 48fa357d7c
commit e0cfd49ef7
2 changed files with 25 additions and 13 deletions
+15 -3
View File
@@ -1,6 +1,18 @@
# $Header$
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 @@ CPPFLAGS= $(DEFINES) $(INCLUDES)
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
+10 -10
View File
@@ -39,15 +39,15 @@ scummvm$(EXEEXT): $(OBJS)
$(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 @@ DEPDIRS = $(patsubst %,%/$(DEPDIR),$(MODULES))
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)