diff options
author | Jonathan Gray | 2003-08-02 09:21:34 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-08-02 09:21:34 +0000 |
commit | 93482ae5c6d17dd8f3257be86b589bcd724ff887 (patch) | |
tree | ff1196c1a854f9f58aef2c2d31886baac06a3820 | |
parent | 0b2bd31010826a32faa129c532b31d19dd167b38 (diff) | |
download | scummvm-rg350-93482ae5c6d17dd8f3257be86b589bcd724ff887.tar.gz scummvm-rg350-93482ae5c6d17dd8f3257be86b589bcd724ff887.tar.bz2 scummvm-rg350-93482ae5c6d17dd8f3257be86b589bcd724ff887.zip |
automatically use gcc 3.x specific dependency rules if using gcc 3.x, enable some additional warnings in Makefile.new
svn-id: r9399
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | Makefile.common | 9 | ||||
-rw-r--r-- | Makefile.new | 6 | ||||
-rwxr-xr-x | configure | 5 |
4 files changed, 15 insertions, 7 deletions
@@ -63,6 +63,8 @@ LIBS += -lmad # Uncomment this to cause warnings to be treated as errors # CXXFLAGS+= -Werror +# Uncomment this to use GCC 3.x specific dependency tracking (recommended) +# HAVE_GCC3 = 1 ####################################################################### # Control which modules are built - uncomment any to disable module # diff --git a/Makefile.common b/Makefile.common index 7b71aaa0fd..4262c9df30 100644 --- a/Makefile.common +++ b/Makefile.common @@ -87,6 +87,7 @@ clean: #$(OBJS): $(INCS) +ifndef HAVE_GCC3 # If you use GCC, disable the above and enable this for intelligent # dependency tracking. DEPDIRS = $(addsuffix /$(DEPDIR),$(MODULES)) @@ -98,15 +99,15 @@ DEPFILES = $(wildcard $(addsuffix /*.d,$(DEPDIRS))) $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" $(RM) "$(*D)/$(DEPDIR)/$(*F).d2" - +else # If you even have GCC 3.x, you can use this build rule, which is safer; the above # rule can get you into a bad state if you Ctrl-C at the wrong moment. # Also, with this GCC inserts additional dummy rules for the involved headers, # which ensures a smooth compilation even if said headers become obsolete. #.cpp.o: -# $(MKDIR) $(*D)/$(DEPDIR) -# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o - + $(MKDIR) $(*D)/$(DEPDIR) + $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o +endif -include $(DEPFILES) /dev/null distclean: clean diff --git a/Makefile.new b/Makefile.new index 6e01833ab1..6a43bd2d41 100644 --- a/Makefile.new +++ b/Makefile.new @@ -30,6 +30,10 @@ include config.mak # CXXFLAGS+= -Wshadow -Werror CXXFLAGS:= -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas $(CXXFLAGS) +# Even more warnings... +CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion +CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor +CXXFLAGS+= -Wno-reorder -Wwrite-strings -fcheck-new -Wctor-dtor-privacy ####################################################################### # Misc stuff - you should normally never have to edit this # @@ -46,8 +50,6 @@ deb: debian/prepare fakeroot debian/rules binary -config.mak: - ./configure # Special target to create a application wrapper for Mac OS X bundle_name = ScummVM.app @@ -258,6 +258,7 @@ fi if test "$_cxx_major" -ge "3" ; then CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" + _make_def_HAVE_GCC3='HAVE_GCC3 = 1' fi; # @@ -539,8 +540,10 @@ CXXFLAGS := $CXXFLAGS LIBS := $LIBS RANLIB := $_ranlib BACKEND := $_backend - MODULES += $MODULES + +$_make_def_HAVE_GCC3 + INCLUDES += $INCLUDES OBJS += $OBJS DEFINES += $DEFINES |