aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMax Horn2009-09-25 12:11:27 +0000
committerMax Horn2009-09-25 12:11:27 +0000
commit26f2597fd1d8f7b5264ffa12d2d80a690d0f4503 (patch)
tree3c082dd6fc990523d0f9caa1233f99cc430f4603 /Makefile
parentf91f4d4186f06281f3e1cd3c2b267f6dd9018220 (diff)
downloadscummvm-rg350-26f2597fd1d8f7b5264ffa12d2d80a690d0f4503.tar.gz
scummvm-rg350-26f2597fd1d8f7b5264ffa12d2d80a690d0f4503.tar.bz2
scummvm-rg350-26f2597fd1d8f7b5264ffa12d2d80a690d0f4503.zip
Modified version of patch #2838507: Add support for non-gcc compilers to configure, Makefile etc
svn-id: r44348
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 25 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 2ed634bdc5..13ef5f3fdb 100644
--- a/Makefile
+++ b/Makefile
@@ -19,28 +19,31 @@ MODULE_DIRS :=
# Load the make rules generated by configure
-include config.mk
-
-CXXFLAGS:= -Wall $(CXXFLAGS)
-# Turn off some annoying and not-so-useful warnings
-CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
-# Enable even more warnings...
-CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align
-CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings
-
-# Currently we disable this gcc flag, since it will also warn in cases,
-# where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
-# is not possible, thus it would fail compiliation with -Werror without
-# being helpful.
-#CXXFLAGS+= -Wmissing-format-attribute
-
-# Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
-CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
-
-# There is a nice extra warning that flags variables that are potentially
-# used before being initialized. Very handy to catch a certain kind of
-# bugs. Unfortunately, it only works when optimizations are turned on,
-# which is why we normally don't use it.
-#CXXFLAGS+= -O -Wuninitialized
+-include Makedepend
+
+ifeq "$(HAVE_GCC)" "1"
+ CXXFLAGS:= -Wall $(CXXFLAGS)
+ # Turn off some annoying and not-so-useful warnings
+ CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
+ # Enable even more warnings...
+ CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align
+ CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings
+
+ # Currently we disable this gcc flag, since it will also warn in cases,
+ # where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
+ # is not possible, thus it would fail compiliation with -Werror without
+ # being helpful.
+ #CXXFLAGS+= -Wmissing-format-attribute
+
+ # Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
+ CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
+
+ # There is a nice extra warning that flags variables that are potentially
+ # used before being initialized. Very handy to catch a certain kind of
+ # bugs. Unfortunately, it only works when optimizations are turned on,
+ # which is why we normally don't use it.
+ #CXXFLAGS+= -O -Wuninitialized
+endif
#######################################################################
# Default commands - put the necessary replacements in config.mk #