summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/symbian')
-rw-r--r--mkspecs/features/symbian/application_icon.prf40
-rw-r--r--mkspecs/features/symbian/debug.prf1
-rw-r--r--mkspecs/features/symbian/def_files.prf95
-rw-r--r--mkspecs/features/symbian/default_post.prf19
-rw-r--r--mkspecs/features/symbian/do_not_build_as_thumb.prf8
-rw-r--r--mkspecs/features/symbian/moc.prf24
-rw-r--r--mkspecs/features/symbian/platform_paths.prf213
-rw-r--r--mkspecs/features/symbian/qt.prf116
-rw-r--r--mkspecs/features/symbian/qt_config.prf9
-rw-r--r--mkspecs/features/symbian/release.prf1
-rw-r--r--mkspecs/features/symbian/symbian_building.prf277
-rw-r--r--mkspecs/features/symbian/thread.prf2
12 files changed, 537 insertions, 268 deletions
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index ebef8b2..1109060 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -15,36 +15,48 @@ contains( CONFIG, no_icon ) {
}
# Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken
- # from SymbianMakefileGenerator::removeSpecialCharacters.
+ # from SymbianCommonGenerator::removeSpecialCharacters.
#
# Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake
# only uses filename from RSS_RULES.icon_file when referring to icon file name.
baseTarget = $$basename(TARGET)
baseTarget = $$replace(baseTarget, /,_)
baseTarget = $$replace(baseTarget, \\,_)
- baseTarget = $$replace(baseTarget, -,_)
- baseTarget = $$replace(baseTarget, :,_)
- baseTarget = $$replace(baseTarget, \.,_)
baseTarget = $$replace(baseTarget, " ",_)
+ symbian-abld|symbian-sbsv2 {
+ baseTarget = $$replace(baseTarget, -,_)
+ baseTarget = $$replace(baseTarget, \.,_)
+ baseTarget = $$replace(baseTarget, :,_)
+ }
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
- symbian-abld {
+ !symbian-sbsv2 {
#Makefile: requires paths with backslash
- contains(QMAKE_HOST.os, "Windows"):ICON = $$replace(ICON, /, \\)
+ ICON_backslashed = $$ICON
+ contains(QMAKE_HOST.os, "Windows"):ICON_backslashed = $$replace( ICON_backslashed, /, \\)
+
+ symbian-abld {
+ mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
+ } else {
+ isEmpty(DESTDIR) {
+ mifIconZDir = .
+ } else {
+ mifIconZDir = $$DESTDIR
+ }
+ }
# Extra compiler rules for mifconv
- mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif
+ mifconv.target = $$mifIconZDir/$${baseTarget}.mif
# Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
# svg-t icons should always use /c32 depth
- mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN}
- mifconv.input = ICON
- mifconv.CONFIG = no_link combine
- # target_predeps together with combine seems not to work correctly, lets define it by ourselves
- PRE_TARGETDEPS += $$mifconv.output
- QMAKE_EXTRA_COMPILERS += mifconv
+ mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed
+ mifconv.depends = $$ICON
+ PRE_TARGETDEPS += $$mifconv.target
+ QMAKE_EXTRA_TARGETS += mifconv
+ QMAKE_DISTCLEAN += $$mifconv.target
}
# Rules to use generated MIF file from symbian resources
- RSS_RULES.number_of_icons = $$size(ICON)
+ RSS_RULES.number_of_icons = $$size(ICON_backslashed)
RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}
diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf
new file mode 100644
index 0000000..b5afeb6
--- /dev/null
+++ b/mkspecs/features/symbian/debug.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb
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/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 7c9e8ee..d29e460 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -28,4 +28,21 @@ contains(TEMPLATE, lib): {
contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG,qt) {
load(application_icon.prf)
-} \ No newline at end of file
+}
+
+isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}")
+isEmpty(TARGET.UID2) {
+ contains(CONFIG, stdbinary) {
+ TARGET.UID2 = 0x20004C45
+ } else {
+ contains(TEMPLATE, app) {
+ contains(QT, gui) {
+ TARGET.UID2 = 0x100039CE
+ } else {
+ TARGET.UID2 = 0
+ }
+ } else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ TARGET.UID2 = 0x1000008d
+ }
+ }
+}
diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf
new file mode 100644
index 0000000..60d9382
--- /dev/null
+++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf
@@ -0,0 +1,8 @@
+symbian-abld|symbian-sbsv2 {
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+} else:linux-armcc {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += --arm
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += --arm
+}
diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf
index 9c21ed7..29e0d8d 100644
--- a/mkspecs/features/symbian/moc.prf
+++ b/mkspecs/features/symbian/moc.prf
@@ -1,16 +1,18 @@
load(moc)
-RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
-}
+symbian-abld|symbian-sbsv2 {
+ RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
+ }
-RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
-}
+ RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
+ }
-RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ }
}
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index a55e842..f05a885 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -50,6 +50,12 @@
#
# ==============================================================================
+symbian-abld|symbian-sbsv2 {
+ epocroot_prefix = /
+} else {
+ epocroot_prefix = $${EPOCROOT}
+}
+
exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# Load platform specific paths
@@ -66,10 +72,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
# ---------------------------------------
@@ -77,10 +83,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
# ---------------------------------------
@@ -88,10 +94,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
# ---------------------------------------
@@ -99,10 +105,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
# ---------------------------------------
@@ -110,11 +116,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# WARNING: If the following path changes see the exists() function around line 219
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# ---------------------------------------
@@ -122,10 +128,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
# ---------------------------------------
@@ -152,18 +158,18 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/app \
- /epoc32/include/platform/app \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/app/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc \
- /epoc32/include/platform/app/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/app \
+ $${epocroot_prefix}epoc32/include/platform/app \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -171,14 +177,14 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -186,10 +192,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -198,7 +204,7 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/platform
+ $${epocroot_prefix}epoc32/include/platform
# ---------------------------------------
@@ -237,10 +243,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
# ---------------------------------------
@@ -248,10 +254,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
# ---------------------------------------
@@ -259,10 +265,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
# ---------------------------------------
@@ -270,10 +276,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
# ---------------------------------------
@@ -281,11 +287,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# WARNING: If the following path changes see the exists() function around line 430
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# ---------------------------------------
@@ -293,10 +299,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
# ---------------------------------------
@@ -323,20 +329,20 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/applications \
- /epoc32/include/domain/applications \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/applications/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc \
- /epoc32/include/domain/applications/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/applications \
+ $${epocroot_prefix}epoc32/include/domain/applications \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -344,16 +350,16 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -361,12 +367,12 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/osextensions/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -375,9 +381,9 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions
# ---------------------------------------
@@ -387,41 +393,41 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sys) \
- /epoc32/include/stdapis \
- /epoc32/include/stdapis/sys
+ $${epocroot_prefix}epoc32/include/stdapis \
+ $${epocroot_prefix}epoc32/include/stdapis/sys
OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) \
- /epoc32/include/stdapis/glib-2.0 \
- /epoc32/include/stdapis/glib-2.0/glib \
- /epoc32/include/stdapis/glib-2.0/gObject
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/glib \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/gObject
OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) \
- /epoc32/include/stdapis/openssl
+ $${epocroot_prefix}epoc32/include/stdapis/openssl
# stlportv5 is preferred over stlport as it has the throwing version of operator new
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \
- /epoc32/include/stdapis/stlportv5
+ $${epocroot_prefix}epoc32/include/stdapis/stlportv5
exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlport) \
|exists($${EPOCROOT}epoc32/include/stdapis/stlport) {
!exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5) \
:!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) {
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \
- /epoc32/include/stdapis/stlport
+ $${epocroot_prefix}epoc32/include/stdapis/stlport
}
}
OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) \
- /epoc32/include/stdapis/boost
+ $${epocroot_prefix}epoc32/include/stdapis/boost
OS_LAYER_DBUS_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) \
- /epoc32/include/stdapis/dbus-1.0 \
- /epoc32/include/stdapis/dbus-1.0/dbus
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0/dbus
OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) \
- /epoc32/include/stdapis/utility
+ $${epocroot_prefix}epoc32/include/stdapis/utility
}
@@ -433,31 +439,31 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/app/$$1)
}
defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1)
}
defineReplace(LANGUAGE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/language/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/language/app/$$1)
}
defineReplace(LANGUAGE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/language/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/language/mw/$$1)
}
defineReplace(CUSTOMER_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customer/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customer/app/$$1)
}
defineReplace(CUSTOMER_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customer/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customer/mw/$$1)
}
defineReplace(CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customervariant/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/app/$$1)
}
defineReplace(CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/customervariant/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/mw/$$1)
}
# You need to define the following in pro-file, if you are using the stllib:
@@ -468,5 +474,4 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
}
-
-
+epocroot_prefix =
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
index 02b3003..294a68c 100644
--- a/mkspecs/features/symbian/qt.prf
+++ b/mkspecs/features/symbian/qt.prf
@@ -40,116 +40,8 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0
isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-# Sis file creation
-make_cache_name = .make.cache
-!symbian-abld:!symbian-sbsv2 {
- fixedDestdir = $$DESTDIR
- !isEmpty(fixedDestdir):!contains(fixedDestdir, "[/\\]$"):fixedDestdir = $${fixedDestdir}/
- contains(QMAKE_HOST.os, "Windows"):fixedDestdir = $$replace(fixedDestdir, "/", "\\")
-} else {
- fixedDestdir =
-}
-
-sis_target.target = sis
-sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
- $(if $(wildcard $$make_cache_name), \
- $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \
- , \
- $(if $(QT_SIS_TARGET), \
- $(MAKE) -f $(MAKEFILE) ok_sis \
- , \
- $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
- ) \
- ) \
- , \
- $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
- )
-
-ok_sis_target.target = ok_sis
-ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
- $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
-
-target_sis_target.target = $${fixedDestdir}$${TARGET}.sis
-target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
-
-installer_sis_target.target = installer_sis
-installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \
- $(MAKE) -f $(MAKEFILE) ok_installer_sis \
- , \
- $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
- )
-installer_sis_target.depends = $${fixedDestdir}$${TARGET}.sis
-
-ok_installer_sis_target.target = ok_installer_sis
-ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
- $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
-
-fail_sis_nopkg_target.target = fail_sis_nopkg
-fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)"
-
-fail_sis_nocache_target.target = fail_sis_nocache
-fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)"
-
-symbian-abld|symbian-sbsv2 {
- # Only enable stub_sis files for the abld/sbsv2 build systems for now, since we don't
- # support ROM builds for any other Symbian build system.
- stub_sis_target.target = stub_sis
- stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
- $(if $(wildcard $$make_cache_name), \
- $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \
- , \
- $(if $(QT_SIS_TARGET), \
- $(MAKE) -f $(MAKEFILE) ok_stub_sis \
- , \
- $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
- ) \
- ) \
- , \
- $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
- )
-
- ok_stub_sis_target.target = ok_stub_sis
- ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
- $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
-
- QMAKE_EXTRA_TARGETS += stub_sis_target \
- ok_stub_sis_target
-} else {
- # DESTDIR is not honored on abld and sbsv2
- !isEmpty(DESTDIR) {
- ok_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
- ok_installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
- }
-}
-
-QMAKE_EXTRA_TARGETS += sis_target \
- ok_sis_target \
- target_sis_target \
- installer_sis_target \
- ok_installer_sis_target \
- fail_sis_nopkg_target \
- fail_sis_nocache_target
-
-# Sbsv2 has its own store_build target which is using flms.
-!symbian-sbsv2 {
- contains(QMAKE_HOST.os, "Windows") {
- shellFixedHash = $${LITERAL_HASH}
- } else {
- shellFixedHash = \\$${LITERAL_HASH}
- }
- store_build_target.target = store_build
- store_build_target.commands = \
- @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \
- && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \
- && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \
- && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \
- && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \
- && echo $${shellFixedHash} make sis target. >> $$make_cache_name \
- && echo $${shellFixedHash} Version : >> $$make_cache_name \
- && echo $${shellFixedHash} >> $$make_cache_name \
- && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \
- && echo. >> $$make_cache_name \
- && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
-
- QMAKE_EXTRA_TARGETS += store_build_target
+# Workaround for the fact that Gnupoc and Symbian chose different approaches to
+# the letter casing of headers.
+contains(CONFIG, is_using_gnupoc) {
+ INCLUDEPATH += $$QT_SOURCE_TREE/mkspecs/common/symbian/header-wrappers
}
diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf
new file mode 100644
index 0000000..2f446dc
--- /dev/null
+++ b/mkspecs/features/symbian/qt_config.prf
@@ -0,0 +1,9 @@
+load(qt_config)
+
+!contains(QMAKE_HOST.os, "Windows") {
+ # Test for the existence of lower cased headers, a sign of using Gnupoc.
+ # Note that the qmake "exists" test won't do because it is case insensitive.
+ system("test -f $${EPOCROOT}/epoc32/include/akndoc.h") {
+ CONFIG += is_using_gnupoc
+ }
+}
diff --git a/mkspecs/features/symbian/release.prf b/mkspecs/features/symbian/release.prf
new file mode 100644
index 0000000..8164495
--- /dev/null
+++ b/mkspecs/features/symbian/release.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/urel
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
new file mode 100644
index 0000000..9ccfd2f
--- /dev/null
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -0,0 +1,277 @@
+# we have some module specific options (defined in qt.prf) lets add them
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS)
+!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR
+eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS)
+!isEmpty(TMPVAR) {
+ QMAKE_LFLAGS += $$TMPVAR
+} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains
+ QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
+}
+
+symbianObjdir=$$OBJECTS_DIR
+isEmpty(symbianObjdir) {
+ symbianObjdir = .
+}
+symbianDestdir=$$DESTDIR
+isEmpty(symbianDestdir) {
+ symbianDestdir = .
+}
+
+contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") {
+ DEFINES += __MARM_THUMB__
+}
+
+defineReplace(processSymbianLibraries) {
+ library = $$replace(1, "\.dll$", ".dso")
+ library = $$replace(library, "^-l", "")
+ isFullName = $$find(library, \.)
+ isEmpty(isFullName):library="$${library}.dso"
+ linux-gcce {
+ newLIB = "-l:$${library}"
+ } else {
+ newLIB = "$${library}"
+ }
+ contains(library, "\.dso$")|contains(library, ".lib$"):PRE_TARGETDEPS += $$library
+ return($$newLIB)
+}
+
+for(libraries, LIBS) {
+ newLIBS += $$processSymbianLibraries($$libraries)
+}
+LIBS = $$newLIBS
+newLIBS =
+for(libraries, QMAKE_LIBS) {
+ newLIBS += $$processSymbianLibraries($$libraries)
+}
+QMAKE_LIBS = $$newLIBS
+
+linux-gcce {
+ QMAKE_LIBS += -l:usrt2_2.lib \
+ -l:dfpaeabi.dso \
+ -l:drtaeabi.dso \
+ -l:scppnwdl.dso \
+ -lsupc++ \
+ -lgcc
+}
+
+elf2e32_LIBPATH =
+for(libPath, QMAKE_LIBDIR) {
+ elf2e32_LIBPATH += "--libpath=$$libPath"
+}
+
+isEmpty(VERSION) {
+ VERSION = $$QT_VERSION
+}
+
+# Check for version validity.
+!isEmpty(VERSION):!contains(VERSION, "[0-9]+"):!contains(VERSION, "[0-9]+\.[0-9]+")!contains(VERSION, "[0-9]+(\.[0-9]+){2}") {
+ error("Invalid VERSION for Symbian: $$VERSION")
+}
+
+splitVersion = $$split(VERSION, ".")
+count(splitVersion, 0) {
+ # Default Symbian version if none is specified.
+ hexVersion = "000a0000"
+ decVersion = "10.0"
+} else {
+ count(splitVersion, 3) {
+ hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'")
+ hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")"
+ hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")"
+ decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'").
+ hexVersion = $$hexVersion$$hexPart2
+ decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'")
+ !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}"
+ } else { # app code may have different numbering...
+ hexVersion = $$VERSION
+ decVersion = $$VERSION
+ }
+}
+#error ("hexVersion: $$hexVersion, decVersion: $$decVersion")
+
+intUid3 = $$lower($$replace(TARGET.UID3, "^0x", ""))
+isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3
+isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000
+
+capability = $$replace(TARGET.CAPABILITY, " ", "+")
+capability = $$join(capability, "+")
+capability = $$replace(capability, "\+-", "-")
+isEmpty(capability): capability = "None"
+capability = "--capability=$$capability"
+
+contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(QMAKE_POST_LINK) {
+ # No way to honor the '@' :-(
+ QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
+ QMAKE_POST_LINK = && $$QMAKE_POST_LINK
+ }
+ # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error.
+ # The comparison of dso files is to avoid extra building of modules that depend on this dso, in
+ # case it has not changed.
+ QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \
+ && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \
+ --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
+ --stack=0x00014000 --fpu=softvfp --targettype=DLL \
+ --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \
+ --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 \
+ $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \
+ fi \
+ $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def
+
+ linux-armcc: {
+ QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
+ } else :linux-gcce {
+ #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib
+ }
+
+ QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
+ DEFINES += __DLL__
+}
+
+contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
+ !isEmpty(QMAKE_POST_LINK) {
+ # No way to honor the '@' :-(
+ QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "")
+ QMAKE_POST_LINK = && $$QMAKE_POST_LINK
+ }
+ # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error
+ QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \
+ && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a \
+ --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
+ --stack=0x00014000 --fpu=softvfp --targettype=EXE \
+ --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 \
+ && ln "$${symbianDestdir}/$${TARGET}.exe" "$${symbianDestdir}/$$TARGET" \
+ $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe
+ QMAKE_CLEAN += $${symbianDestdir}/$${TARGET}
+
+ linux-armcc: {
+ QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
+ } else :linux-gcce {
+ #QMAKE_LIBS += -l:eexe.lib
+ }
+
+ QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
+# TODO gcce added --shared here...
+ DEFINES += __EXE__
+}
+
+# Symbian resource files
+linux-armcc: {
+ SYMBIAN_RVCT22INC=$$(RVCT22INC)
+ !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC}
+}
+symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
+symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
+symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
+symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
+symbian_resources_INCLUDES += "-I $$symbian_resources_RCC_DIR"
+
+for(symbian_resource, SYMBIAN_RESOURCES) {
+ symbian_resource = $$basename(symbian_resource)
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc")
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${symbian_resource_clean}
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rpp")
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean}
+}
+
+symbianresources.input = SYMBIAN_RESOURCES
+symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}.rsg
+symbianresources.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ ${QMAKE_FILE_NAME} \
+ -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ -o$${symbianDestdir}/${QMAKE_FILE_BASE}.rsc \
+ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \
+ -i${QMAKE_FILE_NAME}
+symbianresources.dependency_type = TYPE_C
+symbianresources.CONFIG = no_link target_predeps
+
+QMAKE_EXTRA_COMPILERS += symbianresources
+
+contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
+ baseTarget = $$basename(TARGET)
+ # If you change this, also see application_icon.prf
+ baseTarget = $$replace(baseTarget, " ",_)
+
+ # Make our own extra target in order to get dependencies for generated
+ # files right. This also avoids the warning about files not found.
+ symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ symbianGenResource.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ $${baseTarget}.rss \
+ -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ -o$${symbianDestdir}/$${baseTarget}.rsc \
+ -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \
+ -i$${baseTarget}.rss
+ symbianGenResource.depends = $${baseTarget}.rss
+ PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
+ QMAKE_DISTCLEAN += $${baseTarget}.rss
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc
+
+ symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ symbianGenRegResource.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ $${baseTarget}_reg.rss \
+ -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ -o$${symbianDestdir}/$${baseTarget}_reg.rsc \
+ -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \
+ -i$${baseTarget}_reg.rss
+ symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
+ QMAKE_DISTCLEAN += $${TARGET}_reg.rss
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}_reg.rsc
+
+ # Trick to get qmake to create the RCC_DIR for us.
+ symbianRccDirCreation.input = SOURCES
+ symbianRccDirCreation.commands =
+ symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy
+ symbianRccDirCreation.CONFIG = no_link combine
+
+ QMAKE_EXTRA_TARGETS += symbianGenResource symbianGenRegResource
+ QMAKE_EXTRA_COMPILERS += symbianRccDirCreation
+
+ QMAKE_DISTCLEAN += $${TARGET}.loc
+}
+
+# Generated pkg files
+
+QMAKE_DISTCLEAN += $${TARGET}_template.pkg
+
+# Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to
+# a forked process. We quite easily overstep this boundary when building big projects
+# on Symbian, and since we depend on running the system() command, this causes the build
+# to fail. Test here that system() can be successfully run. It is important that this
+# check happens as late as possible, otherwise it will not be caught.
+execve_sanity_test = $$system("echo testing")
+!contains(execve_sanity_test, "testing") {
+ error("Running system() failed. Maybe your kernel is too old? (Linux kernels need at least version 2.6.23)")
+}
diff --git a/mkspecs/features/symbian/thread.prf b/mkspecs/features/symbian/thread.prf
new file mode 100644
index 0000000..885438a
--- /dev/null
+++ b/mkspecs/features/symbian/thread.prf
@@ -0,0 +1,2 @@
+# Symbian behaves like POSIX when it comes to threads.
+include(../unix/thread.prf)