summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-19 20:22:10 +0000
committertron <tron@openttd.org>2005-01-19 20:22:10 +0000
commit28df4a0e25d3f66dad54cee776a2b39821c686f0 (patch)
treedf24dcaf1c8c1bf9d34a2d3041231456d123cb61 /Makefile
parent7837be0575fe81a43f82c9bf0248da21757aaadd (diff)
downloadopenttd-28df4a0e25d3f66dad54cee776a2b39821c686f0.tar.xz
(svn r1570) Make the gcc version test work with old versions of test (i.e. don't use the < operator)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ce69b772e..acfd7f1be 100644
--- a/Makefile
+++ b/Makefile
@@ -294,17 +294,17 @@ endif
# -O optimize or -O2 fully optimize (O's above 2 are not recommended)
# -pg profile - generate profiling data. See "man gprof" to use this.
-CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1-3)
+CC_VERSION = $(shell $(CC) -dumpversion | cut -c 1,3)
# GNU make can only test for (in)equality
# this is a workaround to test for >=
-ifeq ($(shell if test ! $(CC_VERSION) \< 2.9; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 29; then echo true; fi), true)
CFLAGS += -O -Wall -Wno-multichar -Wsign-compare
endif
-ifeq ($(shell if test ! $(CC_VERSION) \< 3.0; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 30; then echo true; fi), true)
CFLAGS += -W -Wno-unused-parameter
endif
-ifeq ($(shell if test ! $(CC_VERSION) \< 3.4; then echo true; fi), true)
+ifeq ($(shell if test $(CC_VERSION) -ge 34; then echo true; fi), true)
CFLAGS += -Wdeclaration-after-statement
endif