summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-08 15:53:35 (GMT)
committeraxis <qt-info@nokia.com>2010-03-08 15:53:35 (GMT)
commit1a289e35cffc55b341a7c4894a26c1693a575f98 (patch)
tree717cb1a29f985ff6ba1f868fb394bf84f6c1f028
parent34898eaa384684c74786cd59fc322054c8888c51 (diff)
downloadQt-1a289e35cffc55b341a7c4894a26c1693a575f98.zip
Qt-1a289e35cffc55b341a7c4894a26c1693a575f98.tar.gz
Qt-1a289e35cffc55b341a7c4894a26c1693a575f98.tar.bz2
Added Symbian def file support to Linux build system.
This also switches the official def file variable in qmake profiles to DEF_FILE. Support for freezing def files was also added, but needs more work and is therefore disabled for now. Task: QTBUG-7510 Task: QTBUG-8052
-rwxr-xr-xconfigure29
-rw-r--r--doc/src/development/qmake-manual.qdoc8
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf1
-rw-r--r--mkspecs/features/symbian/def_files.prf95
-rw-r--r--mkspecs/symbian/linux-armcc/features/symbian_building.prf2
-rw-r--r--src/qbase.pri2
-rw-r--r--src/tools/bootstrap/bootstrap.pri6
-rw-r--r--src/tools/bootstrap/bootstrap.pro6
8 files changed, 116 insertions, 33 deletions
diff --git a/configure b/configure
index cf8ed13..b6ba1e8 100755
--- a/configure
+++ b/configure
@@ -644,6 +644,7 @@ CFG_XVIDEO=auto
CFG_XINERAMA=runtime
CFG_XFIXES=runtime
CFG_ZLIB=auto
+CFG_SYMBIAN_DEFFILES=auto
CFG_S60=auto
CFG_SQLITE=qt
CFG_GIF=auto
@@ -927,7 +928,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1660,6 +1661,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ usedeffiles)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_SYMBIAN_DEFFILES="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
sqlite)
if [ "$VAL" = "system" ]; then
CFG_SQLITE=system
@@ -3343,7 +3351,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
- [-no-s60] [-s60]
+ [-no-s60] [-s60] [-no-usedeffiles] [-usedeffiles]
[additional platform specific options (see below)]
@@ -3529,6 +3537,8 @@ cat << EOF
-no-s60 ............ Do not compile in S60 support.
+ -s60 ............... Compile with support for the S60 UI Framework.
+ -no-usedeffiles .... Disable the usage of DEF files.
+ + -usedeffiles ....... Enable the usage of DEF files.
-no-mmx ............ Do not compile with use of MMX instructions.
-no-3dnow .......... Do not compile with use of 3DNOW instructions.
@@ -4625,6 +4635,14 @@ if [ "$CFG_S60" = "auto" ]; then
fi
fi
+if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then
+ if echo "$XQMAKESPEC" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then
+ CFG_SYMBIAN_DEFFILES=yes
+ else
+ CFG_SYMBIAN_DEFFILES=no
+ fi
+fi
+
# detect how jpeg should be built
if [ "$CFG_JPEG" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
@@ -6358,6 +6376,12 @@ if [ "$CFG_S60" = "yes" ]; then
QT_CONFIG="$QT_CONFIG s60"
fi
+if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then
+ QMAKE_CONFIG="$QMAKE_CONFIG def_files"
+else
+ QMAKE_CONFIG="$QMAKE_CONFIG def_files_disabled"
+fi
+
[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
@@ -7584,6 +7608,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then
fi
echo "Declarative module ..... $CFG_DECLARATIVE"
echo "Support for S60 ........ $CFG_S60"
+echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES"
echo "STL support ............ $CFG_STL"
echo "PCH support ............ $CFG_PRECOMPILE"
echo "MMX/3DNOW/SSE/SSE2...... ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index a960382..c314eb8 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -1329,9 +1329,13 @@
\target DEF_FILE
\section1 DEF_FILE
- \e {This is only used on Windows when using the \c app template}.
+ \e {This is only used on Windows when using the \c app template,
+ and on Symbian when building a shared DLL}.
- Specifies a \c .def file to be included in the project.
+ Specifies a \c .def file to be included in the project. On Symbian
+ a directory may be specified instead, in which case the real files
+ will be located under the standard Symbian directories \c bwins and
+ \c eabi.
\target DEPENDPATH
\section1 DEPENDPATH
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index c8a88dd..13b335a 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -22,6 +22,7 @@ QMAKE_CFLAGS_DEBUG += -g
QMAKE_CXXFLAGS_DEBUG += -g
QMAKE_CFLAGS_RELEASE += -O2 -Otime
QMAKE_CXXFLAGS_RELEASE += -O2 -Otime
+QMAKE_ELF2E32_FLAGS +=
DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 48d91aa..a1f0c8d 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -3,32 +3,75 @@
CONFIG -= def_files_disabled
-# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
-# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
-# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
-!contains(MMP_RULES, defBlock) {
- # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
- # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
- # statements - they use the qmake generated statements instead
- # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
- !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
- !isEmpty(defFilePath) {
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
- } else {
- # If defFilePath is not defined, then put the folders containing the DEF files at the
- # same level as the .pro (and generated MMP) file(s)
- defBlock = \
- "$${LITERAL_HASH}ifdef WINSCW" \
- "DEFFILE ./bwins/$${TARGET}.def" \
- "$${LITERAL_HASH}elif defined EABI" \
- "DEFFILE ./eabi/$${TARGET}.def" \
- "$${LITERAL_HASH}endif"
+symbian-abld|symbian-sbsv2 {
+ # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one
+ # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements
+ # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword)
+ !contains(MMP_RULES, defBlock) {
+ # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files
+ # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE
+ # statements - they use the qmake generated statements instead
+ # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage
+ !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): {
+ !isEmpty(DEF_FILE) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$DEF_FILE/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$DEF_FILE/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else:!isEmpty(defFilePath) {
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ } else {
+ # If defFilePath is not defined, then put the folders containing the DEF files at the
+ # same level as the .pro (and generated MMP) file(s)
+ defBlock = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE ./bwins/$${TARGET}.def" \
+ "$${LITERAL_HASH}elif defined EABI" \
+ "DEFFILE ./eabi/$${TARGET}.def" \
+ "$${LITERAL_HASH}endif"
+ }
+ MMP_RULES += defBlock
}
- MMP_RULES += defBlock
}
+
+} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(DEF_FILE) {
+ defFile = $$DEF_FILE
+ } else {
+ defFile = .
+ }
+ system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") {
+ !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") {
+ system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi")
+ }
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(TARGET)u.def
+ } else {
+ elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile
+ }
+ QMAKE_ELF2E32_FLAGS += "`test -e $$elf2e32FileToAdd && echo --definput=$$elf2e32FileToAdd`"
+
+ symbianObjdir = $$OBJECTS_DIR
+ isEmpty(symbianObjdir):symbianObjdir = .
+
+ freeze_target.target = freeze
+ freeze_target.depends = first
+ # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do.
+ freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else:contains(TEMPLATE, subdirs) {
+ freeze_target.target = freeze
+ freeze_target.CONFIG = recursive
+ freeze_target.recurse = $$SUBDIRS
+ #QMAKE_EXTRA_TARGETS += freeze_target
+} else {
+ freeze_target.target = freeze
+ freeze_target.commands =
+ #QMAKE_EXTRA_TARGETS += freeze_target
}
diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
index dab2fbf..12ca516 100644
--- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf
+++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
@@ -102,6 +102,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
--dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \
--unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
--compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
&& if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \
> /dev/null 2>&1; then \
@@ -132,6 +133,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
--elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \
--unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
--compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ $$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
$$QMAKE_POST_LINK
QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET"
diff --git a/src/qbase.pri b/src/qbase.pri
index 835ed0e..4a75565 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -104,7 +104,7 @@ symbian {
# built in this exact environment. *Never* use this when building a version
# for release.
contains(CONFIG, def_files) {
- defFilePath=../s60installs
+ DEF_FILE=../s60installs
}
}
load(armcc_warnings)
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index c5e1e1c..15e746a 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -62,8 +62,12 @@ mac {
LIBS += -framework CoreServices
}
-# Make dummy "sis" target to keep recursive "make sis" working.
+# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working.
sis_target.target = sis
sis_target.commands =
sis_target.depends = first
QMAKE_EXTRA_TARGETS += sis_target
+freeze_target.target = freeze
+freeze_target.commands =
+freeze_target.depends = first
+QMAKE_EXTRA_TARGETS += freeze_target
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index d211f47..48dc444 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -114,8 +114,12 @@ contains(QT_CONFIG, zlib) {
lib.CONFIG = dummy_install
INSTALLS += lib
-# Make dummy "sis" target to keep recursive "make sis" working.
+# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working.
sis_target.target = sis
sis_target.commands =
sis_target.depends = first
QMAKE_EXTRA_TARGETS += sis_target
+freeze_target.target = freeze
+freeze_target.commands =
+freeze_target.depends = first
+QMAKE_EXTRA_TARGETS += freeze_target