diff options
Diffstat (limited to 'mkspecs/common')
-rw-r--r-- | mkspecs/common/symbian/fixed_stdlib.h | 34 | ||||
-rw-r--r-- | mkspecs/common/symbian/qplatformdefs.h | 136 | ||||
-rw-r--r-- | mkspecs/common/symbian/stl-off/new | 5 | ||||
-rw-r--r-- | mkspecs/common/symbian/symbian.conf | 142 |
4 files changed, 317 insertions, 0 deletions
diff --git a/mkspecs/common/symbian/fixed_stdlib.h b/mkspecs/common/symbian/fixed_stdlib.h new file mode 100644 index 0000000..2346afe --- /dev/null +++ b/mkspecs/common/symbian/fixed_stdlib.h @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $TROLLTECH_DUAL_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 REVERT_WCHAR_T_DECLARED +# undef _WCHAR_T_DECLARED +# endif //_WCHAR_T_DECLARED + +#include <stdlib.h> + +// Revert _WCHAR_T_DECLARED if necessary +# ifdef REVERT_WCHAR_T_DECLARED +# define _WCHAR_T_DECLARED +# undef REVERT_WCHAR_T_DECLARED +# endif //REVERT_WCHAR_T_DECLARED + +#endif
\ No newline at end of file diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h new file mode 100644 index 0000000..90d3f41 --- /dev/null +++ b/mkspecs/common/symbian/qplatformdefs.h @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $TROLLTECH_DUAL_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(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +#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..3939e11 --- /dev/null +++ b/mkspecs/common/symbian/stl-off/new @@ -0,0 +1,5 @@ +// new implemented in symbian libs, do nothing here, just keep Qt happpy +#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..5a61a23 --- /dev/null +++ b/mkspecs/common/symbian/symbian.conf @@ -0,0 +1,142 @@ +# +# 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 = --no_hide_all +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_DESKTOPSERVICES_LIBS = -lsendui -lplatformenv -lcommonui -letext -lapmime +QMAKE_STATUSPANE_LIBS = -lavkon -leikcoctl + +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 $$QMAKE_DESKTOPSERVICES_LIBS $$QMAKE_STATUSPANE_LIBS -lmediaclientaudio +QMAKE_LIBS_NETWORK = +QMAKE_LIBS_OPENGL = +QMAKE_LIBS_OPENVG = -llibOpenVG -llibEGL -lcone +QMAKE_LIBS_COMPAT = +QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib + +!isEmpty(QMAKE_SH) { + QMAKE_COPY = cp + QMAKE_COPY_DIR = cp -r + 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 = 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 += EXPORTUNFROZEN PAGED +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 \ + $${EPOCROOT}epoc32/include/stdapis \ + $${EPOCROOT}epoc32/include/stdapis/sys \ + $$OS_LAYER_LIBC_SYSTEMINCLUDE \ + $${OS_LAYER_LIBC_SYSTEMINCLUDE}/sys \ + $$INCLUDEPATH + +# Supports S60 3.0, 3.1, 3.2 and 5.0 by default +default_deployment.depends = \ + "[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 + } +} |