summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/symbian')
-rw-r--r--mkspecs/features/symbian/add_mmp_rules.prf33
-rw-r--r--mkspecs/features/symbian/application_icon.prf87
-rw-r--r--mkspecs/features/symbian/armcc_warnings.prf22
-rw-r--r--mkspecs/features/symbian/data_caging_paths.prf80
-rw-r--r--mkspecs/features/symbian/debug.prf1
-rw-r--r--mkspecs/features/symbian/def_files.prf96
-rw-r--r--mkspecs/features/symbian/def_files_disabled.prf13
-rw-r--r--mkspecs/features/symbian/default_post.prf100
-rw-r--r--mkspecs/features/symbian/default_pre.prf2
-rw-r--r--mkspecs/features/symbian/do_not_build_as_thumb.prf13
-rw-r--r--mkspecs/features/symbian/epocallowdlldata.prf1
-rw-r--r--mkspecs/features/symbian/localize_deployment.prf118
-rw-r--r--mkspecs/features/symbian/moc.prf18
-rw-r--r--mkspecs/features/symbian/nested_exceptions.prf4
-rw-r--r--mkspecs/features/symbian/opengl.prf21
-rw-r--r--mkspecs/features/symbian/platform_paths.prf496
-rw-r--r--mkspecs/features/symbian/prepend_includepath.prf14
-rw-r--r--mkspecs/features/symbian/qt.prf13
-rw-r--r--mkspecs/features/symbian/qt_config.prf9
-rw-r--r--mkspecs/features/symbian/release.prf1
-rw-r--r--mkspecs/features/symbian/run_on_phone.prf40
-rw-r--r--mkspecs/features/symbian/sis_targets.prf226
-rw-r--r--mkspecs/features/symbian/stl.prf43
-rw-r--r--mkspecs/features/symbian/stl_off.prf2
-rw-r--r--mkspecs/features/symbian/symbian_building.prf369
-rw-r--r--mkspecs/features/symbian/thread.prf2
26 files changed, 1824 insertions, 0 deletions
diff --git a/mkspecs/features/symbian/add_mmp_rules.prf b/mkspecs/features/symbian/add_mmp_rules.prf
new file mode 100644
index 0000000000..7f96b811a2
--- /dev/null
+++ b/mkspecs/features/symbian/add_mmp_rules.prf
@@ -0,0 +1,33 @@
+# Arg1: List of conditions to generate block for
+# Arg2: List of variables containing rules to add
+defineTest(addMMPRules) {
+ unset(myConditions)
+ unset(myVariables)
+ unset(myIfDef)
+
+ myConditions = $$eval($$1) default
+ myVariables = $$eval($$2)
+ myIfDef = if
+
+ for(condition, $$list($$myConditions)) {
+ contains(condition, default) {
+ libBlock = "$${LITERAL_HASH}else"
+ } else {
+ libBlock = "$${LITERAL_HASH}$${myIfDef} defined($${condition})"
+ myIfDef = elif
+ }
+
+ for(var, $$list($$myVariables)) {
+ varVal = $$eval($${var}.$${condition})
+ isEmpty(varVal) {
+ # No value defined for current condition, so use default
+ varVal = $$eval($${var}.default)
+ }
+ !isEmpty(varVal): libBlock += "$$join(varVal,$$escape_expand(\\n))"
+ }
+
+ MMP_RULES += $$libBlock
+ }
+ MMP_RULES += "$${LITERAL_HASH}endif"
+ export(MMP_RULES)
+}
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
new file mode 100644
index 0000000000..d9918bfd5f
--- /dev/null
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -0,0 +1,87 @@
+load(data_caging_paths)
+
+contains(CONFIG, no_icon) {
+ # If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW
+ # requires the registration resource file to exist always
+ contains(QT, gui):contains(CONFIG, qt) {
+ symbian:RSS_RULES += "hidden = KAppIsHidden;"
+ CONFIG -= no_icon
+ }
+}
+
+
+!contains(CONFIG, no_icon) {
+ baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
+ contains(baseTarget, "^.*\\..*$") {
+ CONFIG += no_icon
+ ICON =
+ warning("Symbian resources do not support '.' character in TARGET, skipping resource generation.")
+ } else {
+ symbian-abld|symbian-sbsv2 {
+ resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR
+ regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR
+ } else {
+ contains(DESTDIR, "/.*") {
+ resourceZDir = $$DESTDIR
+ } else:isEmpty(DESTDIR) {
+ resourceZDir = $$OUT_PWD
+ } else {
+ resourceZDir = $$OUT_PWD/$$DESTDIR
+ }
+ regZDir = $$resourceZDir
+ }
+
+ default_resource_deployment.files += $$resourceZDir/$${baseTarget}.rsc
+ default_resource_deployment.path = $$APP_RESOURCE_DIR
+ default_reg_deployment.files += $$regZDir/$${baseTarget}_reg.rsc
+ default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR
+
+ !isEmpty(ICON) {
+ !count(ICON, 1) {
+ ICON = $$first(ICON)
+ warning("Only first icon specified in ICON variable is used: $$ICON")
+ }
+
+ # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
+ !symbian-sbsv2 {
+ # Absolute path required for shadow builds.
+ # However, in older Symbian environments abld toolchain can't handle even moderately long
+ # paths, so don't force absolute there.
+ !symbian-abld:!contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON
+
+ #Makefile: requires paths with backslash
+ ICON_backslashed = $$ICON
+
+ symbian-abld {
+ # ${ZDIR} is defined in Makefile
+ mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
+ } else {
+ mifIconZDir = $$resourceZDir
+ }
+
+ # Extra compiler rules for mifconv
+ mifconv.target = $$mifIconZDir/$${baseTarget}.mif
+ contains(QMAKE_HOST.os, "Windows") {
+ ICON_backslashed = $$replace(ICON_backslashed, /, \\)
+ mifconv.target = $$replace(mifconv.target, /, \\)
+ }
+ # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
+ # svg-t icons should always use /c32 depth
+ mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed
+
+ mifconv.depends = $$ICON
+ PRE_TARGETDEPS += $$mifconv.target
+ QMAKE_EXTRA_TARGETS += mifconv
+ QMAKE_CLEAN += $$mifconv.target
+ }
+ # Rules to use generated MIF file from symbian resources
+ RSS_RULES.number_of_icons = $$size(ICON_backslashed)
+
+ RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
+
+ default_resource_deployment.files += $$resourceZDir/$${baseTarget}.mif
+ }
+ }
+}
+
+
diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf
new file mode 100644
index 0000000000..3331bffeef
--- /dev/null
+++ b/mkspecs/features/symbian/armcc_warnings.prf
@@ -0,0 +1,22 @@
+# 68: integer conversion resulted in a change of sign (sounds useful, but it's
+# buggy and is reported even in places where it makes no sense)
+# 111: Statement is unreachable
+# 185: Dynamic initialization in unreachable code
+# 187: use of "=" where "==" may have been intended
+# 191: Type qualifier is meaningless on cast type
+# 368: class "<class>" defines no constructor to initialize the following: <member>
+# (Disabled because there are other ways of assigning besides constructors)
+# 830: function "xxx" has no corresponding operator delete (to be called if an
+# exception is thrown during initialization of an allocated object) (used a
+# lot in 3rd party code)
+# 997: function "xxx" is hidden by "yyy" -- virtual function override intended?
+# (used all over the place in the Symbian SDK)
+# 1293: Assignment in condition
+# 1294: pre-ANSI C style functions declarations (used a lot in 3rd party code)
+# 2874: <variable> may be used before being set (this one sounds useful, but
+# it's output also for class instances, making it useless in practice)
+QMAKE_CFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874
+QMAKE_CXXFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874
+
+# 6780: <origvis> visibility removed from symbol '<symname>' through <impexp>
+QMAKE_LFLAGS.ARMCC += --diag_suppress 6780
diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf
new file mode 100644
index 0000000000..7f5420cc88
--- /dev/null
+++ b/mkspecs/features/symbian/data_caging_paths.prf
@@ -0,0 +1,80 @@
+#
+# ==============================================================================
+# Name : data_caging_paths.prf
+# Part of :
+# Interface : Data Caging Path Definitions API for Qt/S60
+# Description : Predefined include paths to be used in the pro-files for the
+# paths related to data caging.
+#
+# Usage examples:
+#
+# # Load these definitions on pro-file if needed:
+# load(data_caging_paths)
+#
+# # These variables are mostly useful when specifying deployment
+#
+# myLib.files = myLib.dll
+# myLib.path = $$SHARED_LIB_DIR
+# DEPLOYMENT += myLib
+#
+# # Note: Do not use $$PLUGINS_DIR or $$PLUGINS_1_DIR to deploy Qt plugins.
+# # $$QT_PUBLIC_PLUGINS_BASE specifies the public base directory for Qt
+# # plugin stubs:
+#
+# myPublicImageFormatPlugin.files = myImageFormat.dll
+# myPublicImageFormatPlugin.path = $$QT_PLUGINS_BASE_DIR/imageformats
+# DEPLOYMENT += myPublicImageFormatPlugin
+#
+# ==============================================================================
+
+exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) {
+
+ # Load platform specific paths
+ load($${EPOCROOT}epoc32/include/data_caging_paths.prf)
+
+} else {
+ # No platform specific paths provided, use default paths
+
+ APPARC_RECOGNISER_RESOURCES_DIR = /resource/apps/registrationresourcefiles
+ APP_BITMAP_DIR = /resource/apps
+ APP_RESOURCE_DIR = /resource/apps
+ BITMAP_DIR = /resource/apps
+ BIOFILE_DIR = /resource/messaging/bif
+ CHARCONV_PLUGIN_DIR = /resource/charconv
+ CONTACTS_RESOURCE_DIR = /resource/cntmodel
+ CTRL_PANEL_RESOURCE_DIR = /resource/controls
+ CONVERTER_PLUGIN_RESOURCE_DIR = /resource/convert
+ ECOM_RESOURCE_DIR = /resource/plugins
+ ERROR_RESOURCE_DIR = /resource/errors
+ PROGRAMS_DIR = /sys/bin
+ FEP_RESOURCES_DIR = /resource/fep
+ HELP_FILE_DIR = /resource/help
+ LOG_ENGINE_RESOURCE_DIR = /resource/logengine
+ MTM_RESOURCE_DIR = /resource/messaging
+ MTM_INFO_FILE_DIR = /resource/messaging/mtm
+ PRINTER_DRIVER_DIR = /resource/printers
+ SHARED_LIB_DIR = /sys/bin
+ UIKLAF_RESOURCE_DIR = /resource/uiklaf
+ WAPPUSH_PLUGIN_RESOURCE_DIR = /resource/messaging/wappush
+ WATCHER_PLUGIN_RESOURCE_DIR = /resource/messaging/watchers
+ RECOGNISERS_DIR = /sys/bin
+ PARSERS_DIR = /sys/bin
+ NOTIFIERS_DIR = /sys/bin
+ PLUGINS_DIR = /sys/bin
+ PLUGINS_1_DIR = /sys/bin
+ RESOURCE_FILES_DIR = /resource
+
+ CA_CERTIFICATES_DIR = /private/101f72a6
+ COMMDB_DIR = /private/100012a5
+ SS_CONFIG_FILE_DIR = /private/101f7989/esock
+ TRUSTED_FONTS_DIR = /private/10003a16/fonts
+ UNTRUSTED_FONT_DIR = /private/10003a16/import/fonts
+ WINDOW_SERVER_INI_DIR = /private/10003b20
+ SKINS_DIR = /private/10207114
+ BOOTDATA_DIR = /resource/bootdata
+}
+
+isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z
+isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps
+isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps
+isEmpty(APP_PRIVATE_DIR_BASE): APP_PRIVATE_DIR_BASE = /private
diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf
new file mode 100644
index 0000000000..b5afeb6ba6
--- /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
new file mode 100644
index 0000000000..746de6a242
--- /dev/null
+++ b/mkspecs/features/symbian/def_files.prf
@@ -0,0 +1,96 @@
+# With DEF files enabled, removed exported symbols are treated as errors
+# and there is binary compatibility between successive builds.
+
+CONFIG -= def_files_disabled
+
+# We need a target name without the INFIX'ed part, since DEF files are not infixed.
+equals(QMAKE_TARGET_PRODUCT, Qt4)|equals(QMAKE_TARGET_PRODUCT, QTestLib):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
+else:clean_TARGET = $$TARGET
+
+defineTest(qtTestIfDirExists) {
+ contains(QMAKE_HOST.os,Windows) {
+ dirToTest = $$1
+ $$dirToTest ~= s,/,\\,
+ # Windows trick. Test for existence of nul, which every directory has.
+ retValue = $$system("if exist $$dirToTest\\nul echo true")
+ contains(retValue, true):return(true)|return(false)
+ } else {
+ system("test -d $$1"):return(true)|return(false)
+ }
+}
+
+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)
+ # Similarly, explicit EXPORTUNFROZEN should block adding defBlock
+ !contains(MMP_RULES, defBlock):!contains(MMP_RULES, EXPORTUNFROZEN) {
+ # 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/$${clean_TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$DEF_FILE/eabi/$${clean_TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else:!isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${clean_TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${clean_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/$${clean_TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${clean_TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ }
+ MMP_RULES += defBlock
+ }
+ }
+
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib):!contains(CONFIG, plugin) {
+ !isEmpty(DEF_FILE) {
+ defFile = $$DEF_FILE
+ } else {
+ defFile = .
+ }
+ qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) {
+ !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
+ dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi
+ contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\,
+ system("$$QMAKE_MKDIR $$dirToCreate")
+ }
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def
+ } else {
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile
+ }
+ QMAKE_ELF2E32_FLAGS += "--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 = $$QMAKE_COPY $$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/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf
new file mode 100644
index 0000000000..0344911f6d
--- /dev/null
+++ b/mkspecs/features/symbian/def_files_disabled.prf
@@ -0,0 +1,13 @@
+# With DEF files disabled, binary compatibility is broken every time you build
+
+CONFIG -= def_files
+
+# See def_files.prf for reasoning on the slight nastiness of this
+!contains(MMP_RULES, defBlock) {
+ # See def_files.prf for reasoning for excluding target types and configs below
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without
+ # needing to run abld/sbs freeze
+ MMP_RULES *= EXPORTUNFROZEN
+ }
+}
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
new file mode 100644
index 0000000000..470372eb4a
--- /dev/null
+++ b/mkspecs/features/symbian/default_post.prf
@@ -0,0 +1,100 @@
+load(default_post)
+
+contains(TEMPLATE, ".*app") {
+ contains(CONFIG, stdbinary) {
+ QMAKE_LIBS +=
+ } else:contains(CONFIG,qt) {
+ QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
+ } else {
+ QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY
+ }
+
+ contains(DESTDIR, "/.*") {
+ default_bin_deployment.files += $$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
+ } else:isEmpty(DESTDIR) {
+ default_bin_deployment.files += $$OUT_PWD/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
+ } else {
+ default_bin_deployment.files += $$OUT_PWD/$$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe
+ }
+ default_bin_deployment.path += /sys/bin
+
+ load(application_icon.prf)
+}
+contains(TEMPLATE, lib): {
+ contains(CONFIG, staticlib)|contains(CONFIG, static): {
+ # Static libs should not have LIBRARY statements in S60
+ QMAKE_LIBS =
+ # Static libs do not need def files
+ MMP_RULES -= EXPORTUNFROZEN
+ }
+ contains(CONFIG, plugin):!contains(CONFIG, stdbinary): {
+ # Plugins based on normal libraries have predefined def file
+ MMP_RULES -= EXPORTUNFROZEN
+ }
+} else {
+ # Applications don't need this
+ MMP_RULES -= EXPORTUNFROZEN
+}
+
+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
+ }
+ }
+}
+
+# Add dependency to Qt package to all other projects besides Qt libs.
+# Note: Qt libs package with full capabilities has UID3 of 0x2001E61C,
+# while self-signed version typically has temporary UID3 of 0xE001E61C.
+contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C):isEmpty(QT_LIBINFIX) {
+ qt_pkg_name = Qt
+ pkg_depends_qt += \
+ "; Default dependency to Qt libraries" \
+ "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(qt_pkg_name)}"
+
+ # Projects linking to webkit need dependency to webkit
+ contains(QT, webkit): {
+ # these can be overridden by mkspecs/modules/qt_webkit.pri
+ isEmpty(QT_WEBKIT_MAJOR_VERSION) {
+ QT_WEBKIT_MAJOR_VERSION = $${QT_MAJOR_VERSION}
+ QT_WEBKIT_MINOR_VERSION = $${QT_MINOR_VERSION}
+ QT_WEBKIT_PATCH_VERSION = $${QT_PATCH_VERSION}
+ }
+
+ webkit_pkg_name = QtWebKit
+ pkg_depends_webkit += \
+ "; Dependency to Qt Webkit" \
+ "(0x200267C2), $${QT_WEBKIT_MAJOR_VERSION}, $${QT_WEBKIT_MINOR_VERSION}, $${QT_WEBKIT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(webkit_pkg_name)}"
+ } else {
+ default_deployment.pkg_prerules -= pkg_depends_webkit
+ }
+} else {
+ default_deployment.pkg_prerules -= pkg_depends_webkit pkg_depends_qt
+}
+
+isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
+isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+
+# Supports Symbian^3 platforms by default and also S60 3.1, 3.2, and 5.0 if built against any of those.
+platform_product_id = S60ProductID
+platform_product_id = $$addLanguageDependentPkgItem(platform_product_id)
+pkg_platform_dependencies = \
+ "; Default HW/platform dependencies" \
+ "[0x20022E6D],0,0,0,{$$platform_product_id}" \
+ "[0x2003A678],0,0,0,{$$platform_product_id}"
+contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
+ pkg_platform_dependencies += \
+ "[0x102032BE],0,0,0,{$$platform_product_id}" \
+ "[0x102752AE],0,0,0,{$$platform_product_id}" \
+ "[0x1028315F],0,0,0,{$$platform_product_id}"
+}
diff --git a/mkspecs/features/symbian/default_pre.prf b/mkspecs/features/symbian/default_pre.prf
new file mode 100644
index 0000000000..ddb23b3157
--- /dev/null
+++ b/mkspecs/features/symbian/default_pre.prf
@@ -0,0 +1,2 @@
+CONFIG = stl_off $$CONFIG
+load(default_pre)
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 0000000000..91a63c2263
--- /dev/null
+++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf
@@ -0,0 +1,13 @@
+symbian-abld|symbian-sbsv2 {
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+} else:symbian-armcc {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += --arm
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += --arm
+} else:symbian-gcce {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += -marm -mthumb-interwork -mapcs
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += -marm -mthumb-interwork -mapcs
+}
diff --git a/mkspecs/features/symbian/epocallowdlldata.prf b/mkspecs/features/symbian/epocallowdlldata.prf
new file mode 100644
index 0000000000..b336f488fd
--- /dev/null
+++ b/mkspecs/features/symbian/epocallowdlldata.prf
@@ -0,0 +1 @@
+TARGET.EPOCALLOWDLLDATA=1
diff --git a/mkspecs/features/symbian/localize_deployment.prf b/mkspecs/features/symbian/localize_deployment.prf
new file mode 100644
index 0000000000..185c7130c0
--- /dev/null
+++ b/mkspecs/features/symbian/localize_deployment.prf
@@ -0,0 +1,118 @@
+SYMBIAN_LANG.af = 34 #Afrikaans
+SYMBIAN_LANG.sq = 35 #Albanian
+SYMBIAN_LANG.am = 36 #Amharic
+SYMBIAN_LANG.ar = 37 #Arabic
+SYMBIAN_LANG.hy = 38 #Armenian
+SYMBIAN_LANG.eu = 102 #Basque
+SYMBIAN_LANG.bn = 41 #Bengali
+SYMBIAN_LANG.bg = 42 #Bulgarian
+SYMBIAN_LANG.my = 43 #Burmese
+SYMBIAN_LANG.be = 40 #Byelorussian
+SYMBIAN_LANG.ca = 44 #Catalan
+SYMBIAN_LANG.zh = 31 #Chinese
+SYMBIAN_LANG.hr = 45 #Croatian
+SYMBIAN_LANG.cs = 25 #Czech
+SYMBIAN_LANG.da = 07 #Danish
+SYMBIAN_LANG.nl = 18 #Dutch
+SYMBIAN_LANG.en = 01 #English(UK)
+SYMBIAN_LANG.et = 49 #Estonian
+SYMBIAN_LANG.fi = 09 #Finnish
+SYMBIAN_LANG.fr = 02 #French
+SYMBIAN_LANG.gd = 52 #Gaelic
+SYMBIAN_LANG.gl = 103 #Galician
+SYMBIAN_LANG.ka = 53 #Georgian
+SYMBIAN_LANG.de = 03 #German
+SYMBIAN_LANG.el = 54 #Greek
+SYMBIAN_LANG.gu = 56 #Gujarati
+SYMBIAN_LANG.he = 57 #Hebrew
+SYMBIAN_LANG.hi = 58 #Hindi
+SYMBIAN_LANG.hu = 17 #Hungarian
+SYMBIAN_LANG.is = 15 #Icelandic
+SYMBIAN_LANG.id = 59 #Indonesian
+SYMBIAN_LANG.ga = 60 #Irish
+SYMBIAN_LANG.it = 05 #Italian
+SYMBIAN_LANG.ja = 32 #Japanese
+SYMBIAN_LANG.kn = 62 #Kannada
+SYMBIAN_LANG.kk = 63 #Kazakh
+SYMBIAN_LANG.ko = 65 #Korean
+SYMBIAN_LANG.lo = 66 #Laothian
+SYMBIAN_LANG.lv = 67 #Latvian
+SYMBIAN_LANG.lt = 68 #Lithuanian
+SYMBIAN_LANG.mk = 69 #Macedonian
+SYMBIAN_LANG.ms = 70 #Malay
+SYMBIAN_LANG.ml = 71 #Malayalam
+SYMBIAN_LANG.mr = 72 #Marathi
+SYMBIAN_LANG.mo = 73 #Moldavian
+SYMBIAN_LANG.mn = 74 #Mongolian
+SYMBIAN_LANG.nb = 08 #Norwegian
+SYMBIAN_LANG.nn = 75 #Nynorsk
+SYMBIAN_LANG.fa = 50 #Persian
+SYMBIAN_LANG.pl = 27 #Polish
+SYMBIAN_LANG.pt = 13 #Portuguese
+SYMBIAN_LANG.pa = 77 #Punjabi
+SYMBIAN_LANG.ro = 78 #Romanian
+SYMBIAN_LANG.ru = 16 #Russian
+SYMBIAN_LANG.sr = 79 #Serbian
+SYMBIAN_LANG.si = 80 #Singhalese
+SYMBIAN_LANG.sk = 26 #Slovak
+SYMBIAN_LANG.sl = 28 #Slovenian
+SYMBIAN_LANG.so = 81 #Somali
+SYMBIAN_LANG.st = 101 #South Sotho/Sesotho
+SYMBIAN_LANG.es = 04 #Spanish
+SYMBIAN_LANG.sw = 84 #Swahili
+SYMBIAN_LANG.sv = 06 #Swedish
+SYMBIAN_LANG.tl = 39 #Tagalog
+SYMBIAN_LANG.ta = 87 #Tamil
+SYMBIAN_LANG.te = 88 #Telugu
+SYMBIAN_LANG.th = 33 #Thai
+SYMBIAN_LANG.bo = 89 #Tibetan
+SYMBIAN_LANG.ti = 90 #Tigrinya
+SYMBIAN_LANG.tr = 14 #Turkish
+SYMBIAN_LANG.tk = 92 #Turkmen
+SYMBIAN_LANG.uk = 93 #Ukrainian
+SYMBIAN_LANG.ur = 94 #Urdu
+SYMBIAN_LANG.vi = 96 #Vietnamese
+SYMBIAN_LANG.cy = 97 #Welsh
+SYMBIAN_LANG.zu = 98 #Zulu
+
+# Regional dialects
+SYMBIAN_LANG.en_US = 10 #American English
+SYMBIAN_LANG.fr_BE = 21 #Belgian French
+SYMBIAN_LANG.pt_BR = 76 #Brazilian Portuguese
+SYMBIAN_LANG.en_CA = 46 #Canadian English
+SYMBIAN_LANG.fr_CA = 51 #Canadian French
+SYMBIAN_LANG.el_CY = 55 #Cyprus Greek
+SYMBIAN_LANG.tr_CY = 91 #Cyprus Turkish
+SYMBIAN_LANG.en_TW = 157 #English as appropriate for use in Taiwan
+SYMBIAN_LANG.en_HK = 158 #English as appropriate for use in Hong Kong
+SYMBIAN_LANG.en_CN = 159 #English as appropriate for use in the Peoples Republic of China
+SYMBIAN_LANG.en_JP = 160 #English as appropriate for use in Japan
+SYMBIAN_LANG.en_TH = 161 #English as appropriate for use in Thailand
+SYMBIAN_LANG.sv_FI = 85 #Finland Swedish
+SYMBIAN_LANG.zh_HK = 30 #HongKong Chinese
+SYMBIAN_LANG.es_419 = 83 #Latin American Spanish
+SYMBIAN_LANG.en_ZA = 48 #South African English
+SYMBIAN_LANG.fr_CH = 11 #Swiss French
+SYMBIAN_LANG.de_CH = 12 #Swiss German
+SYMBIAN_LANG.it_CH = 61 #Swiss Italian
+SYMBIAN_LANG.zh_TW = 29 #Taiwan Chinese
+
+isEmpty(SYMBIAN_MATCHED_LANGUAGES) {
+ matchSymbianLanguages()
+}
+
+# If there are translations that do not have Symbian language code defined for that exact
+# language + country combination, but have Symbian language code defined for just the language,
+# map the language + country combination to the same value as the plain language.
+for(language, SYMBIAN_UNMAPPED_LANGUAGES) {
+ languageVar = SYMBIAN_LANG.$${language}
+ fallbackLanguageVar = SYMBIAN_LANG.$$eval(SYMBIAN_LANGUAGE_FALLBACK.$$language)
+ $$languageVar = $$eval($$fallbackLanguageVar)
+}
+
+!isEmpty(SYMBIAN_MATCHED_TRANSLATIONS) {
+ # Generate dependencies to .ts files for pkg files
+ template_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS
+ installer_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS
+ stub_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS
+}
diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf
new file mode 100644
index 0000000000..6030944c7d
--- /dev/null
+++ b/mkspecs/features/symbian/moc.prf
@@ -0,0 +1,18 @@
+load(moc)
+
+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(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/nested_exceptions.prf b/mkspecs/features/symbian/nested_exceptions.prf
new file mode 100644
index 0000000000..defca94d6f
--- /dev/null
+++ b/mkspecs/features/symbian/nested_exceptions.prf
@@ -0,0 +1,4 @@
+# use nested exceptions runtime support for apps
+contains(TEMPLATE, app) {
+ MMP_RULES *= EPOCNESTEDEXCEPTIONS
+}
diff --git a/mkspecs/features/symbian/opengl.prf b/mkspecs/features/symbian/opengl.prf
new file mode 100644
index 0000000000..9a8ab18433
--- /dev/null
+++ b/mkspecs/features/symbian/opengl.prf
@@ -0,0 +1,21 @@
+contains(QT_CONFIG, opengles1) {
+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1
+ !isEmpty(QMAKE_LIBDIR_OPENGL_ES1):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1
+ target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1_QT
+ else:LIBS += $$QMAKE_LIBS_OPENGL_ES1
+} else:contains(QT_CONFIG, opengles2) {
+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+ !isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2
+ target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES2_QT
+ else:LIBS += $$QMAKE_LIBS_OPENGL_ES2
+} else {
+ INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+ !isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL
+ target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_QT
+ else:LIBS += $$QMAKE_LIBS_OPENGL
+}
+
+contains(QT_CONFIG, egl) {
+ !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+}
+
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
new file mode 100644
index 0000000000..f19898f188
--- /dev/null
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -0,0 +1,496 @@
+#
+# ==============================================================================
+# Name : platform_paths.prf
+# Part of :
+# Interface : Platform Path Definitions API for Qt/S60
+# Description : Predefined include paths to be used in the pro-files for the
+# components in the layered model. There is one definition for
+# each layer. The pro-file should use the statement that is
+# intended for the same layer as where the pro-file resides.
+#
+# Usage examples:
+#
+# Note: this file gets automatically added to all Qt/S60 projects
+#
+# Variable usages to add the system include paths
+#
+# The include paths has to be related to the layer in which your SW
+# resides. Thus as an example: a component residing in middleware
+# layer should use the MW specific macro.
+#
+# INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+# INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE
+#
+# If there is a need to include public headers of some S60 component,
+# various *_EXPORT_PATH macros can be utilized:
+#
+# INCLUDEPATH += $$OS_LAYER_PUBLIC_EXPORT_PATH(somecomponent)
+#
+# Variables related to using various parts of stdapis:
+#
+# To use STLLIB you need to have this in your pro-file:
+#
+# QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS
+# DEFINES *= $$STLLIB_USAGE_DEFINES
+#
+# Depending on what module you are using from stdapis you need to have
+# one or more of the following variables in your pro-file.
+#
+# INCLUDEPATH += $$OS_LAYER_LIBC_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_GLIB_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_SSL_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_BOOST_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_DBUS_SYSTEMINCLUDE
+# INCLUDEPATH += $$OS_LAYER_LIBUTILITY_SYSTEMINCLUDE
+#
+# These paths are primarily meant to be used as is in bld.inf and .mmp
+# files, so they do not contain epocroot when using official symbian
+# toolchains (symbian-abld or symbian-sbsv2).
+# For makefile based mkspecs, epocroot is prepended to all paths for
+# convenience.
+#
+# To use paths defined here in other contexts that require epocroot to be
+# prepended always, such as exists checks, please use prependEpocroot
+# replacement function:
+#
+# exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h)))
+#
+# ==============================================================================
+
+symbian-abld|symbian-sbsv2 {
+ epocroot_prefix = /
+} else {
+ epocroot_prefix = $${EPOCROOT}
+}
+
+symbian-abld|symbian-sbsv2:exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
+
+ # Symbian does not provide correct profiles for non-mmp based systems, so
+ # we only should get in here with abld and sbsv2.
+
+ # Load platform specific paths
+ load($${EPOCROOT}epoc32/include/platform_paths.prf)
+
+} else {
+
+ # No platform specific paths provided, use default paths
+
+ exists($${EPOCROOT}epoc32/include/mw) { # New SF structure
+
+ # ---------------------------------------
+ # Location, where the applications layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
+ }
+ defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the applications layer specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
+ }
+ defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the middleware layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
+ }
+ defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the middleware layer specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
+ }
+ defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the os layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
+ 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 ($${epocroot_prefix}epoc32/include/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the os specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
+ }
+ defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
+ }
+
+ # ---------------------------------------
+ # General comments about the 3 define statements related to include paths:
+ # 1) the /epoc32/include/oem is now defined there for backward compability.
+ # Once the directory is empty, the directory will be removed. However this
+ # enables us to ensure that if you use these define statements => you do
+ # not have to remove the statements later on, when the directory no longer
+ # exists.
+ # 2) These statements should be enough in normal cases. For certain specific
+ # cases you might need to add some specific directory from /epoc32/include
+ # (for instance /epoc32/include/ecom).
+ # In normal cases the include staments in code should be relative to one of
+ # the system include paths, but in certain cases, the included files requires
+ # that the subdirectory is also part of the system include paths.
+ # ---------------------------------------
+
+ # This variable defines the include paths, which are intended to be
+ # used in the pro-files that are part of the applications-layer. It includes all
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # application-layer components.
+ #
+ # Applications layer is the last one in the list, since most likely the most of
+ # the headers come from middleware or os-layer => thus they are first.
+
+ APP_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # middleware-layer components.
+
+ MW_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # os-layer components.
+
+ OS_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # to be only used by those components which need to use in their mmp-file either
+ # kern_ext.mmh or nkern_ext.mmh. Reason is that those
+ # 2 files already contain the /epoc32/include as system include path.
+
+ OS_LAYER_KERNEL_SYSTEMINCLUDE = \
+ $${epocroot_prefix}epoc32/include/platform
+
+
+ # ---------------------------------------
+ # Definitions that also define the systeminclude paths for various
+ # part of stdapis. Append to INCLUDEPATH in pro-file.
+ # ---------------------------------------
+
+ OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \
+ $$OS_LAYER_PUBLIC_EXPORT_PATH(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)
+
+ OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl)
+
+ # stlportv5 is preferred over stlport as it has the throwing version of operator new
+ exists($${EPOCROOT}epoc32/include/stdapis/stlport) \
+ :!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) {
+ OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport)
+ } else {
+ OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5)
+ }
+
+ OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(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)
+
+ OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility)
+
+ } else { # Old pre-SF structure
+
+ # ---------------------------------------
+ # Location, where the applications layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
+ }
+ defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the applications layer specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
+ }
+ defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the middleware layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
+ }
+ defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the middleware layer specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
+ }
+ defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the os layer specific public headers are exported
+ # ---------------------------------------
+
+ defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
+ 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 ($${epocroot_prefix}epoc32/include/osextensions/$$1)
+ }
+
+ # ---------------------------------------
+ # Location, where the os specific platform headers are exported
+ # ---------------------------------------
+
+ defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
+ }
+ defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
+ }
+
+ # ---------------------------------------
+ # General comments about the 3 define statements related to include paths:
+ # 1) the /epoc32/include/oem is now defined there for backward compability.
+ # Once the directory is empty, the directory will be removed. However this
+ # enables us to ensure that if you use these define statements => you do
+ # not have to remove the statements later on, when the directory no longer
+ # exists.
+ # 2) These statements should be enough in normal cases. For certain specific
+ # cases you might need to add some specific directory from /epoc32/include
+ # (for instance /epoc32/include/ecom).
+ # In normal cases the include staments in code should be relative to one of
+ # the system include paths, but in certain cases, the included files requires
+ # that the subdirectory is also part of the system include paths.
+ # ---------------------------------------
+
+ # This variable defines the include paths, which are intended to be
+ # used in the pro-files that are part of the applications-layer. It includes all
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # application-layer components.
+ #
+ # Applications layer is the last one in the list, since most likely the most of
+ # the headers come from middleware or os-layer => thus they are first.
+
+ APP_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # middleware-layer components.
+
+ MW_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # the needed directories from the /epoc32/include, that are valid ones for the
+ # os-layer components.
+
+ OS_LAYER_SYSTEMINCLUDE = \
+ $${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
+ # to be only used by those components which need to use in their mmp-file either
+ # kern_ext.mmh or nkern_ext.mmh. Reason is that those
+ # 2 files already contain the /epoc32/include as system include path.
+
+ OS_LAYER_KERNEL_SYSTEMINCLUDE = \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions
+
+
+ # ---------------------------------------
+ # Definitions that also define the systeminclude paths for various
+ # part of stdapis. Append to INCLUDEPATH in pro-file.
+ # ---------------------------------------
+
+ OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \
+ $$OS_LAYER_PUBLIC_EXPORT_PATH(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) \
+ $${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) \
+ $${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) \
+ $${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) \
+ $${epocroot_prefix}epoc32/include/stdapis/stlport
+ }
+ }
+
+ OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(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) \
+ $${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) \
+ $${epocroot_prefix}epoc32/include/stdapis/utility
+
+ }
+
+ # Definitions common to both structures
+
+ # ---------------------------------------
+ # Definitions to export IBY files to different folders where they will be taken
+ # to ROM image
+ # ---------------------------------------
+
+ defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/core/app/$$1)
+ }
+ defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1)
+ }
+
+ defineReplace(LANGUAGE_APP_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/language/app/$$1)
+ }
+ defineReplace(LANGUAGE_MW_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/language/mw/$$1)
+ }
+
+ defineReplace(CUSTOMER_APP_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/customer/app/$$1)
+ }
+ defineReplace(CUSTOMER_MW_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/customer/mw/$$1)
+ }
+
+ defineReplace(CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/app/$$1)
+ }
+ defineReplace(CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH) {
+ return($${epocroot_prefix}epoc32/rom/include/customervariant/mw/$$1)
+ }
+
+ # You need to define the following in pro-file, if you are using the stllib:
+ # QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS
+ # DEFINES *= $$STLLIB_USAGE_DEFINES
+ STLLIB_USAGE_CW_FLAGS = "-wchar_t on"
+ STLLIB_USAGE_DEFINES = _WCHAR_T_DECLARED
+
+ # Smart prepend of EPOCROOT to a string
+ defineReplace(prependEpocroot) {
+ contains(1, ^$${EPOCROOT}) {
+ return($$1)
+ } else {
+ return($${EPOCROOT}$$replace(1,"^/",))
+ }
+ }
+
+}
diff --git a/mkspecs/features/symbian/prepend_includepath.prf b/mkspecs/features/symbian/prepend_includepath.prf
new file mode 100644
index 0000000000..d9fd4fe46e
--- /dev/null
+++ b/mkspecs/features/symbian/prepend_includepath.prf
@@ -0,0 +1,14 @@
+# Allow .pro files to specify include path(s) to be prepended to the list.
+#
+# This allows the project to override the default ordering, whereby paths
+# relative to $$QMAKE_INCDIR_QT always come first. This ordering can cause
+# problems when both the epoc32/include tree and a Qt include directory
+# contain a header of the same name - in this case, the Qt header is always
+# included by virtue of its path appearing first in the SYSTEMINCLUDE
+# directives in the generated MMP file.
+#
+# To work around this situation, the following line can be added to the .pro
+# file:
+# PREPEND_INCLUDEPATH = /epoc32/include
+#
+INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH
diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf
new file mode 100644
index 0000000000..c376b642d1
--- /dev/null
+++ b/mkspecs/features/symbian/qt.prf
@@ -0,0 +1,13 @@
+contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL) {
+ CONFIG *= epocallowdlldata
+}
+
+CONFIG += qtmain
+
+load(qt)
+
+# Workaround for the fact that Gnupoc and Symbian chose different approaches to
+# the letter casing of headers.
+contains(CONFIG, is_using_gnupoc) {
+ INCLUDEPATH += $${PWD}/../../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 0000000000..82c18621b7
--- /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 0000000000..8164495c6f
--- /dev/null
+++ b/mkspecs/features/symbian/release.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/urel
diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf
new file mode 100644
index 0000000000..ba88a662f9
--- /dev/null
+++ b/mkspecs/features/symbian/run_on_phone.prf
@@ -0,0 +1,40 @@
+# make sure we have a sis file and then call 'runonphone' to execute it on the phone
+
+GENERATE_RUN_TARGETS = false
+
+contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true
+else:!equals(DEPLOYMENT, default_deployment) {
+ for(dep_item, $$list($$DEPLOYMENT)) {
+ ### Qt 5: remove .sources, inconsistent with INSTALLS
+ dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources)
+ !isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true
+ }
+}
+
+equals(GENERATE_RUN_TARGETS, true) {
+ baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
+ sis_file = $${baseTarget}.sis
+ symbian-abld|symbian-sbsv2 {
+ sis_destdir =
+ } else {
+ sis_destdir = $$DESTDIR
+ isEmpty(sis_destdir):sis_destdir = .
+ !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET)
+ !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/
+ contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\")
+ }
+
+ contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") {
+ run_target.target = run
+ run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$${baseTarget}.exe" $(QT_RUN_OPTIONS)
+
+ QMAKE_EXTRA_TARGETS += run_target
+ }
+
+ runonphone_target.target = runonphone
+ runonphone_target.depends = sis
+ runonphone_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${sis_file}"
+ contains(TEMPLATE, "app"):runonphone_target.commands += "$${baseTarget}.exe" $(QT_RUN_OPTIONS)
+
+ QMAKE_EXTRA_TARGETS += runonphone_target
+}
diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf
new file mode 100644
index 0000000000..d0fe881003
--- /dev/null
+++ b/mkspecs/features/symbian/sis_targets.prf
@@ -0,0 +1,226 @@
+# Sis file creation
+GENERATE_SIS_TARGETS = false
+
+contains(TEMPLATE, app): GENERATE_SIS_TARGETS = true
+else:!equals(DEPLOYMENT, default_deployment) {
+ for(dep_item, $$list($$DEPLOYMENT)) {
+ ### Qt 5: remove .sources, inconsistent with INSTALLS
+ dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources)
+ !isEmpty(dep_item_sources): GENERATE_SIS_TARGETS = true
+ }
+}
+
+equals(GENERATE_SIS_TARGETS, true) {
+
+ baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
+ template_pkg_target.target = $${baseTarget}_template.pkg
+ template_pkg_target.depends += $$_PRO_FILE_
+ template_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake
+ installer_pkg_target.target = $${baseTarget}_installer.pkg
+ installer_pkg_target.depends += $$_PRO_FILE_
+ installer_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake
+ stub_pkg_target.target = $${baseTarget}_stub.pkg
+ stub_pkg_target.depends += $$_PRO_FILE_
+ stub_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake
+ QMAKE_EXTRA_TARGETS += template_pkg_target installer_pkg_target stub_pkg_target
+
+ qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage)
+
+ CREATEPACKAGE_DIR = $$OBJECTS_DIR/createpackage_tmp
+ QMAKE_CLEAN += $$CREATEPACKAGE_DIR/*
+
+ symbian-abld|symbian-sbsv2 {
+ symbian-sbsv2 {
+ CONVERT_GCCE_PARAM = -g
+ } else {
+ CONVERT_GCCE_PARAM =
+ }
+
+ make_cache_name = .make.cache
+ sis_target.target = sis
+ sis_target.commands = $(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 \
+ ) \
+ )
+
+ sis_target.depends += $${baseTarget}_template.pkg
+
+ ok_sis_target.target = ok_sis
+ ok_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ unsigned_sis_target.target = unsigned_sis
+ unsigned_sis_target.commands = $(if $(wildcard $$make_cache_name), \
+ $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \
+ , \
+ $(if $(QT_SIS_TARGET), \
+ $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \
+ , \
+ $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
+ ) \
+ )
+
+ unsigned_sis_target.depends += $${baseTarget}_template.pkg
+
+ ok_unsigned_sis_target.target = ok_unsigned_sis
+ ok_unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET)
+
+ target_sis_target.target = $${baseTarget}.sis
+ target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+ # The installer_sis target has dependency to sis target, so it will regenerate sis package.
+ # To create smart installer wrapper for for an existing sis package, use ok_installer_sis target directly.
+ installer_sis_target.target = installer_sis
+ installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis
+ installer_sis_target.depends = $${baseTarget}_installer.pkg sis
+
+ ok_installer_sis_target.target = ok_installer_sis
+ ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ ok_installer_sis_target.depends = $${baseTarget}_installer.pkg
+
+ unsigned_installer_sis_target.target = unsigned_installer_sis
+ unsigned_installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis
+ unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis
+
+ ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis
+ ok_unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
+ ok_unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg
+
+ 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)"
+
+ stub_sis_target.target = stub_sis
+ stub_sis_target.commands = $(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 \
+ ) \
+ )
+
+ stub_sis_target.depends += $${baseTarget}_stub.pkg
+
+ ok_stub_sis_target.target = ok_stub_sis
+ ok_stub_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \
+ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+
+ QMAKE_EXTRA_TARGETS += sis_target \
+ ok_sis_target \
+ unsigned_sis_target \
+ ok_unsigned_sis_target \
+ target_sis_target \
+ installer_sis_target \
+ ok_installer_sis_target \
+ unsigned_installer_sis_target \
+ ok_unsigned_installer_sis_target \
+ fail_sis_nocache_target \
+ stub_sis_target \
+ ok_stub_sis_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 QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
+
+ QMAKE_EXTRA_TARGETS += store_build_target
+ QMAKE_CLEAN += $$make_cache_name
+ }
+ } else {
+ sis_destdir = $$DESTDIR
+ isEmpty(sis_destdir):sis_destdir = .
+ !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET)
+
+ sis_target.target = sis
+ sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
+ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ sis_target.depends = first $${baseTarget}_template.pkg
+
+ unsigned_sis_target.target = unsigned_sis
+ unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg
+ unsigned_sis_target.depends = first $${baseTarget}_template.pkg
+
+ target_sis_target.target = $${sis_destdir}/$${baseTarget}.sis
+ target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
+
+ installer_sis_target.target = installer_sis
+ installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis
+ installer_sis_target.depends = $${baseTarget}_installer.pkg sis
+
+ ok_installer_sis_target.target = ok_installer_sis
+ ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
+ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
+ ok_installer_sis_target.depends = $${baseTarget}_installer.pkg
+
+ unsigned_installer_sis_target.target = unsigned_installer_sis
+ unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
+ unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis
+
+ !isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") {
+ sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir
+ unsigned_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned.sis $$sis_destdir
+ installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_installer.sis $$sis_destdir
+ unsigned_installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned_installer.sis $$sis_destdir
+ }
+
+ QMAKE_EXTRA_TARGETS += sis_target \
+ unsigned_sis_target \
+ target_sis_target \
+ installer_sis_target \
+ ok_installer_sis_target \
+ unsigned_installer_sis_target
+
+ QMAKE_DISTCLEAN += $${sis_destdir}/$${baseTarget}.sis
+ }
+
+ deploy_target.target = deploy
+ contains(QMAKE_HOST.os, "Windows") {
+ deploy_target.depends = sis
+ deploy_target.commands = call $$target_sis_target.target
+ } else {
+ deploy_target.commands = @echo Deployment not supported in this environment
+ }
+ QMAKE_EXTRA_TARGETS += deploy_target
+
+} else {
+ contains(TEMPLATE, subdirs) {
+ # Enable recursive sis target.
+ sis_target.CONFIG = recursive
+ sis_target.recurse = $$SUBDIRS
+ } else {
+ # Make sure we build everything, since other sis targets in a recursive invocation
+ # may depend on them, even if this one is empty.
+ # In abld/sbsv2, we assume that subdir has been built already, as all builds are recursive.
+ !symbian-abld:!symbian-sbsv2: sis_target.depends = first
+ }
+ sis_target.commands =
+ sis_target.target = sis
+ QMAKE_EXTRA_TARGETS += sis_target
+
+ symbian-abld {
+ # Create dummy store_build target to avoid errors from .mk callbacks during build
+ store_build_target.target = store_build
+ QMAKE_EXTRA_TARGETS += store_build_target
+ }
+}
diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf
new file mode 100644
index 0000000000..1fd5e16e32
--- /dev/null
+++ b/mkspecs/features/symbian/stl.prf
@@ -0,0 +1,43 @@
+CONFIG -= stl_off
+
+# STL usage in S60 requires the "OPTION CW -wchar_t on" mmp statement to be used.
+# This statement is added via $$STLLIB_USAGE_CW_FLAGS variable below.
+# S60 STL documentation instructs to use also "MACRO _WCHAR_T_DECLARED" statement,
+# but QtS60 will not compile if that statement is set.
+
+QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS
+
+# Path to stlport headers
+INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE
+
+# Remove mkspecs/common/symbian/stl-off from beginning of includepath
+# in order to use new and delete operators from STL
+INCLUDEPATH -= $$[QT_INSTALL_DATA]/mkspecs/common/symbian/stl-off
+
+# libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new
+# STDCPP turns on standard C++ new behaviour (ie. throwing new)
+use_libstdcppv5 = true
+
+# Fall back to old implementation if that is the only one that is found
+exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcpp.dso)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcpp.dll) {
+ !exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso):!exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) {
+ use_libstdcppv5 = false
+ }
+}
+
+equals(use_libstdcppv5, true) {
+ LIBS *= -llibstdcppv5.dll
+ symbian-abld|symbian-sbsv2 {
+ MMP_RULES *= "STDCPP"
+ } else {
+ DEFINES *= __SYMBIAN_STDCPP_SUPPORT__
+ LIBS *= -lstdnew.dll
+ }
+} else {
+ LIBS *= -llibstdcpp.dll
+}
+
+# use the runtime support for nested exceptions, if a library is available
+exists($${EPOCROOT}epoc32/release/armv5/urel/usrt_nx_*.lib) {
+ CONFIG += nested_exceptions
+}
diff --git a/mkspecs/features/symbian/stl_off.prf b/mkspecs/features/symbian/stl_off.prf
new file mode 100644
index 0000000000..d5d1c7c30f
--- /dev/null
+++ b/mkspecs/features/symbian/stl_off.prf
@@ -0,0 +1,2 @@
+CONFIG -= stl
+
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
new file mode 100644
index 0000000000..8c757077d3
--- /dev/null
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -0,0 +1,369 @@
+symbian-armcc {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS.ARMCC
+ # This is to prevent inclusion of the shipped RVCT headers, which are often in the
+ # environment variable RVCTxxINC by default. -J prevents the searching of that location,
+ # but needs a path, so just specify somewhere guaranteed not to contain header files.
+ QMAKE_CFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
+ QMAKE_CXXFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
+} else:symbian-gcce {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS.GCCE
+}
+
+# We need a target name without the INFIX'ed part, since flags are not infixed.
+equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "")
+else:clean_TARGET = $$TARGET
+
+# we have some module specific options (defined in qt.prf) lets add them
+!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_CXXFLAGS)
+!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR
+!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS)
+!isEmpty(TMPVAR) {
+ QMAKE_LFLAGS += $$TMPVAR
+} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains
+ QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000
+}
+
+qtPrepareTool(QMAKE_ELF2E32_WRAPPER, elf2e32_qtwrapper)
+
+isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
+isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+epoc_heap_size = $$split(TARGET.EPOCHEAPSIZE, " ")
+epoc_heap_size = $$join(epoc_heap_size, ",")
+
+symbianObjdir=$$OBJECTS_DIR
+isEmpty(symbianObjdir) {
+ symbianObjdir = .
+}
+symbianDestdir=$$DESTDIR
+isEmpty(symbianDestdir) {
+ symbianDestdir = .
+}
+baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
+!equals(TARGET, "$$baseTarget"):symbianDestdir = $$symbianDestdir/$$dirname(TARGET)
+
+contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") {
+ DEFINES += __MARM_THUMB__
+}
+
+defineReplace(processSymbianLibrary) {
+ qt_library = $$replace(1, "\\.dll$", ".dso")
+ qt_library = $$replace(qt_library, "^-l", "")
+ isFullName = $$find(qt_library, \\.)
+ isEmpty(isFullName):qt_library="$${qt_library}.dso"
+ return($$qt_library)
+}
+
+# This part turn "-llibc" into "libc.dso", and moves -L entries to QMAKE_LIBDIR.
+libsToProcess = LIBS LIBS_PRIVATE QMAKE_LIBS
+for(libToProcess, libsToProcess) {
+ qt_libraries = $$split($$libToProcess, " ")
+ eval($$libToProcess =)
+ for(qt_library, qt_libraries) {
+ contains(qt_library, "^-L.*") {
+ qt_library = $$replace(qt_library, "^-L", "")
+ QMAKE_LIBDIR += $$qt_library
+ } else {
+ qt_newLib = $$processSymbianLibrary($$qt_library)
+ contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib
+ symbian-gcce:qt_newLib = "-l:$$qt_newLib"
+ eval($$libToProcess *= \$\$qt_newLib)
+ }
+ }
+}
+
+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("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"")
+ hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")
+ hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")
+ decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\"").
+ hexVersion = $$hexVersion$$hexPart2
+ decVersion = $$decVersion$$system("perl -e \"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) {
+ contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def
+
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
+ && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \
+ --sid=$$TARGET.SID \
+ --uid1=0x10000079 \
+ --uid2=$$TARGET.UID2 \
+ --uid3=$$TARGET.UID3 \
+ --targettype=DLL \
+ --elfinput=$${symbianDestdir}/$${baseTarget}.sym \
+ --output=$${symbianDestdir}/$${baseTarget}.dll \
+ --tmpdso=$${symbianObjdir}/$${baseTarget}.dso \
+ --dso=$${symbianDestdir}/$${baseTarget}.dso \
+ --defoutput=$$symbianObjdir/$${baseTarget}.def \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \
+ --heap=$$epoc_heap_size \
+ --stack=$$TARGET.EPOCSTACKSIZE \
+ $$elf2e32_LIBPATH \
+ $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
+ $$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def
+
+ symbian-armcc: {
+ LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso
+ # Quotation unfortunately is different on Windows and unix.
+ contains(QMAKE_HOST.os, Windows) {
+ LIBS += \"h_t__uf.l(switch8.o)\" edllstub.lib \"edll.lib(uc_dll_.o)\"
+ } else {
+ LIBS += h_t__uf.l\\(switch8.o\\) edllstub.lib edll.lib\\(uc_dll_.o\\)
+ }
+ } else :symbian-gcce {
+ LIBS += \
+ -l:edllstub.lib \
+ -l:edll.lib \
+ -l:usrt2_2.lib \
+ -l:dfpaeabi.dso \
+ -l:drtaeabi.dso \
+ -l:scppnwdl.dso \
+ -lsupc++ \
+ -lgcc
+ }
+
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\"
+ DEFINES += __DLL__
+}
+
+contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
+ moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym
+ contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\)
+ QMAKE_POST_LINK = $$moveCmd \
+ && $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \
+ --sid=$$TARGET.SID \
+ --uid1=0x1000007a \
+ --uid2=$$TARGET.UID2 \
+ --uid3=$$TARGET.UID3 \
+ --targettype=EXE \
+ --elfinput=$${symbianDestdir}/$${baseTarget}.sym \
+ --output=$${symbianDestdir}/$${baseTarget}.exe \
+ --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \
+ --heap=$$epoc_heap_size \
+ --stack=$$TARGET.EPOCSTACKSIZE \
+ $$elf2e32_LIBPATH \
+ $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
+ && $$QMAKE_COPY "$${symbianDestdir}/$${baseTarget}.exe" "$${symbianDestdir}/$${baseTarget}" \
+ $$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe
+ QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget}
+
+ symbian-armcc: {
+ QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
+ QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
+ contains(CONFIG, "qt") {
+ QMAKE_LIBS -= $$QMAKE_LIBS_QT_ENTRY
+ QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
+ } else {
+ QMAKE_LIBS -= $$QMAKE_LIBS_NO_QT_ENTRY
+ QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY
+ }
+ } else :symbian-gcce {
+ # notice that we can't merge these as ordering of arguments is important.
+ QMAKE_LIBS += \
+ -l:eexe.lib \
+ -l:usrt2_2.lib
+ contains(CONFIG, "qt") {
+ modified_entry = $$replace(QMAKE_LIBS_QT_ENTRY, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ QMAKE_LIBS += $$modified_entry
+ } else {
+ modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY_GCCE, "^-l", "-l:")
+ QMAKE_LIBS -= $$modified_entry
+ QMAKE_LIBS += $$modified_entry
+ }
+ QMAKE_LIBS += \
+ -l:dfpaeabi.dso \
+ -l:drtaeabi.dso \
+ -l:scppnwdl.dso \
+ -lsupc++ \
+ -lgcc
+ QMAKE_LFLAGS += --shared
+ }
+
+ QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\"
+ DEFINES += __EXE__
+}
+
+# Symbian resource files
+symbian_resources_INCLUDES = $$join(INCLUDEPATH, " -I", "-I")
+symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
+symbian_resources_DEFINES += -D__QT_SYMBIAN_RESOURCE__
+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}$${QT_LIBINFIX}.rsg
+symbianresources.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ ${QMAKE_FILE_NAME} \
+ > $${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}$${QT_LIBINFIX}.rsc \
+ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg \
+ -i${QMAKE_FILE_NAME}
+silent:symbianresources.commands = @echo rcomp $< && $$symbianresources.commands
+symbianresources.dependency_type = TYPE_C
+symbianresources.CONFIG = no_link target_predeps
+
+QMAKE_EXTRA_COMPILERS += symbianresources
+
+# This section generates the rsg and rsc files for symbian.
+contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
+ # Look for extra languages for the resources, and then generate a target for each one.
+ localize_deployment:symbianGenResourceLanguages = $$SYMBIAN_MATCHED_LANGUAGES default
+ else:symbianGenResourceLanguages = default
+ for(language, symbianGenResourceLanguages) {
+ # Special languages get their language number appended to the filename.
+ contains(language, default) {
+ symbianGenResource_DEFINES = $$symbian_resources_DEFINES
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}.rsc
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+ } else {
+ languageNo = $$eval(SYMBIAN_LANG.$$language)
+ symbianGenResource_DEFINES = $$symbian_resources_DEFINES -DLANGUAGE_$${languageNo}
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}.r$${languageNo}
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rsg
+ }
+
+ # Make our own extra target in order to get dependencies for generated
+ # files right. This also avoids the warning about files not found.
+ eval(symbianGenResource_$${language}.target = $$rsg)
+ eval(symbianGenResource_$${language}.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
+ $$symbian_resources_INCLUDES \
+ $$symbianGenResource_DEFINES \
+ $${baseTarget}.rss \
+ > $$rpp \
+ && rcomp -u -m045,046,047 \
+ -s$$rpp \
+ -o$$rsc \
+ -h$$rsg \
+ -i$${baseTarget}.rss)
+ silent:eval(symbianGenResource_$${language}.commands = @echo rcomp $${baseTarget}.rss && $$eval(symbianGenResource_$${language}.commands))
+ eval(symbianGenResource_$${language}.depends = $${baseTarget}.rss)
+ PRE_TARGETDEPS += $$rsg
+ QMAKE_CLEAN += $$rsg $$rpp
+ QMAKE_DISTCLEAN += $$rsc
+
+ QMAKE_EXTRA_TARGETS += symbianGenResource_$${language}
+
+ # Note that we depend on the base rsg file, even if dealing with a specific language.
+ # hence we don't use $$rsg on the next line.
+ eval(symbianGenRegResource_$${language}.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg)
+ contains(language, default) {
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}_reg.rsc
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
+ } else {
+ rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rpp
+ rsc = $${symbianDestdir}/$${baseTarget}_reg.r$${languageNo}
+ rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rsg
+ }
+ eval(symbianGenRegResource_$${language}.target = $$rsg)
+ eval(symbianGenRegResource_$${language}.commands = cpp -nostdinc -undef \
+ -include $$QMAKE_SYMBIAN_INCLUDES \
+ $$symbian_resources_INCLUDES \
+ $$symbianGenResource_DEFINES \
+ $${baseTarget}_reg.rss \
+ > $$rpp \
+ && rcomp -u -m045,046,047 \
+ -s$$rpp \
+ -o$$rsc \
+ -h$$rsg \
+ -i$${baseTarget}_reg.rss)
+ silent:eval(symbianGenRegResource_$${language}.commands = @echo rcomp $${baseTarget}_reg.rss && $$eval(symbianGenRegResource_$${language}.commands))
+ PRE_TARGETDEPS += $$rsg
+ QMAKE_CLEAN += $$rsg $$rpp
+ QMAKE_DISTCLEAN += $$rsc
+
+ QMAKE_EXTRA_TARGETS += symbianGenRegResource_$${language}
+ }
+
+ # 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_COMPILERS += symbianRccDirCreation
+
+ QMAKE_DISTCLEAN += $${baseTarget}.rss \
+ $${baseTarget}_reg.rss \
+ $${baseTarget}.loc
+}
+
+# Generated pkg files
+
+QMAKE_DISTCLEAN += $${baseTarget}_template.pkg \
+ $${baseTarget}_installer.pkg \
+ $${baseTarget}_stub.pkg
diff --git a/mkspecs/features/symbian/thread.prf b/mkspecs/features/symbian/thread.prf
new file mode 100644
index 0000000000..885438ab36
--- /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)