summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-08 15:53:35 (GMT)
committeraxis <qt-info@nokia.com>2010-03-08 15:53:35 (GMT)
commit1a289e35cffc55b341a7c4894a26c1693a575f98 (patch)
tree717cb1a29f985ff6ba1f868fb394bf84f6c1f028 /mkspecs
parent34898eaa384684c74786cd59fc322054c8888c51 (diff)
downloadQt-1a289e35cffc55b341a7c4894a26c1693a575f98.zip
Qt-1a289e35cffc55b341a7c4894a26c1693a575f98.tar.gz
Qt-1a289e35cffc55b341a7c4894a26c1693a575f98.tar.bz2
Added Symbian def file support to Linux build system.
This also switches the official def file variable in qmake profiles to DEF_FILE. Support for freezing def files was also added, but needs more work and is therefore disabled for now. Task: QTBUG-7510 Task: QTBUG-8052
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf1
-rw-r--r--mkspecs/features/symbian/def_files.prf95
-rw-r--r--mkspecs/symbian/linux-armcc/features/symbian_building.prf2
3 files changed, 72 insertions, 26 deletions
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index c8a88dd..13b335a 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -22,6 +22,7 @@ QMAKE_CFLAGS_DEBUG += -g
QMAKE_CXXFLAGS_DEBUG += -g
QMAKE_CFLAGS_RELEASE += -O2 -Otime
QMAKE_CXXFLAGS_RELEASE += -O2 -Otime
+QMAKE_ELF2E32_FLAGS +=
DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 48d91aa..a1f0c8d 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -3,32 +3,75 @@
CONFIG -= def_files_disabled
-# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
-# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
-# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
-!contains(MMP_RULES, defBlock) {
- # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
- # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
- # statements - they use the qmake generated statements instead
- # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
- !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
- !isEmpty(defFilePath) {
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
- } else {
- # If defFilePath is not defined, then put the folders containing the DEF files at the
- # same level as the .pro (and generated MMP) file(s)
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ./bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE ./eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
+symbian-abld|symbian-sbsv2 {
+ # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
+ # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
+ # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
+ !contains(MMP_RULES, defBlock) {
+ # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
+ # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
+ # statements - they use the qmake generated statements instead
+ # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ !isEmpty(DEF_FILE) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$DEF_FILE/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$DEF_FILE/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else:!isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else {
+ # If defFilePath is not defined, then put the folders containing the DEF files at the
+ # same level as the .pro (and generated MMP) file(s)
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ./bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ }
+ MMP_RULES += defBlock
}
- MMP_RULES += defBlock
}
+
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(DEF_FILE) {
+ defFile = $$DEF_FILE
+ } else {
+ defFile = .
+ }
+ system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
+ !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
+ system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
+ }
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(TARGET)u.def
+ } else {
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile
+ }
+ QMAKE_ELF2E32_FLAGS += "`test -e $$elf2e32FileToAdd && echo --definput=$$elf2e32FileToAdd`"
+
+ symbianObjdir = $$OBJECTS_DIR
+ isEmpty(symbianObjdir):symbianObjdir = .
+
+ freeze_target.target = freeze
+ freeze_target.depends = first
+ # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do.
+ freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else:contains(TEMPLATE, subdirs) {
+ freeze_target.target = freeze
+ freeze_target.CONFIG = recursive
+ freeze_target.recurse = $$SUBDIRS
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else {
+ freeze_target.target = freeze
+ freeze_target.commands =
+ #QMAKE_EXTRA_TARGETS += freeze_target
}
diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
index dab2fbf..12ca516 100644
--- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf
+++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
@@ -102,6 +102,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
--dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \
--unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
--compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
&& if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \
> /dev/null 2>&1; then \
@@ -132,6 +133,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
--elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \
--unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
--compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
$$QMAKE_POST_LINK
QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET"