summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-11-06 22:45:24 (UTC)
committer kergoth <kergoth>2002-11-06 22:45:24 (UTC)
commite44cdb16632a4c904d8c43471fea1f8e790c7651 (patch) (side-by-side diff)
tree6533f63c234a24959587aa49de0934f7b35ce26f
parent86a2bf4747f46a9915dffac376b888faa5400ec8 (diff)
downloadopie-e44cdb16632a4c904d8c43471fea1f8e790c7651.zip
opie-e44cdb16632a4c904d8c43471fea1f8e790c7651.tar.gz
opie-e44cdb16632a4c904d8c43471fea1f8e790c7651.tar.bz2
allow a means of overriding CFLAGS_RELEASE, as a means of passing in optimizations
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--mkspecs/aix-g++/qmake.conf2
-rw-r--r--mkspecs/aix-xlc-64/qmake.conf2
-rw-r--r--mkspecs/aix-xlc/qmake.conf2
-rw-r--r--mkspecs/bsdi-g++/qmake.conf2
-rw-r--r--mkspecs/cygwin-g++/qmake.conf2
-rw-r--r--mkspecs/darwin-g++/qmake.conf2
-rw-r--r--mkspecs/dgux-g++/qmake.conf2
-rw-r--r--mkspecs/freebsd-g++/qmake.conf2
-rw-r--r--mkspecs/hpux-acc-64/qmake.conf2
-rw-r--r--mkspecs/hpux-acc-o64/qmake.conf2
-rw-r--r--mkspecs/hpux-acc/qmake.conf2
-rw-r--r--mkspecs/hpux-cc/qmake.conf2
-rw-r--r--mkspecs/hpux-g++/qmake.conf2
-rw-r--r--mkspecs/hurd-g++/qmake.conf2
-rw-r--r--mkspecs/irix-cc-64/qmake.conf2
-rw-r--r--mkspecs/irix-cc-o32/qmake.conf2
-rw-r--r--mkspecs/irix-cc/qmake.conf2
-rw-r--r--mkspecs/irix-g++/qmake.conf2
-rw-r--r--mkspecs/linux-cxx/qmake.conf2
-rw-r--r--mkspecs/linux-g++/qmake.conf2
-rw-r--r--mkspecs/linux-icc/qmake.conf2
-rw-r--r--mkspecs/linux-kcc/qmake.conf2
-rw-r--r--mkspecs/linux-pgcc/qmake.conf2
-rw-r--r--mkspecs/macx-g++/qmake.conf2
-rwxr-xr-xmkspecs/macx-pbuilder/qmake.conf2
-rw-r--r--mkspecs/netbsd-g++/qmake.conf2
-rw-r--r--mkspecs/openbsd-g++/qmake.conf2
-rw-r--r--mkspecs/qnx-g++/qmake.conf2
-rw-r--r--mkspecs/qws/freebsd-generic-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-arm-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-generic-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-ipaq-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-mips-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-sharp-g++/qmake.conf2
-rw-r--r--mkspecs/qws/linux-x86-g++/qmake.conf2
-rw-r--r--mkspecs/qws/macx-generic-g++/qmake.conf2
-rw-r--r--mkspecs/qws/qnx4-cc/qmake.conf2
-rw-r--r--mkspecs/qws/qnx6-generic-cc/qmake.conf2
-rw-r--r--mkspecs/qws/qnx6-generic-g++/qmake.conf2
-rw-r--r--mkspecs/qws/solaris-generic-g++/qmake.conf2
-rw-r--r--mkspecs/reliant-cds-64/qmake.conf2
-rw-r--r--mkspecs/reliant-cds/qmake.conf2
-rw-r--r--mkspecs/sco-cc/qmake.conf2
-rw-r--r--mkspecs/sco-g++/qmake.conf2
-rw-r--r--mkspecs/solaris-cc-64/qmake.conf2
-rw-r--r--mkspecs/solaris-cc/qmake.conf2
-rw-r--r--mkspecs/solaris-g++-64/qmake.conf2
-rw-r--r--mkspecs/solaris-g++/qmake.conf2
-rw-r--r--mkspecs/solaris-kcc/qmake.conf2
-rw-r--r--mkspecs/tru64-cxx/qmake.conf2
-rw-r--r--mkspecs/tru64-g++/qmake.conf2
-rw-r--r--mkspecs/ultrix-g++/qmake.conf2
-rw-r--r--mkspecs/unixware-cc/qmake.conf2
-rw-r--r--mkspecs/unixware-g++/qmake.conf2
-rw-r--r--mkspecs/win32-borland/qmake.conf2
-rw-r--r--mkspecs/win32-g++/qmake.conf2
-rw-r--r--mkspecs/win32-icc/qmake.conf2
-rw-r--r--mkspecs/win32-msvc.net/qmake.conf2
-rw-r--r--mkspecs/win32-msvc/qmake.conf2
-rw-r--r--mkspecs/win32-visage/qmake.conf2
-rw-r--r--mkspecs/win32-watcom/qmake.conf2
61 files changed, 61 insertions, 61 deletions
diff --git a/mkspecs/aix-g++/qmake.conf b/mkspecs/aix-g++/qmake.conf
index 5eb2f5e..2dee750 100644
--- a/mkspecs/aix-g++/qmake.conf
+++ b/mkspecs/aix-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf
index bdbec01..49b47a7 100644
--- a/mkspecs/aix-xlc-64/qmake.conf
+++ b/mkspecs/aix-xlc-64/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS = -qstrict -q64 $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -qwarn64
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O3)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf
index c74459d..6e17b4a 100644
--- a/mkspecs/aix-xlc/qmake.conf
+++ b/mkspecs/aix-xlc/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS = -qstrict $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O3)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/bsdi-g++/qmake.conf b/mkspecs/bsdi-g++/qmake.conf
index 4b48706..628c09b 100644
--- a/mkspecs/bsdi-g++/qmake.conf
+++ b/mkspecs/bsdi-g++/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf
index 9147bed..50aba89 100644
--- a/mkspecs/cygwin-g++/qmake.conf
+++ b/mkspecs/cygwin-g++/qmake.conf
@@ -19,5 +19,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf
index 9d057ea..2051427 100644
--- a/mkspecs/darwin-g++/qmake.conf
+++ b/mkspecs/darwin-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O3)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/dgux-g++/qmake.conf b/mkspecs/dgux-g++/qmake.conf
index 4de5c77..04af167 100644
--- a/mkspecs/dgux-g++/qmake.conf
+++ b/mkspecs/dgux-g++/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf
index 33c401e..020d6d5 100644
--- a/mkspecs/freebsd-g++/qmake.conf
+++ b/mkspecs/freebsd-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf
index 73e6093..7affcb4 100644
--- a/mkspecs/hpux-acc-64/qmake.conf
+++ b/mkspecs/hpux-acc-64/qmake.conf
@@ -60,5 +60,5 @@ QMAKE_CFLAGS = -Ae +DA2.0W -w $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O +Osize
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O +Osize)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = +Z
diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf
index d7b01b7..f47f74b 100644
--- a/mkspecs/hpux-acc-o64/qmake.conf
+++ b/mkspecs/hpux-acc-o64/qmake.conf
@@ -60,5 +60,5 @@ QMAKE_CFLAGS = -Ae +DA2.0 -w $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O +Oentrysched +Onolimit)
QMAKE_CFLAGS_DEBUG = -y -g
QMAKE_CFLAGS_SHLIB = +Z
diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf
index 5990aa7..26eca39 100644
--- a/mkspecs/hpux-acc/qmake.conf
+++ b/mkspecs/hpux-acc/qmake.conf
@@ -39,5 +39,5 @@ QMAKE_CFLAGS = -Ae +DAportable -w +Z $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/hpux-cc/qmake.conf b/mkspecs/hpux-cc/qmake.conf
index 56e9057..d522252 100644
--- a/mkspecs/hpux-cc/qmake.conf
+++ b/mkspecs/hpux-cc/qmake.conf
@@ -40,5 +40,5 @@ QMAKE_CFLAGS = -Ae +DA1.1e -w $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = +Z
diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf
index 9ba5359..b11fde2 100644
--- a/mkspecs/hpux-g++/qmake.conf
+++ b/mkspecs/hpux-g++/qmake.conf
@@ -22,5 +22,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf
index 12d70f7..1898ea2 100644
--- a/mkspecs/hurd-g++/qmake.conf
+++ b/mkspecs/hurd-g++/qmake.conf
@@ -21,5 +21,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf
index 0113dac..cd6c432 100644
--- a/mkspecs/irix-cc-64/qmake.conf
+++ b/mkspecs/irix-cc-64/qmake.conf
@@ -50,5 +50,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -fullwarn
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -OPT:Olimit=3000)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/irix-cc-o32/qmake.conf b/mkspecs/irix-cc-o32/qmake.conf
index f512ec1..b755813 100644
--- a/mkspecs/irix-cc-o32/qmake.conf
+++ b/mkspecs/irix-cc-o32/qmake.conf
@@ -24,5 +24,5 @@ QMAKE_CFLAGS = -o32 -woff 3203,3260,3672 $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -fullwarn
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -Olimit 3000
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -Olimit 3000)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf
index 2fef9df..e51731b 100644
--- a/mkspecs/irix-cc/qmake.conf
+++ b/mkspecs/irix-cc/qmake.conf
@@ -50,5 +50,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -fullwarn
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -OPT:Olimit=3000)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf
index 7def26a..38ee5d8 100644
--- a/mkspecs/irix-g++/qmake.conf
+++ b/mkspecs/irix-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf
index 28687c3..0f10c6a 100644
--- a/mkspecs/linux-cxx/qmake.conf
+++ b/mkspecs/linux-cxx/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
index 4507b37..dcc993a 100644
--- a/mkspecs/linux-g++/qmake.conf
+++ b/mkspecs/linux-g++/qmake.conf
@@ -19,5 +19,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index cd13562..f6b721d 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf
index 17bf26a..47ad018 100644
--- a/mkspecs/linux-kcc/qmake.conf
+++ b/mkspecs/linux-kcc/qmake.conf
@@ -25,5 +25,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = +K2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), +K2)
QMAKE_CFLAGS_DEBUG = +K0
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf
index ddccc47..e8161ae 100644
--- a/mkspecs/linux-pgcc/qmake.conf
+++ b/mkspecs/linux-pgcc/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -fast
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -fast)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fpic
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 77c206c..dc8da5c 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/macx-pbuilder/qmake.conf b/mkspecs/macx-pbuilder/qmake.conf
index b576719..6d765a8 100755
--- a/mkspecs/macx-pbuilder/qmake.conf
+++ b/mkspecs/macx-pbuilder/qmake.conf
@@ -19,5 +19,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O3
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O3)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf
index 33264b3..fcabcaf 100644
--- a/mkspecs/netbsd-g++/qmake.conf
+++ b/mkspecs/netbsd-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf
index ea3bda9..9b929b1 100644
--- a/mkspecs/openbsd-g++/qmake.conf
+++ b/mkspecs/openbsd-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qnx-g++/qmake.conf b/mkspecs/qnx-g++/qmake.conf
index 164dea6..b34eaba 100644
--- a/mkspecs/qnx-g++/qmake.conf
+++ b/mkspecs/qnx-g++/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/freebsd-generic-g++/qmake.conf b/mkspecs/qws/freebsd-generic-g++/qmake.conf
index cb551a8..546166e 100644
--- a/mkspecs/qws/freebsd-generic-g++/qmake.conf
+++ b/mkspecs/qws/freebsd-generic-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-arm-g++/qmake.conf b/mkspecs/qws/linux-arm-g++/qmake.conf
index 30c58d3..8eabcb9 100644
--- a/mkspecs/qws/linux-arm-g++/qmake.conf
+++ b/mkspecs/qws/linux-arm-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-generic-g++/qmake.conf b/mkspecs/qws/linux-generic-g++/qmake.conf
index 135c6f9..43f0d7f 100644
--- a/mkspecs/qws/linux-generic-g++/qmake.conf
+++ b/mkspecs/qws/linux-generic-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-ipaq-g++/qmake.conf b/mkspecs/qws/linux-ipaq-g++/qmake.conf
index 7e4cbf5..c06e614 100644
--- a/mkspecs/qws/linux-ipaq-g++/qmake.conf
+++ b/mkspecs/qws/linux-ipaq-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-mips-g++/qmake.conf b/mkspecs/qws/linux-mips-g++/qmake.conf
index 55547dd..a34b651 100644
--- a/mkspecs/qws/linux-mips-g++/qmake.conf
+++ b/mkspecs/qws/linux-mips-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-sharp-g++/qmake.conf b/mkspecs/qws/linux-sharp-g++/qmake.conf
index 11405c4..0c7ee7f 100644
--- a/mkspecs/qws/linux-sharp-g++/qmake.conf
+++ b/mkspecs/qws/linux-sharp-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/linux-x86-g++/qmake.conf b/mkspecs/qws/linux-x86-g++/qmake.conf
index e5ac6d1..dfc5e30 100644
--- a/mkspecs/qws/linux-x86-g++/qmake.conf
+++ b/mkspecs/qws/linux-x86-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf
index e718d2b..aa6251f 100644
--- a/mkspecs/qws/macx-generic-g++/qmake.conf
+++ b/mkspecs/qws/macx-generic-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/qnx4-cc/qmake.conf b/mkspecs/qws/qnx4-cc/qmake.conf
index 1020a3e..ee4a9ec 100644
--- a/mkspecs/qws/qnx4-cc/qmake.conf
+++ b/mkspecs/qws/qnx4-cc/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -WC,-sg $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -w1
QMAKE_CFLAGS_WARN_OFF = -w0
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g2d
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/qws/qnx6-generic-cc/qmake.conf b/mkspecs/qws/qnx6-generic-cc/qmake.conf
index ef69f21..ae113fd 100644
--- a/mkspecs/qws/qnx6-generic-cc/qmake.conf
+++ b/mkspecs/qws/qnx6-generic-cc/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -Bstatic -fPIC -pipe -fno-inline -fno-pack-struct -fhonor-std -f
QMAKE_CFLAGS_WARN_ON = -Wall
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/qws/qnx6-generic-g++/qmake.conf b/mkspecs/qws/qnx6-generic-g++/qmake.conf
index df3c836..6961345 100644
--- a/mkspecs/qws/qnx6-generic-g++/qmake.conf
+++ b/mkspecs/qws/qnx6-generic-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe -fno-inline -fno-pack-struct -fhonor-std -fexceptions -D_S
QMAKE_CFLAGS_WARN_ON = -Wall
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/qws/solaris-generic-g++/qmake.conf b/mkspecs/qws/solaris-generic-g++/qmake.conf
index d6048bb..d286d5b 100644
--- a/mkspecs/qws/solaris-generic-g++/qmake.conf
+++ b/mkspecs/qws/solaris-generic-g++/qmake.conf
@@ -17,5 +17,5 @@ QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2 -fno-default-inline
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/reliant-cds-64/qmake.conf b/mkspecs/reliant-cds-64/qmake.conf
index fc7a3cf..c3ee3a8 100644
--- a/mkspecs/reliant-cds-64/qmake.conf
+++ b/mkspecs/reliant-cds-64/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -v
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/reliant-cds/qmake.conf b/mkspecs/reliant-cds/qmake.conf
index faaa26d..584bcf7 100644
--- a/mkspecs/reliant-cds/qmake.conf
+++ b/mkspecs/reliant-cds/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -v
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf
index 54bcbfa..6c69a08 100644
--- a/mkspecs/sco-cc/qmake.conf
+++ b/mkspecs/sco-cc/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS = $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf
index 1c1e3c8..3044419 100644
--- a/mkspecs/sco-g++/qmake.conf
+++ b/mkspecs/sco-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/solaris-cc-64/qmake.conf b/mkspecs/solaris-cc-64/qmake.conf
index 33fda82..b30f3e8 100644
--- a/mkspecs/solaris-cc-64/qmake.conf
+++ b/mkspecs/solaris-cc-64/qmake.conf
@@ -36,5 +36,5 @@ QMAKE_CFLAGS_DEPS = -xM
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/solaris-cc/qmake.conf b/mkspecs/solaris-cc/qmake.conf
index 3d50180..8b096fe 100644
--- a/mkspecs/solaris-cc/qmake.conf
+++ b/mkspecs/solaris-cc/qmake.conf
@@ -19,5 +19,5 @@ QMAKE_CFLAGS_DEPS = -xM
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/solaris-g++-64/qmake.conf b/mkspecs/solaris-g++-64/qmake.conf
index 622644b..da83d25 100644
--- a/mkspecs/solaris-g++-64/qmake.conf
+++ b/mkspecs/solaris-g++-64/qmake.conf
@@ -41,5 +41,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/solaris-g++/qmake.conf b/mkspecs/solaris-g++/qmake.conf
index 71f4307..2f3c752 100644
--- a/mkspecs/solaris-g++/qmake.conf
+++ b/mkspecs/solaris-g++/qmake.conf
@@ -24,5 +24,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/solaris-kcc/qmake.conf b/mkspecs/solaris-kcc/qmake.conf
index e1c3052..2c325e8 100644
--- a/mkspecs/solaris-kcc/qmake.conf
+++ b/mkspecs/solaris-kcc/qmake.conf
@@ -29,5 +29,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = +K2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), +K2)
QMAKE_CFLAGS_DEBUG = +K0
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf
index 41279b4..be67cf3 100644
--- a/mkspecs/tru64-cxx/qmake.conf
+++ b/mkspecs/tru64-cxx/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf
index ad2c06e..c71b0ae 100644
--- a/mkspecs/tru64-g++/qmake.conf
+++ b/mkspecs/tru64-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/ultrix-g++/qmake.conf b/mkspecs/ultrix-g++/qmake.conf
index 2b847cb..347c543 100644
--- a/mkspecs/ultrix-g++/qmake.conf
+++ b/mkspecs/ultrix-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB =
diff --git a/mkspecs/unixware-cc/qmake.conf b/mkspecs/unixware-cc/qmake.conf
index 46b4657..e2e73fe 100644
--- a/mkspecs/unixware-cc/qmake.conf
+++ b/mkspecs/unixware-cc/qmake.conf
@@ -20,5 +20,5 @@ QMAKE_CFLAGS = $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -KPIC
diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf
index 2ff9d3a..93ad257 100644
--- a/mkspecs/unixware-g++/qmake.conf
+++ b/mkspecs/unixware-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
diff --git a/mkspecs/win32-borland/qmake.conf b/mkspecs/win32-borland/qmake.conf
index c7b8229..a6339b9 100644
--- a/mkspecs/win32-borland/qmake.conf
+++ b/mkspecs/win32-borland/qmake.conf
@@ -23,5 +23,5 @@ QMAKE_CFLAGS = -tWR $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -w -w-hid
QMAKE_CFLAGS_WARN_OFF = -w-
-QMAKE_CFLAGS_RELEASE = -O2
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2)
QMAKE_CFLAGS_DEBUG = -v
QMAKE_CFLAGS_MT = -tWM
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index 8a24c43..2410e34 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -18,5 +18,5 @@ QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON =
QMAKE_CFLAGS_WARN_OFF =
-QMAKE_CFLAGS_RELEASE = -O
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O)
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index b5476a0..0a7d113 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -22,5 +22,5 @@ QMAKE_CFLAGS = -nologo -Zm200 $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -Od -Ob1s
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -Od -Ob1s)
QMAKE_CFLAGS_DEBUG = -Zi
QMAKE_CFLAGS_MT = -MD
diff --git a/mkspecs/win32-msvc.net/qmake.conf b/mkspecs/win32-msvc.net/qmake.conf
index d75a251..6c4185f 100644
--- a/mkspecs/win32-msvc.net/qmake.conf
+++ b/mkspecs/win32-msvc.net/qmake.conf
@@ -22,5 +22,5 @@ QMAKE_CFLAGS = -nologo -Zm200 $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O1
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O1)
QMAKE_CFLAGS_DEBUG = -Z7
QMAKE_CFLAGS_MT = -MD
diff --git a/mkspecs/win32-msvc/qmake.conf b/mkspecs/win32-msvc/qmake.conf
index f3be273..3a6e650 100644
--- a/mkspecs/win32-msvc/qmake.conf
+++ b/mkspecs/win32-msvc/qmake.conf
@@ -22,5 +22,5 @@ QMAKE_CFLAGS = -nologo -Zm200 $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O1
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O1)
QMAKE_CFLAGS_DEBUG = -Zi
QMAKE_CFLAGS_MT = -MD
diff --git a/mkspecs/win32-visage/qmake.conf b/mkspecs/win32-visage/qmake.conf
index aa8e598..87b3b8f 100644
--- a/mkspecs/win32-visage/qmake.conf
+++ b/mkspecs/win32-visage/qmake.conf
@@ -16,5 +16,5 @@ QMAKE_CFLAGS = -Q -Ft -Gd -Gm+ -qrtti=all $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -Gl+ -O -Oc+
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -Gl+ -O -Oc+)
QMAKE_CFLAGS_DEBUG = -Fb* -Ti -Tm
QMAKE_CFLAGS_YACC =
diff --git a/mkspecs/win32-watcom/qmake.conf b/mkspecs/win32-watcom/qmake.conf
index dd3a71d..1c4760f 100644
--- a/mkspecs/win32-watcom/qmake.conf
+++ b/mkspecs/win32-watcom/qmake.conf
@@ -16,5 +16,5 @@ QMAKE_CFLAGS = -zq $(CFLAGS_EXTRA)
QMAKE_CFLAGS_WARN_ON = -w2
QMAKE_CFLAGS_WARN_OFF = -w0
-QMAKE_CFLAGS_RELEASE = -ox
+QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -ox)
QMAKE_CFLAGS_DEBUG = -d2
QMAKE_CFLAGS_YACC =