Hello guys,
i have a question about the release and debug output of qmake.

I have this code (only a part) in my *.pro file.

Qt Code:
  1. QT += xml
  2.  
  3. TARGET = targetName
  4. TEMPLATE = app
  5. OBJECTS_DIR = objects
  6. MOC_DIR = mocs
  7.  
  8. CONFIG(debug) {
  9. DESTDIR = ../debug
  10. message(Building debug.)
  11. } else {
  12. DESTDIR = ../release
  13. message(Building release.)
  14. }
To copy to clipboard, switch view to plain text mode 

And then i produce a Makefile for debug by
Qt Code:
  1. /opt/toolchain/arm/bin/qmake -spec /opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -o Makefile *.pro
To copy to clipboard, switch view to plain text mode 
and for release
Qt Code:
  1. /opt/toolchain/arm/bin/qmake -spec /opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -o Makefile *.pro "CONFIG=release"
To copy to clipboard, switch view to plain text mode 

I get two different Makefiles. So far so good.

But I can't compile the release version because the "DEFINES" and the "INCPATH" is bugy.
Here the debug Makefile (only a part):
Qt Code:
  1. DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
  2. CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
  3. CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
  4. INCPATH = -I/opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -I. -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include/qtopia/QtCore -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include/qtopia/QtNetwork -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include/qtopia/QtGui -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include/qtopia/QtXml -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include/qtopia -Imocs -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include
  5. LIBS = $(SUBLIBS) -L/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/lib -lQtXmlE -lQtGuiE -lQtNetworkE -lQtCoreE -lpthread
To copy to clipboard, switch view to plain text mode 

And the release part:
Qt Code:
  1. DEFINES =
  2. CFLAGS = -pipe -O2 $(DEFINES)
  3. CXXFLAGS = -pipe -O2 $(DEFINES)
  4. INCPATH = -I/opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -I. -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include
  5. LIBS = $(SUBLIBS) -L/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/lib
To copy to clipboard, switch view to plain text mode 

Why does this happend?