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 += xml
TARGET = targetName
TEMPLATE = app
OBJECTS_DIR = objects
MOC_DIR = mocs
CONFIG(debug) {
DESTDIR = ../debug
message(Building debug.)
} else {
DESTDIR = ../release
message(Building release.)
}
QT += xml
TARGET = targetName
TEMPLATE = app
OBJECTS_DIR = objects
MOC_DIR = mocs
CONFIG(debug) {
DESTDIR = ../debug
message(Building debug.)
} else {
DESTDIR = ../release
message(Building release.)
}
To copy to clipboard, switch view to plain text mode
And then i produce a Makefile for debug by
/opt/toolchain/arm/bin/qmake -spec /opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -o Makefile *.pro
/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
/opt/toolchain/arm/bin/qmake -spec /opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -o Makefile *.pro "CONFIG=release"
/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):
DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
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
LIBS = $(SUBLIBS) -L/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/lib -lQtXmlE -lQtGuiE -lQtNetworkE -lQtCoreE -lpthread
DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
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
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:
DEFINES =
CFLAGS = -pipe -O2 $(DEFINES)
CXXFLAGS = -pipe -O2 $(DEFINES)
INCPATH = -I/opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -I. -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include
LIBS = $(SUBLIBS) -L/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/lib
DEFINES =
CFLAGS = -pipe -O2 $(DEFINES)
CXXFLAGS = -pipe -O2 $(DEFINES)
INCPATH = -I/opt/toolchain/arm/mkspecs/qws/linux-gnueabi-arm-g++ -I. -I/opt/toolchain/arm/arm-toolchain-linux-gnueabi/usr/include
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?
Bookmarks