diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-25 23:06:36 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-25 23:06:36 (GMT) |
commit | 8484fc497f9d02b708cb23adb8ab6102d63a7753 (patch) | |
tree | eb6aacda7fda551bcfbcfd6b0d192b2389bd094e /mkspecs | |
parent | 314c6ec54e4cb4e2ec936ada7e0a112a60b87832 (diff) | |
parent | 1470504e15662acf37bacc58359527f88efc43ab (diff) | |
download | Qt-8484fc497f9d02b708cb23adb8ab6102d63a7753.zip Qt-8484fc497f9d02b708cb23adb8ab6102d63a7753.tar.gz Qt-8484fc497f9d02b708cb23adb8ab6102d63a7753.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
configure
configure.exe
mkspecs/features/qt.prf
tools/configure/configureapp.cpp
Diffstat (limited to 'mkspecs')
30 files changed, 1580 insertions, 8 deletions
diff --git a/mkspecs/common/symbian/fixed_stdlib.h b/mkspecs/common/symbian/fixed_stdlib.h new file mode 100644 index 0000000..f8dc138 --- /dev/null +++ b/mkspecs/common/symbian/fixed_stdlib.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the makespecs of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FIXED_STDLIB_H +#define FIXED_STDLIB_H + +// This hack fixes defect in Symbian stdlib.h. The original file +// does not work correctly when intermixing C and C++ (STL). Remove the hack +// when Open C / C++ team has fixed the defect. + +// If _WCHAR_T_DECLARED is defined, undef it and store information that we +// need to revert the _WCHAR_T_DECLARED define after include +# ifdef _WCHAR_T_DECLARED +# define QT_REVERT_WCHAR_T_DECLARED +# undef _WCHAR_T_DECLARED +# endif //_WCHAR_T_DECLARED + +#include <stdlib.h> + +// Revert _WCHAR_T_DECLARED if necessary +# ifdef QT_REVERT_WCHAR_T_DECLARED +# define _WCHAR_T_DECLARED +# undef QT_REVERT_WCHAR_T_DECLARED +# endif //QT_REVERT_WCHAR_T_DECLARED + +#endif diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h new file mode 100644 index 0000000..b459cef --- /dev/null +++ b/mkspecs/common/symbian/qplatformdefs.h @@ -0,0 +1,166 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +// Get Qt defines/settings + +#include "qglobal.h" + +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs + +// 1) need to reset default environment if _BSD_SOURCE is defined +// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 +// 3) it seems older glibc need this to include the X/Open stuff +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif + +#include <unistd.h> + + +// We are hot - unistd.h should have turned on the specific APIs we requested + +//#include <features.h> +#include <pthread.h> +#include <dirent.h> +#include <fcntl.h> +#include <grp.h> +#include <pwd.h> +//#include <signal.h> +#include <dlfcn.h> +#include <sys/select.h> + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/ipc.h> +#include <sys/time.h> +#include <sys/shm.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <netinet/in.h> +#ifndef QT_NO_IPV6IFNAME +#include <net/if.h> +#endif +#include <arpa/inet.h> + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct stat64 +#define QT_STATBUF4TSTAT struct stat64 +#define QT_STAT ::stat64 +#define QT_FSTAT ::fstat64 +#define QT_LSTAT ::lstat64 +#define QT_OPEN ::open64 +#define QT_TRUNCATE ::truncate64 +#define QT_FTRUNCATE ::ftruncate64 +#define QT_LSEEK ::lseek64 +#else +#define QT_STATBUF struct stat +#define QT_STATBUF4TSTAT struct stat +#define QT_STAT ::stat +#define QT_FSTAT ::fstat +#define QT_LSTAT ::lstat +#define QT_OPEN ::open +#define QT_TRUNCATE ::truncate +#define QT_FTRUNCATE ::ftruncate +#define QT_LSEEK ::lseek +#endif + +#ifdef QT_LARGEFILE_SUPPORT +#define QT_FOPEN ::fopen64 +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_FGETPOS ::fgetpos64 +#define QT_FSETPOS ::fsetpos64 +#define QT_FPOS_T fpos64_t +#define QT_OFF_T off64_t +#else +#define QT_FOPEN ::fopen +#define QT_FSEEK ::fseek +#define QT_FTELL ::ftell +#define QT_FGETPOS ::fgetpos +#define QT_FSETPOS ::fsetpos +#define QT_FPOS_T fpos_t +#define QT_OFF_T long +#endif + +#define QT_STAT_REG S_IFREG +#define QT_STAT_DIR S_IFDIR +#define QT_STAT_MASK S_IFMT +#define QT_STAT_LNK S_IFLNK +#define QT_SOCKET_CONNECT ::connect +#define QT_SOCKET_BIND ::bind +#define QT_FILENO fileno +#define QT_CLOSE ::close +#define QT_READ ::read +#define QT_WRITE ::write +#define QT_ACCESS ::access +#define QT_GETCWD ::getcwd +#define QT_CHDIR ::chdir +#define QT_MKDIR ::mkdir +#define QT_RMDIR ::rmdir +#define QT_OPEN_RDONLY O_RDONLY +#define QT_OPEN_WRONLY O_WRONLY +#define QT_OPEN_RDWR O_RDWR +#define QT_OPEN_CREAT O_CREAT +#define QT_OPEN_TRUNC O_TRUNC +#define QT_OPEN_APPEND O_APPEND + +#define QT_SIGNAL_RETTYPE void +#define QT_SIGNAL_ARGS int +#define QT_SIGNAL_IGNORE SIG_IGN + +#if (defined(__GLIBC__) && (__GLIBC__ >= 2)) || defined(Q_OS_SYMBIAN) +#define QT_SOCKLEN_T socklen_t +#else +#define QT_SOCKLEN_T int +#endif + + +#if defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 1999) +#define QT_SNPRINTF ::snprintf +#define QT_VSNPRINTF ::vsnprintf +#endif + + +#endif // QPLATFORMDEFS_H diff --git a/mkspecs/common/symbian/stl-off/new b/mkspecs/common/symbian/stl-off/new new file mode 100644 index 0000000..8584ba3 --- /dev/null +++ b/mkspecs/common/symbian/stl-off/new @@ -0,0 +1,5 @@ +// 'new' implemented in symbian libs, so do nothing here; just keep Qt happy +#ifndef __NEW_SYMB_ADDON +#define __NEW_SYMB_ADDON +#include <e32base.h> +#endif //__NEW_SYMB_ADDON diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf new file mode 100644 index 0000000..3ba2a8c --- /dev/null +++ b/mkspecs/common/symbian/symbian.conf @@ -0,0 +1,141 @@ +# +# qmake configuration for symbian-* +# + +TEMPLATE = app +CONFIG += qt warn_on release incremental +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +DEFINES += UNICODE QT_KEYPAD_NAVIGATION +QMAKE_COMPILER_DEFINES += SYMBIAN + +QMAKE_EXT_OBJ = .o +QMAKE_EXT_RES = _res.o + +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = +QMAKE_CFLAGS_DEBUG = +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS.CW = +QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_RTTI_ON = +QMAKE_CXXFLAGS_RTTI_OFF = +QMAKE_CXXFLAGS_EXCEPTIONS_ON = +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = + +QMAKE_INCDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] + +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +QMAKE_LINK = g++ +QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl +QMAKE_LFLAGS_EXCEPTIONS_OFF = +QMAKE_LFLAGS_RELEASE = -Wl,-s +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +QMAKE_LFLAGS_DLL = -shared +QMAKE_LINK_OBJECT_MAX = 10 +QMAKE_LINK_OBJECT_SCRIPT= object_script + +QMAKE_LIBS = -llibc -llibm -leuser -llibdl +QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv +QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio +QMAKE_LIBS_NETWORK = +QMAKE_LIBS_EGL = -llibEGL +QMAKE_LIBS_OPENGL = +QMAKE_LIBS_OPENVG = -llibOpenVG +QMAKE_LIBS_COMPAT = +QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib +QMAKE_LIBS_S60 = -lavkon -leikcoctl + +!isEmpty(QMAKE_SH) { + QMAKE_COPY = cp + QMAKE_COPY_DIR = cp -r + QMAKE_MOVE = mv + QMAKE_DEL_FILE = rm -f + QMAKE_MKDIR = mkdir + QMAKE_DEL_DIR = rmdir + QMAKE_CHK_DIR_EXISTS = test -d +} else { + QMAKE_COPY = copy /y + QMAKE_COPY_DIR = xcopy /s /q /y /i + QMAKE_MOVE = move + QMAKE_DEL_FILE = del + QMAKE_MKDIR = mkdir + QMAKE_DEL_DIR = rmdir + QMAKE_CHK_DIR_EXISTS = if not exist +} + +QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe +QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe +QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe + +QMAKE_IDL = midl +QMAKE_LIB = ar -ru +QMAKE_RC = windres +QMAKE_ZIP = zip -r -9 + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded + +load(qt_config) +load(platform_paths) + +MMP_RULES += PAGED +MMP_RULES += "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl" +SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6 + +# Legacy support requires some hardcoded stdapis paths. +INCLUDEPATH = \ + $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \ + $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \ + $${EPOCROOT}epoc32/include \ + $$OS_LAYER_LIBC_SYSTEMINCLUDE \ + $$INCLUDEPATH + +# Supports S60 3.0, 3.1, 3.2 and 5.0 by default +default_deployment.pkg_prerules = \ + "; Default HW/platform dependencies" \ + "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ + "[0x102032BE],0,0,0,{\"S60ProductID\"}" \ + "[0x102752AE],0,0,0,{\"S60ProductID\"}" \ + "[0x1028315F],0,0,0,{\"S60ProductID\"}" \ + " " + +DEPLOYMENT += default_deployment + +exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v5.0.sis) { + S60_VERSION = 5.0 +} else { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/Series60v3.2.sis) { + S60_VERSION = 3.2 + } else { + S60_VERSION = 3.1 + MMP_RULES -= PAGED + } +} diff --git a/mkspecs/features/debug_and_release.prf b/mkspecs/features/debug_and_release.prf index 8b89321..19031ef 100644 --- a/mkspecs/features/debug_and_release.prf +++ b/mkspecs/features/debug_and_release.prf @@ -1 +1 @@ -!macx-xcode:addExclusiveBuilds(debug, Debug, release, Release) +!macx-xcode:!symbian-abld:addExclusiveBuilds(debug, Debug, release, Release) diff --git a/mkspecs/features/designer.prf b/mkspecs/features/designer.prf index 61a30cf..fa40caa 100644 --- a/mkspecs/features/designer.prf +++ b/mkspecs/features/designer.prf @@ -1,4 +1,5 @@ -QT += xml script +QT += xml +contains(QT_CONFIG, script): QT += script qt:load(qt) plugin:DEFINES += QDESIGNER_EXPORT_WIDGETS diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index c5af298..42ce1bc 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -1,7 +1,7 @@ #global defaults isEmpty(QMAKE_MOC) { - win32:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe + contains(QMAKE_HOST.os,Windows):QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc } isEmpty(MOC_DIR):MOC_DIR = . @@ -85,7 +85,7 @@ INCREDIBUILD_XGE += moc_source #make sure we can include these files moc_dir_short = $$MOC_DIR -win32:moc_dir_short ~= s,^.:,/, +contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/, contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index c493642..8982d53 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -36,7 +36,7 @@ INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picki win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt # As order does matter for static libs, we reorder the QT variable here -TMPLIBS = declarative multimedia webkit phonon dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core +TMPLIBS = declarative webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core for(QTLIB, $$list($$TMPLIBS)) { contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB } @@ -118,6 +118,14 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} } + isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:symbian: { + QT_ITEM = $${QTPLUG}.dll + + eval(qt_additional_plugin_$${QTPLUG}.sources = $${QT_ITEM}) + eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) + + DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} + } } } #specific module settings diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf index e9d79b0..4ab5ac2 100644 --- a/mkspecs/features/qttest_p4.prf +++ b/mkspecs/features/qttest_p4.prf @@ -3,6 +3,13 @@ CONFIG += qt warn_on console depend_includepath qtAddLibrary(QtTest) +symbian:{ +# qt.prf sets TARGET.EPOCSTACKSIZE and TARGET.EPOCHEAPSIZE +# DEFINES += QTEST_NO_SPECIALIZATIONS + TARGET.CAPABILITY="ALL -TCB" + RSS_RULES ="group_name=\"QtTests\";" +} + # prefix test binary with tst_ !contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_") diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf new file mode 100644 index 0000000..97b99a5 --- /dev/null +++ b/mkspecs/features/symbian/application_icon.prf @@ -0,0 +1,39 @@ +load(data_caging_paths) + +# 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( CONFIG, no_icon ) { + symbian:RSS_RULES ="hidden = KAppIsHidden;" + CONFIG -= no_icon +} else { +# There is no sense to compile MIF icon is no_icon CONFIGS is set + !isEmpty(ICON) { + + !count(ICON, $$size(TRANSLATIONS)):!count(ICON, 1) { + message("ICON keyword must have one or the same amout of items as in TRANSLATIONS keyword") + } + + # MIF files will have UID in their names, if TARGET.UID3 is not set, remind the user + isEmpty(TARGET.UID3):error("TARGET.UID3 must be explicitly defined for ICON generation") + + # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code + symbian-abld { + #Makefile: requires paths with backslash + ICON = $$replace( ICON, /, \\) + + # Extra compiler rules for mifconv + mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif + # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library + # svg-t icons should always use /c32 depth + mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",) + mifconv.input = ICON + mifconv.CONFIG = no_link combine + # target_predeps together with combine seems not to work correctly, lets define it by ourselves + PRE_TARGETDEPS += $$mifconv.output + QMAKE_EXTRA_COMPILERS += mifconv + } + # Rules to use generated MIF file from symbian resources + RSS_RULES.number_of_icons = $$size(ICON) + RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif + } +}
\ No newline at end of file diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf new file mode 100644 index 0000000..95b3bc0 --- /dev/null +++ b/mkspecs/features/symbian/armcc_warnings.prf @@ -0,0 +1,10 @@ +# 111: Statement is unreachable +# 185: Dynamic initialization in unreachable code +# 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) +# 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 111,185,191,368,1293,1294,2874 diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf new file mode 100644 index 0000000..3ed5661 --- /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.sources = 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.sources = 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(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = /$$RESOURCE_FILES_DIR/qt/plugins +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
\ No newline at end of file diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf new file mode 100644 index 0000000..3c2944c --- /dev/null +++ b/mkspecs/features/symbian/default_post.prf @@ -0,0 +1,31 @@ +load(default_post) + +contains(TEMPLATE, ".*app") { + contains(CONFIG, stdbinary) { + QMAKE_LIBS += + } else:contains(QT, gui):contains(CONFIG,qt) { + S60MAIN_LIBS = -leuser -lavkon -leikcore -leiksrv -lws32 -lapparc -lcone -leikcoctl -lbafl -lefsrv + QMAKE_LIBS += -lqtmain.lib $$S60MAIN_LIBS + } else { + QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY + } +} +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 +} + +contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG,qt) { + load(application_icon.prf) +}
\ No newline at end of file diff --git a/mkspecs/features/symbian/default_pre.prf b/mkspecs/features/symbian/default_pre.prf new file mode 100644 index 0000000..ddb23b3 --- /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/epocallowdlldata.prf b/mkspecs/features/symbian/epocallowdlldata.prf new file mode 100644 index 0000000..b336f48 --- /dev/null +++ b/mkspecs/features/symbian/epocallowdlldata.prf @@ -0,0 +1 @@ +TARGET.EPOCALLOWDLLDATA=1 diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf new file mode 100644 index 0000000..089dddc --- /dev/null +++ b/mkspecs/features/symbian/moc.prf @@ -0,0 +1,16 @@ +load(moc) + +RET = $$find(MOC_DIR, "\.[a-z]") +!isEmpty(RET):{ + error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile.") +} + +RET = $$find(RCC_DIR, "\.[a-z]") +!isEmpty(RET):{ + error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile.") +} + +RET = $$find(OBJECTS_DIR, "\.[a-z]") +!isEmpty(RET):{ + error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile.") +} diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf new file mode 100644 index 0000000..bec9811 --- /dev/null +++ b/mkspecs/features/symbian/platform_paths.prf @@ -0,0 +1,480 @@ +# +# ============================================================================== +# 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 +# +# +# +# +# ============================================================================== + +exists($${EPOCROOT}epoc32/include/platform_paths.prf) { + + # Load platform specific paths + load($${EPOCROOT}epoc32/include/platform_paths.prf) + +} else { + + # No platform specific paths provided, use default paths + + exists($${EPOCROOT}epoc32/include/platform) { # New SF structure + + # --------------------------------------- + # Location, where the applications layer specific public headers are exported + # --------------------------------------- + + defineReplace(APP_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/app/$$1) + } + defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/app/$$1) + } + + # --------------------------------------- + # Location, where the applications layer specific platform headers are exported + # --------------------------------------- + + defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/platform/app/$$1) + } + defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) { + return (/epoc32/include/platform/app/$$1) + } + + # --------------------------------------- + # Location, where the middleware layer specific public headers are exported + # --------------------------------------- + + defineReplace(MW_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/mw/$$1) + } + defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/mw/$$1) + } + + # --------------------------------------- + # Location, where the middleware layer specific platform headers are exported + # --------------------------------------- + + defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/platform/mw/$$1) + } + defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) { + return (/epoc32/include/platform/mw/$$1) + } + + # --------------------------------------- + # Location, where the os layer specific public headers are exported + # --------------------------------------- + + defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/$$1) + } + # WARNING: If the following path changes see the exists() function around line 219 + defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/$$1) + } + + # --------------------------------------- + # Location, where the os specific platform headers are exported + # --------------------------------------- + + defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/platform/$$1) + } + defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) { + return (/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 = \ + /epoc32/include \ + /epoc32/include/mw \ + /epoc32/include/platform/mw \ + /epoc32/include/platform \ + /epoc32/include/app \ + /epoc32/include/platform/app \ + /epoc32/include/platform/loc \ + /epoc32/include/platform/mw/loc \ + /epoc32/include/platform/app/loc \ + /epoc32/include/platform/loc/sc \ + /epoc32/include/platform/mw/loc/sc \ + /epoc32/include/platform/app/loc/sc + + # 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 = \ + /epoc32/include \ + /epoc32/include/mw \ + /epoc32/include/platform/mw \ + /epoc32/include/platform \ + /epoc32/include/platform/loc \ + /epoc32/include/platform/mw/loc \ + /epoc32/include/platform/loc/sc \ + /epoc32/include/platform/mw/loc/sc + + # 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 = \ + /epoc32/include \ + /epoc32/include/platform \ + /epoc32/include/platform/loc \ + /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 = \ + /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/stlportv5) { + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) + } else { + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) + } + + 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) + + # --------------------------------------- + # Definitions to export IBY files to different folders where they will be taken + # to ROM image + # --------------------------------------- + + defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/app/$$1) + } + defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/mw/$$1) + } + defineReplace(CORE_OSEXT_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/os/$$1) + } + defineReplace(CORE_OS_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/os/$$1) + } + defineReplace(CORE_ADAPT_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/$$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 + + } else { # Old pre-SF structure + + # --------------------------------------- + # Location, where the applications layer specific public headers are exported + # --------------------------------------- + + defineReplace(APP_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/applications/$$1) + } + defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/applications/$$1) + } + + # --------------------------------------- + # Location, where the applications layer specific platform headers are exported + # --------------------------------------- + + defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/domain/applications/$$1) + } + defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) { + return (/epoc32/include/domain/applications/$$1) + } + + # --------------------------------------- + # Location, where the middleware layer specific public headers are exported + # --------------------------------------- + + defineReplace(MW_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/middleware/$$1) + } + defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/middleware/$$1) + } + + # --------------------------------------- + # Location, where the middleware layer specific platform headers are exported + # --------------------------------------- + + defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/domain/middleware/$$1) + } + defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) { + return (/epoc32/include/domain/middleware/$$1) + } + + # --------------------------------------- + # Location, where the os layer specific public headers are exported + # --------------------------------------- + + defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) { + return (/epoc32/include/osextensions/$$1) + } + # WARNING: If the following path changes see the exists() function around line 430 + defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) { + return (/epoc32/include/osextensions/$$1) + } + + # --------------------------------------- + # Location, where the os specific platform headers are exported + # --------------------------------------- + + defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) { + return (/epoc32/include/domain/osextensions/$$1) + } + defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) { + return (/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 = \ + /epoc32/include \ + /epoc32/include/oem \ + /epoc32/include/middleware \ + /epoc32/include/domain/middleware \ + /epoc32/include/osextensions \ + /epoc32/include/domain/osextensions \ + /epoc32/include/applications \ + /epoc32/include/domain/applications \ + /epoc32/include/domain/osextensions/loc \ + /epoc32/include/domain/middleware/loc \ + /epoc32/include/domain/applications/loc \ + /epoc32/include/domain/osextensions/loc/sc \ + /epoc32/include/domain/middleware/loc/sc \ + /epoc32/include/domain/applications/loc/sc + + # 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 = \ + /epoc32/include \ + /epoc32/include/oem \ + /epoc32/include/middleware \ + /epoc32/include/domain/middleware \ + /epoc32/include/osextensions \ + /epoc32/include/domain/osextensions \ + /epoc32/include/domain/osextensions/loc \ + /epoc32/include/domain/middleware/loc \ + /epoc32/include/domain/osextensions/loc/sc \ + /epoc32/include/domain/middleware/loc/sc + + # 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 = \ + /epoc32/include \ + /epoc32/include/oem \ + /epoc32/include/osextensions \ + /epoc32/include/domain/osextensions \ + /epoc32/include/domain/osextensions/loc \ + /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 = \ + /epoc32/include/oem \ + /epoc32/include/osextensions \ + /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) \ + /epoc32/include/stdapis \ + /epoc32/include/stdapis/sys + + OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \ + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \ + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) \ + /epoc32/include/stdapis/glib-2.0 \ + /epoc32/include/stdapis/glib-2.0/glib \ + /epoc32/include/stdapis/glib-2.0/gObject + + OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) \ + /epoc32/include/stdapis/openssl + + # stlportv5 is preferred over stlport as it has the throwing version of operator new + exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5)|exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) { + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \ + /epoc32/include/stdapis/stlportv5 + } else { + OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \ + /epoc32/include/stdapis/stlport + } + + OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) \ + /epoc32/include/stdapis/boost + + OS_LAYER_DBUS_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \ + $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) \ + /epoc32/include/stdapis/dbus-1.0 \ + /epoc32/include/stdapis/dbus-1.0/dbus + + OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) \ + /epoc32/include/stdapis/utility + + # --------------------------------------- + # Definitions to export IBY files to different folders where they will be taken + # to ROM image + # --------------------------------------- + + defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/app/$$1) + } + defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/mw/$$1) + } + defineReplace(CORE_OSEXT_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/osext/$$1) + } + defineReplace(CORE_OS_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/core/osext/$$1) + } + defineReplace(CORE_ADAPT_LAYER_IBY_EXPORT_PATH) { + return(/epoc32/rom/include/$$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 + + } +} + + + diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf new file mode 100644 index 0000000..dd4a4d5 --- /dev/null +++ b/mkspecs/features/symbian/qt.prf @@ -0,0 +1,19 @@ +contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL) { + CONFIG *= epocallowdlldata +} + +CONFIG += qtmain + +load(qt) + +# Add dependency to QtLibs package to all other projects besides QtLibs. +# Note: QtLibs 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) { + default_deployment.pkg_prerules += \ + "; Default dependency to Qt libraries" \ + "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {\"QtLibs pre-release\"}" +} + +isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 +isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf new file mode 100644 index 0000000..b4dbc9c --- /dev/null +++ b/mkspecs/features/symbian/stl.prf @@ -0,0 +1,36 @@ +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_PREFIX]/mkspecs/common/symbian/stl-off + +# libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new +exists($${EPOCROOT}epoc32/release/armv5/urel/libstdcppv5.dll ) { + LIBS *= -llibstdcppv5.dll + + # STDCPP turns on standard C++ new behaviour in SBSv2 + MMP_RULES += "STDCPP" + + # defining __SYMBIAN_STDCPP_SUPPORT__ turns on standard C++ new behaviour pre SBSv2 + DEFINES += "__SYMBIAN_STDCPP_SUPPORT__" + + # operator new is actually supplied in stdnew.lib for hardware builds + eabiStdNewLibBlock = \ + "$${LITERAL_HASH}ifdef EABI" \ + "LIBRARY stdnew.lib" \ + "$${LITERAL_HASH}endif" + + MMP_RULES += eabiStdNewLibBlock +} else { + LIBS *= -llibstdcpp.dll +} diff --git a/mkspecs/features/symbian/stl_off.prf b/mkspecs/features/symbian/stl_off.prf new file mode 100644 index 0000000..d5d1c7c --- /dev/null +++ b/mkspecs/features/symbian/stl_off.prf @@ -0,0 +1,2 @@ +CONFIG -= stl + diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index e768d0f..eaf373a 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -1,11 +1,11 @@ isEmpty(QMAKE_UIC3) { - win32:QMAKE_UIC3 = $$[QT_INSTALL_BINS]\uic3.exe + contains(QMAKE_HOST.os,Windows):QMAKE_UIC3 = $$[QT_INSTALL_BINS]\uic3.exe else:QMAKE_UIC3 = $$[QT_INSTALL_BINS]/uic3 } isEmpty(QMAKE_UIC) { - win32:QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe + contains(QMAKE_HOST.os,Windows):QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe else:QMAKE_UIC = $$[QT_INSTALL_BINS]/uic } @@ -36,7 +36,7 @@ isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_ !isEmpty(FORMS)|!isEmpty(FORMS3) { ui_dir_short = $$UI_HEADERS_DIR - win32:ui_dir_short ~= s,^.:,/, + contains(QMAKE_HOST.os,Windows):ui_dir_short ~= s,^.:,/, contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR } diff --git a/mkspecs/symbian-abld/qmake.conf b/mkspecs/symbian-abld/qmake.conf new file mode 100644 index 0000000..499bf63 --- /dev/null +++ b/mkspecs/symbian-abld/qmake.conf @@ -0,0 +1,9 @@ +# +# qmake configuration for symbian-abld +# +# Written for SYMBIAN_ABLD +# + +MAKEFILE_GENERATOR = SYMBIAN_ABLD + +include(../common/symbian/symbian.conf) diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm new file mode 100644 index 0000000..b4f39f5 --- /dev/null +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm @@ -0,0 +1,39 @@ +# /**************************************************************************** +# ** +# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +# ** Contact: Nokia Corporation (qt-info@nokia.com) +# ** +# ** This file is part of symbian-sbsv2 mkspec. +# ** +# ****************************************************************************/ + +include $(FLMHOME)/metaflm.mk + +SINGLETON:=$(call sanitise,TARGET_$(DEPLOY_TARGET)) +CLEAN_TARGET:= + +define qmake_emulator_deployment +$(ALLTARGET):: $(1) +FINAL::$(1) + +# Prevent duplicate targets from being created +$(SINGLETON):=1 + +CLEAN_TARGET:=$(1) + +$(1): $(2) + $(call startrule,qmake_emulator_deployment) \ + $(GNUCP) --no-preserve=mode $(2) "$$@" && \ + $(GNUCHMOD) a+rw "$$@" \ + $(call endrule,qmake_emulator_deployment) +endef + +ifeq ($($(SINGLETON)),) +$(eval $(call qmake_emulator_deployment, $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_TARGET)), $(subst $(CHAR_SPACE),\$(CHAR_SPACE),$(DEPLOY_SOURCE)))) +$(call makepath,$(dir $(DEPLOY_TARGET))) +$(eval $(call GenerateStandardCleanTarget,$(CLEAN_TARGET),'')) +endif + + + + diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm new file mode 100644 index 0000000..cc57bf4 --- /dev/null +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm @@ -0,0 +1,35 @@ +# /**************************************************************************** +# ** +# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +# ** Contact: Nokia Corporation (qt-info@nokia.com) +# ** +# ** This file is part of symbian-sbsv2 mkspec. +# ** +# ****************************************************************************/ + +include $(FLMHOME)/metaflm.mk + +SINGLETON:=$(call sanitise,TARGET_$(PREDEP_TARGET)) + +define qmake_extra_pre_targetdep +$(ALLTARGET):: $(PREDEP_TARGET) +EXPORT:: $(PREDEP_TARGET) +LIBRARY:: $(PREDEP_TARGET) +TARGET:: $(PREDEP_TARGET) + +# Prevent duplicate targets from being created +$(SINGLETON):=1 + +$(PREDEP_TARGET): $(DEPS) + $(call startrule,qmake_extra_pre_targetdep) \ + $(COMMAND) \ + $(call endrule,qmake_extra_pre_targetdep) +endef + +ifeq ($($(SINGLETON)),) +$(eval $(qmake_extra_pre_targetdep)) +$(eval $(call GenerateStandardCleanTarget,$(PREDEP_TARGET),'')) +endif + + + diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_generate_temp_dirs.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_generate_temp_dirs.flm new file mode 100644 index 0000000..ca6cca9 --- /dev/null +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_generate_temp_dirs.flm @@ -0,0 +1,22 @@ +# /**************************************************************************** +# ** +# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +# ** Contact: Nokia Corporation (qt-info@nokia.com) +# ** +# ** This file is part of symbian-sbsv2 mkspec. +# ** +# ****************************************************************************/ + +include $(FLMHOME)/metaflm.mk + +SINGLETON:=$(call sanitise,TEMP_DIRS_$(EXTENSION_ROOT)) + +ifeq ($($(SINGLETON)),) +$(SINGLETON):=1 +$(call makepath,$(DIRS)) +$(eval $(call GenerateStandardCleanTarget,'',$(DIRS))) +endif + + + + diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm new file mode 100644 index 0000000..a3e0f4a --- /dev/null +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm @@ -0,0 +1,34 @@ +# /**************************************************************************** +# ** +# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +# ** Contact: Nokia Corporation (qt-info@nokia.com) +# ** +# ** This file is part of symbian-sbsv2 mkspec. +# ** +# ****************************************************************************/ + +include $(FLMHOME)/metaflm.mk + +POST_LINK_TARGET:=POST_LINK_$(PLATFORM_PATH)_$(CFG_PATH)_$(call sanitise,$(LINK_TARGET)) +POST_LINK_DEP:=$(EPOCROOT)/epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/$(LINK_TARGET) + +# Passing $(PLATFORM_PATH) etc. variables in FLM options makes sbsv2 toolchain to double the dollar signs, +# requiring evaluating them twice in order to get desired values, +# so do an extra evaluation before using the command. +define command_fixer + THE_COMMAND:=$(POST_LINK_CMD) +endef + +define qmake_post_link +$(ALLTARGET):: $(POST_LINK_TARGET) +FINAL:: $(POST_LINK_TARGET) + +$(POST_LINK_TARGET): $(POST_LINK_DEP) + $(call startrule,qmake_post_link) \ + $(THE_COMMAND) \ + $(call endrule,qmake_post_link) +endef + +$(eval $(command_fixer)) +$(eval $(qmake_post_link)) + diff --git a/mkspecs/symbian-sbsv2/flm/qt/qt.xml b/mkspecs/symbian-sbsv2/flm/qt/qt.xml new file mode 100644 index 0000000..2c46f78 --- /dev/null +++ b/mkspecs/symbian-sbsv2/flm/qt/qt.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +# /**************************************************************************** +# ** +# ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +# ** Contact: Nokia Corporation (qt-info@nokia.com) +# ** +# ** This file is part of symbian-sbsv2 mkspec. +# ** +# ****************************************************************************/ +--> + +<build xmlns="http://symbian.com/xml/build" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://symbian.com/xml/build http://symbian.com/xml/build/2_0.xsd"> + + <!-- Extension interfaces : replacements for Template Extension Makefiles --> + + <interface name="qt.qmake_extra_pre_targetdep" extends="Symbian.UserFLM" + flm="qmake_extra_pre_targetdep.flm"> + <param name='PREDEP_TARGET' /> + <param name='DEPS' default = '' /> + <param name='COMMAND' default = '' /> + </interface> + + <interface name="qt.qmake_emulator_deployment" extends="Symbian.UserFLM" + flm="qmake_emulator_deployment.flm"> + <param name='DEPLOY_SOURCE' /> + <param name='DEPLOY_TARGET' /> + </interface> + + <interface name="qt.qmake_post_link" extends="Symbian.UserFLM" + flm="qmake_post_link.flm"> + <param name='POST_LINK_CMD' /> + <param name='LINK_TARGET' /> + </interface> + + <interface name="qt.qmake_generate_temp_dirs" extends="Symbian.UserFLM" + flm="qmake_generate_temp_dirs.flm"> + <param name='DIRS' /> + </interface> +</build> diff --git a/mkspecs/symbian-sbsv2/qmake.conf b/mkspecs/symbian-sbsv2/qmake.conf new file mode 100644 index 0000000..0a5e878 --- /dev/null +++ b/mkspecs/symbian-sbsv2/qmake.conf @@ -0,0 +1,9 @@ +# +# qmake configuration for symbian-sbsv2 +# +# Written for SYMBIAN_SBSV2 +# + +MAKEFILE_GENERATOR = SYMBIAN_SBSV2 + +include(../common/symbian/symbian.conf) diff --git a/mkspecs/win32-mwc/qmake.conf b/mkspecs/win32-mwc/qmake.conf new file mode 100644 index 0000000..8ebe4ff --- /dev/null +++ b/mkspecs/win32-mwc/qmake.conf @@ -0,0 +1,110 @@ +# +# qmake configuration for win32-mwc +# +# Written for mwc +# + +MAKEFILE_GENERATOR = MINGW +TEMPLATE = app +CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target +QT += core gui +DEFINES += UNICODE QT_NO_PROCESS QT_NO_SHAREDMEMORY QT_NO_CONCURRENT QT_NO_SYSTEMSEMAPHORE +QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 + +QMAKE_EXT_OBJ = .o +QMAKE_EXT_RES = _res.o + +QMAKE_CC = mwccsym2 +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -gccinc -stackcommit 1024000 -stackreserve 1024000 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -w on -w nonotused -w nonotinlined -w noimplicit -w nopadding -w noemptydecl -w nounusedexpr -w nopossible +QMAKE_CFLAGS_WARN_OFF = -w off +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g -O1 +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +QMAKE_CXX = mwccsym2 +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_RTTI_ON = -RTTI on +QMAKE_CXXFLAGS_RTTI_OFF = -RTTI off +QMAKE_CXXFLAGS_EXCEPTIONS_ON = "-Cpp_exceptions on" +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = "-Cpp_exceptions off" + +QMAKE_INCDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +QMAKE_LINK = mwldsym2 +#QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc +QMAKE_LFLAGS = +QMAKE_LFLAGS_EXCEPTIONS_ON = +QMAKE_LFLAGS_EXCEPTIONS_OFF = +#QMAKE_LFLAGS_RELEASE = -Wl,-s +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +#QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +#QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +QMAKE_LFLAGS_CONSOLE = +QMAKE_LFLAGS_WINDOWS = +QMAKE_LFLAGS_DLL = -runtime dm +QMAKE_LINK_OBJECT_MAX = 99999999 +QMAKE_LINK_OBJECT_SCRIPT= object_script + + +QMAKE_LIBS = +QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 +QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 +QMAKE_LIBS_NETWORK = -lws2_32 +QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32 +QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 +#QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain +QMAKE_LIBS_QT_ENTRY = -lqtmain + +!isEmpty(QMAKE_SH) { + MINGW_IN_SHELL = 1 + QMAKE_DIR_SEP = / + QMAKE_COPY = cp + QMAKE_COPY_DIR = xcopy /s /q /y /i + QMAKE_MOVE = mv + QMAKE_DEL_FILE = rm + QMAKE_MKDIR = mkdir + QMAKE_DEL_DIR = rmdir + QMAKE_CHK_DIR_EXISTS = test -d +} else { + QMAKE_COPY = copy /y + QMAKE_COPY_DIR = xcopy /s /q /y /i + QMAKE_MOVE = move + QMAKE_DEL_FILE = del + QMAKE_MKDIR = mkdir + QMAKE_DEL_DIR = rmdir + QMAKE_CHK_DIR_EXISTS = if not exist +} + +QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe +QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe +QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe + +QMAKE_IDL = midl +QMAKE_LIB = $$QMAKE_LINK -library -o +QMAKE_RC = windres +QMAKE_ZIP = zip -r -9 + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +load(qt_config) diff --git a/mkspecs/win32-mwc/qplatformdefs.h b/mkspecs/win32-mwc/qplatformdefs.h new file mode 100644 index 0000000..a96b4db --- /dev/null +++ b/mkspecs/win32-mwc/qplatformdefs.h @@ -0,0 +1,164 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +#ifdef UNICODE +#ifndef _UNICODE +#define _UNICODE +#endif +#endif + +// Get Qt defines/settings + +#include "qglobal.h" + +#include <tchar.h> +#include <io.h> +#include <direct.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <sys/stat.h> +#include <stdlib.h> +#include <windows.h> +#include <limits.h> + +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500) +typedef enum { + NameUnknown = 0, + NameFullyQualifiedDN = 1, + NameSamCompatible = 2, + NameDisplay = 3, + NameUniqueId = 6, + NameCanonical = 7, + NameUserPrincipal = 8, + NameCanonicalEx = 9, + NameServicePrincipal = 10, + NameDnsDomain = 12 +} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT; +#endif + +#define Q_FS_FAT +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct _stati64 // non-ANSI defs +#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs +#define QT_STAT _stati64 +#define QT_FSTAT _fstati64 +#else +#define QT_STATBUF struct _stat // non-ANSI defs +#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs +#define QT_STAT _stat +#define QT_FSTAT _fstat +#endif +#define QT_STAT_REG _S_IFREG +#define QT_STAT_DIR _S_IFDIR +#define QT_STAT_MASK _S_IFMT +#if defined(_S_IFLNK) +# define QT_STAT_LNK _S_IFLNK +#endif +#define QT_FILENO _fileno +#define QT_OPEN _open +#define QT_CLOSE _close +#ifdef QT_LARGEFILE_SUPPORT +#define QT_LSEEK _lseeki64 +#ifndef UNICODE +#define QT_TSTAT _stati64 +#else +#define QT_TSTAT _wstati64 +#endif +#else +#define QT_LSEEK _lseek +#ifndef UNICODE +#define QT_TSTAT _stat +#else +#define QT_TSTAT _wstat +#endif +#endif +#define QT_READ _read +#define QT_WRITE _write +#define QT_ACCESS _access +#define QT_GETCWD _getcwd +#define QT_CHDIR _chdir +#define QT_MKDIR _mkdir +#define QT_RMDIR _rmdir +#define QT_OPEN_LARGEFILE 0 +#define QT_OPEN_RDONLY _O_RDONLY +#define QT_OPEN_WRONLY _O_WRONLY +#define QT_OPEN_RDWR _O_RDWR +#define QT_OPEN_CREAT _O_CREAT +#define QT_OPEN_TRUNC _O_TRUNC +#define QT_OPEN_APPEND _O_APPEND +#if defined(O_TEXT) +# define QT_OPEN_TEXT _O_TEXT +# define QT_OPEN_BINARY _O_BINARY +#endif + +#define QT_FOPEN fopen +#ifdef QT_LARGEFILE_SUPPORT +#define QT_FSEEK fseeko64 +#define QT_FTELL ftello64 +#else +#define QT_FSEEK fseek +#define QT_FTELL ftell +#endif +#define QT_FGETPOS fgetpos +#define QT_FSETPOS fsetpos +#define QT_FPOS_T fpos_t +#ifdef QT_LARGEFILE_SUPPORT +#define QT_OFF_T off64_t +#else +#define QT_OFF_T long +#endif + +#define QT_SIGNAL_ARGS int + +#define QT_VSNPRINTF _vsnprintf +#define QT_SNPRINTF _snprintf + +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 + +#define PATH_MAX 1024 +#endif // QPLATFORMDEFS_H |