summaryrefslogtreecommitdiff
path: root/mkspecs
diff options
context:
space:
mode:
authorIan Dean <ian@mediator-software.com>2012-07-18 12:26:39 -0700
committerQt by Nokia <qt-info@nokia.com>2012-07-25 02:11:47 +0200
commitc13df9f2147e85e104ac105f975ef87914c908e9 (patch)
tree6ee265e74c4645f02806cf19654a7a0f8360e622 /mkspecs
parentc1e26903af2938cfcd75c7c6f6325b012cd9ccee (diff)
downloadqt4-tools-c13df9f2147e85e104ac105f975ef87914c908e9.tar.gz
Removed existing iOS mkspecs. Added Qt5 iOS mkspecs to unsupported.
Change-Id: I504d987abd092d25c68f7209cb5787a01d6fac50 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/gcc-base-ios.conf33
-rw-r--r--mkspecs/common/ios.conf21
-rw-r--r--mkspecs/common/ios/GLES/gl.h43
-rw-r--r--mkspecs/common/ios/GLES2/gl2.h43
-rw-r--r--mkspecs/common/ios/arch.conf84
-rw-r--r--mkspecs/common/ios/clang.conf51
-rw-r--r--mkspecs/common/ios/g++.conf21
-rw-r--r--mkspecs/common/ios/llvm.conf31
-rw-r--r--mkspecs/common/ios/qmake.conf66
-rw-r--r--mkspecs/common/ios/qplatformdefs.h (renamed from mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qplatformdefs.h)8
-rw-r--r--mkspecs/common/ios/versions.conf184
-rw-r--r--mkspecs/qpa/common/g++-base-macx-iphone.conf47
-rw-r--r--mkspecs/qpa/common/g++-base-macx-iphonedevice.conf24
-rw-r--r--mkspecs/qpa/macx-iphonedevice-g++-armv6/qmake.conf11
-rw-r--r--mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qmake.conf11
-rw-r--r--mkspecs/qpa/macx-iphonedevice-g++/qmake.conf11
-rw-r--r--mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf27
-rw-r--r--mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-clang-legacy/qplatformdefs.h (renamed from mkspecs/qpa/macx-iphonedevice-g++/qplatformdefs.h)63
-rw-r--r--mkspecs/unsupported/macx-iosdevice-clang/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-clang/qplatformdefs.h (renamed from mkspecs/qpa/macx-iphonesimulator-g++/qplatformdefs.h)63
-rw-r--r--mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-g++-legacy/qplatformdefs.h (renamed from mkspecs/qpa/macx-iphonedevice-g++-armv6/qplatformdefs.h)65
-rw-r--r--mkspecs/unsupported/macx-iosdevice-g++/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-g++/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-llvm-legacy/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf35
-rw-r--r--mkspecs/unsupported/macx-iosdevice-llvm/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-clang-legacy/qmake.conf6
-rw-r--r--mkspecs/unsupported/macx-iossimulator-clang-legacy/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-clang/qmake.conf6
-rw-r--r--mkspecs/unsupported/macx-iossimulator-clang/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf33
-rw-r--r--mkspecs/unsupported/macx-iossimulator-g++-legacy/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-g++/qmake.conf33
-rw-r--r--mkspecs/unsupported/macx-iossimulator-g++/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf33
-rw-r--r--mkspecs/unsupported/macx-iossimulator-llvm-legacy/qplatformdefs.h42
-rw-r--r--mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf33
-rw-r--r--mkspecs/unsupported/macx-iossimulator-llvm/qplatformdefs.h42
41 files changed, 1322 insertions, 317 deletions
diff --git a/mkspecs/common/gcc-base-ios.conf b/mkspecs/common/gcc-base-ios.conf
new file mode 100644
index 0000000000..68ec777f85
--- /dev/null
+++ b/mkspecs/common/gcc-base-ios.conf
@@ -0,0 +1,33 @@
+#
+# Base qmake configuration for GCC on iOS
+#
+# Before making changes to this file, please read the comment in
+# gcc-base.conf, to make sure the change goes in the right place.
+#
+# To verify that your change has the desired effect on the final configuration
+# you can use the manual test in tests/manual/mkspecs.
+#
+
+include(gcc-base.conf)
+
+QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
+
+QMAKE_CFLAGS_DWARF2 += -gdwarf-2
+
+QMAKE_CXXFLAGS_DWARF2 += $$QMAKE_CFLAGS_DWARF2
+
+QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
+QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
+
+QMAKE_LFLAGS += -headerpad_max_install_names
+QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace
+QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}@executable_path/
+QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
+
diff --git a/mkspecs/common/ios.conf b/mkspecs/common/ios.conf
new file mode 100644
index 0000000000..5f28a5c5b2
--- /dev/null
+++ b/mkspecs/common/ios.conf
@@ -0,0 +1,21 @@
+#
+# qmake common configuration for iOS
+#
+
+MAKEFILE_GENERATOR = UNIX
+TEMPLATE = app
+CONFIG += qt ios warn_on release reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname link_prl
+QT += core gui opengl
+QMAKE_INCREMENTAL_STYLE = sublib
+
+# Qt can't build iOS app bundle :(
+CONFIG -= app_bundle
+
+# Not deploying to Mac OSX
+QMAKE_MACOSX_DEPLOYMENT_TARGET =
+
+# Add iOS common folder to include path
+INCLUDEPATH += $$PWD/ios
+
+# iOS defines
+DEFINES += DARWIN_NO_CARBON Q_OS_IOS QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG
diff --git a/mkspecs/common/ios/GLES/gl.h b/mkspecs/common/ios/GLES/gl.h
new file mode 100644
index 0000000000..596fa37398
--- /dev/null
+++ b/mkspecs/common/ios/GLES/gl.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h> \ No newline at end of file
diff --git a/mkspecs/common/ios/GLES2/gl2.h b/mkspecs/common/ios/GLES2/gl2.h
new file mode 100644
index 0000000000..07e3abded1
--- /dev/null
+++ b/mkspecs/common/ios/GLES2/gl2.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <OpenGLES/ES2/gl.h>
+#include <OpenGLES/ES2/glext.h>
diff --git a/mkspecs/common/ios/arch.conf b/mkspecs/common/ios/arch.conf
new file mode 100644
index 0000000000..4ad96874fe
--- /dev/null
+++ b/mkspecs/common/ios/arch.conf
@@ -0,0 +1,84 @@
+#
+# Helper to set CPU architecture flags for iOS configurations
+#
+# Depends on:
+#
+# QMAKE_IPHONEOS_DEPLOYMENT_TARGET - set in mkspecs/common/ios/versions.conf
+#
+# Note:
+#
+# Must be included after load(qt_config) in mkspec for auto-detection based
+# on GL/ES version (GL/ES 2.x implies armv7 on iOS).
+#
+
+# Target architecture for iOS devices (armv6, armv7 or leave blank for default)
+QMAKE_IOS_TARGET_ARCH =
+
+###########################################################################
+
+# Device?
+!*simulator* {
+ # Let mkspec specify archictecture
+ *armv6*: QMAKE_IOS_TARGET_ARCH = armv6
+ else:*armv7*: QMAKE_IOS_TARGET_ARCH = armv7
+
+ # ARMv7 architecture device (see below) is required for OpenGL/ES 2.x
+ isEmpty(QMAKE_IOS_TARGET_ARCH):contains(QT_CONFIG, opengles2): QMAKE_IOS_TARGET_ARCH = armv7
+
+ # No target architecture specified?
+ isEmpty(QMAKE_IOS_TARGET_ARCH) {
+ # iOS versions < 4.3 can be armv6 or armv7, so need armv6 for max. compatibility,
+ # assume that building for OpenGL/ES 1.x is targeting armv6
+ lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, "4.3")|contains(QT_CONFIG, opengles1) {
+ QMAKE_IOS_TARGET_ARCH = armv6
+ } else: QMAKE_IOS_TARGET_ARCH = armv7
+ }
+
+ # Samsung S5PC100, Apple A4, A5, A5X
+ equals(QMAKE_IOS_TARGET_ARCH, "armv7") {
+ # iOS CPU architecture (armv7)
+ QMAKE_IOS_ARM_ARCH = __ARM_ARCH_7__
+
+ # Thumb2 instructions
+ QMAKE_IOS_ARM_FLAGS = -mthumb
+ QMAKE_IOS_ARM_ARCH += __MARM_THUMB__
+
+ # NEON instructions
+ *-g++*: QMAKE_IOS_ARM_FLAGS += -mfloat-abi=softfp -mfpu=neon
+ QMAKE_IOS_ARM_ARCH += __ARM_NEON__
+ } else {
+ # Samsung S5L8900
+ if(equals(QMAKE_IOS_TARGET_ARCH, "armv6")) {
+ # iOS CPU architecture (armv6)
+ QMAKE_IOS_ARM_ARCH = __ARM_ARCH_6__
+
+ # ARM instructions
+ QMAKE_IOS_ARM_FLAGS = -marm -mcpu=arm1176jzf-s
+ !*clang*: QMAKE_IOS_ARM_FLAGS += -march=armv6
+ } else {
+ # Unsupported architecture
+ error("Invalid iOS target $${QMAKE_IOS_TARGET_ARCH}! Edit mkspecs/common/ios/arch.conf to specify target architecture.")
+ }
+ }
+# Simulator is i386 only
+} else: QMAKE_IOS_TARGET_ARCH = i386
+
+# iOS architecture build flags
+QMAKE_IOS_ARCH_FLAGS = -arch $$QMAKE_IOS_TARGET_ARCH
+QMAKE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
+QMAKE_CXXFLAGS += $$QMAKE_IOS_ARCH_FLAGS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
+QMAKE_LFLAGS += $$QMAKE_IOS_ARCH_FLAGS
+QMAKE_IOS_TARGET_ARCH =
+QMAKE_IOS_ARCH_FLAGS =
+
+# Architecture specific defines/flags
+!*simulator* {
+ DEFINES += $$QMAKE_IOS_ARM_ARCH
+ QMAKE_IOS_ARM_ARCH =
+
+ QMAKE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS
+ QMAKE_CXXFLAGS += $$QMAKE_IOS_ARM_FLAGS
+ QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS
+ QMAKE_IOS_ARM_FLAGS =
+}
diff --git a/mkspecs/common/ios/clang.conf b/mkspecs/common/ios/clang.conf
new file mode 100644
index 0000000000..81f76ae0b2
--- /dev/null
+++ b/mkspecs/common/ios/clang.conf
@@ -0,0 +1,51 @@
+#
+# compiler settings for iOS clang compilers
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+# iOS build flags
+QMAKE_IOS_CFLAGS = -fvisibility=hidden -fpascal-strings -fmessage-length=0
+QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter
+QMAKE_IOS_CFLAGS += -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
+QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
+QMAKE_IOS_OBJ_CFLAGS = -Wno-arc-abi -Wc++0x-extensions
+
+# Device or simulator specific flags
+*simulator* {
+ QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
+ QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
+}
+
+# Compiler version-specific flags
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ # Clang 3.1 flags (will be used for later versions too)
+ QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties
+ QMAKE_IOS_CFLAGS += -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized
+ QMAKE_IOS_CFLAGS += -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign
+ QMAKE_IOS_CFLAGS += -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
+ QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions
+ QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
+
+ # Warn about unsupported (later than 4.5) Xcode versions
+ !lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
+} else {
+ if (!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2")) {
+ # Clang 3.0 flags
+ QMAKE_IOS_CFLAGS += -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits
+ } else {
+ # Older Clang versions are not supported
+ error("Unsupported Xcode version $${QMAKE_IOS_XCODE_VERSION}")
+ }
+}
+
+# Set build flags
+QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
+QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
+
+QMAKE_IOS_CFLAGS =
+QMAKE_IOS_CXXFLAGS =
+QMAKE_IOS_OBJ_CFLAGS =
diff --git a/mkspecs/common/ios/g++.conf b/mkspecs/common/ios/g++.conf
new file mode 100644
index 0000000000..8a1e0b20c0
--- /dev/null
+++ b/mkspecs/common/ios/g++.conf
@@ -0,0 +1,21 @@
+#
+# compiler settings for iOS g++ compilers
+#
+
+# iOS build flags
+QMAKE_IOS_CFLAGS = -fvisibility=hidden -fexceptions -fmessage-length=0
+QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wunused-variable
+QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
+
+# Device or simulator specific flags
+!*simulator*: QMAKE_IOS_OBJ_CFLAGS =
+else: QMAKE_IOS_OBJ_CFLAGS = -fobjc-abi-version=2 -fobjc-legacy-dispatch
+
+# Set build flags
+QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
+QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
+
+QMAKE_IOS_CFLAGS =
+QMAKE_IOS_CXXFLAGS =
+QMAKE_IOS_OBJ_CFLAGS =
diff --git a/mkspecs/common/ios/llvm.conf b/mkspecs/common/ios/llvm.conf
new file mode 100644
index 0000000000..fa2e519dd9
--- /dev/null
+++ b/mkspecs/common/ios/llvm.conf
@@ -0,0 +1,31 @@
+#
+# compiler settings for iOS llvm-g++ compilers
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+# iOS build flags
+QMAKE_IOS_CFLAGS = -fvisibility=hidden -fpascal-strings -fmessage-length=0
+QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wunused-variable
+QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
+
+# Device or simulator specific flags
+!*simulator*: QMAKE_IOS_OBJ_CFLAGS =
+else: QMAKE_IOS_OBJ_CFLAGS = -fobjc-abi-version=2 -fobjc-legacy-dispatch
+
+# Compiler version specific flags
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ # Xcode 4.3+ specific flags
+ QMAKE_IOS_CFLAGS += -Wuninitialized
+}
+
+# Set build flags
+QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
+QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
+
+QMAKE_IOS_CFLAGS =
+QMAKE_IOS_CXXFLAGS =
+QMAKE_IOS_OBJ_CFLAGS =
diff --git a/mkspecs/common/ios/qmake.conf b/mkspecs/common/ios/qmake.conf
new file mode 100644
index 0000000000..8ee2575fb4
--- /dev/null
+++ b/mkspecs/common/ios/qmake.conf
@@ -0,0 +1,66 @@
+#
+# Common build settings for all iOS configurations
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+# QMAKE_IOS_SDK_VERSION - set in mkspecs/common/ios/versions.conf
+# QMAKE_IOSSIMULATOR_SDK_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+# iOS SDK device type
+!*simulator*: QMAKE_IOS_DEVICE_TYPE = iPhoneOS
+else {
+ QMAKE_IOS_DEVICE_TYPE = iPhoneSimulator
+
+ # Use simulator SDK version
+ QMAKE_IOS_SDK_VERSION = $$QMAKE_IOS_SIMULATOR_SDK_VERSION
+ QMAKE_IOS_SIMULATOR_SDK_VERSION =
+}
+
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ # Xcode 4.3+ is stored in /Applications
+ QMAKE_IOS_XCODE_PATH = /Applications/Xcode.app/Contents
+} else: QMAKE_IOS_XCODE_PATH =
+
+# iOS platform /Developer path
+QMAKE_IOS_DEV_PATH = $$QMAKE_IOS_XCODE_PATH/Developer/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer
+QMAKE_IOS_XCODE_PATH =
+
+# iOS platform SDK path
+QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/$${QMAKE_IOS_DEVICE_TYPE}$${QMAKE_IOS_SDK_VERSION}.sdk
+QMAKE_IOS_DEV_PATH =
+QMAKE_IOS_DEVICE_TYPE =
+
+QMAKE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
+QMAKE_CXXFLAGS += -isysroot $$QMAKE_IOS_SDK
+QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
+QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK
+QMAKE_IOS_SDK =
+
+# Basic iOS frameworks needed for any GUI app
+QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz
+
+# OpenGL ES1
+QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
+QMAKE_LIBDIR_OPENGL_ES1 =
+QMAKE_LIBS_OPENGL_ES1 = -framework OpenGLES
+
+# OpenGL ES2
+QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
+QMAKE_LIBDIR_OPENGL_ES2 =
+QMAKE_LIBS_OPENGL_ES2 = -framework OpenGLES
+
+# No desktop OpenGL
+QMAKE_INCDIR_OPENGL =
+QMAKE_LIBS_OPENGL =
+QMAKE_LIBS_OPENGL_QT =
+
+# Compiler-specific flags
+!*-g++* {
+ # Objective-C/C++ precompile flags
+ QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+ QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+ QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
+ QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
+}
diff --git a/mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qplatformdefs.h b/mkspecs/common/ios/qplatformdefs.h
index d8777e7752..9b4a8bddfe 100644
--- a/mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qplatformdefs.h
+++ b/mkspecs/common/ios/qplatformdefs.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -94,6 +94,4 @@
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
-#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit"
-
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/ios/versions.conf b/mkspecs/common/ios/versions.conf
new file mode 100644
index 0000000000..b755068769
--- /dev/null
+++ b/mkspecs/common/ios/versions.conf
@@ -0,0 +1,184 @@
+#
+# Helper to set build tool & SDK versions for iOS configurations
+#
+# This file sets up the following configuration variables:
+#
+# QMAKE_IOS_XCODE_VERSION - version number of Xcode being used
+# QMAKE_IOS_SDK_VERSION - version number of iOS device SDK
+# QMAKE_IOS_SIMULATOR_SDK_VERSION - version number of iOS simulator SDK
+#
+# Used in:
+#
+# mkspecs/common/ios/clang.conf
+# mkspecs/common/ios/llvm.conf
+# mkspecs/common/ios/qmake.conf
+# mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf
+# mkspecs/unsupported/macx-iosdevice-clang/qmake.conf
+# mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf
+# mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf
+# mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf
+# mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf
+# mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf
+# mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf
+#
+
+#
+# IMPORTANT:
+#
+# Xcode versions <= 4.2.x must be installed in /Developer.
+# Xcode versions >= 4.3.x must be installed in /Applications
+#
+# Xcode versions >= 4.10 & < 5.0 and versions >= 10.0 are not supported due to
+# the way the version checks are done here. As Apple (so far) has not used
+# minor version numbers greater than 3 for Xcode, and the Xcode major version
+# has only changed three times in the period 2003-2012, this is viewed as an
+# acceptable limitation.
+#
+
+#
+# Edit values below to match iOS build environment, or leave blank for
+# autodetection (slower!)
+#
+
+# Xcode version used for cross-compiling
+QMAKE_IOS_XCODE_VERSION =
+
+# iOS SDK version used for cross-compiling for iOS devices
+QMAKE_IOS_SDK_VERSION =
+
+# iOS SDK version used for cross-compiling for the iOS simulator
+QMAKE_IOS_SIMULATOR_SDK_VERSION =
+
+#
+# Do not edit values below here if using a pre-built SDK
+#
+
+# Minimum iOS version required on deployment target (if not specified, will
+# default to minimum version that guarantees ARMv7 & OpenGL/ES 2.x).
+#
+# No part of Qt or any known plugin uses features that require iOS versions
+# later than 4.0.
+QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.0
+
+###########################################################################
+
+# No Xcode version specified?
+isEmpty(QMAKE_IOS_XCODE_VERSION) {
+ # Get version string from installed Xcode
+ exists(/Applications/Xcode.app/Contents/Developer) {
+ QMAKE_IOS_XCODE_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version)
+ } else: QMAKE_IOS_XCODE_INFO = $$system(/Developer/usr/bin/xcodebuild -version)
+
+ # Extract Xcode version number from output
+ QMAKE_IOS_XCODE_VERSION = $$member(QMAKE_IOS_XCODE_INFO, 1)
+ QMAKE_IOS_XCODE_INFO =
+}
+
+# Make sure Xcode version is valid
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ # Xcode 4.3+ is stored in /Applications
+ QMAKE_IOS_PLATFORM_PATH = /Applications/Xcode.app/Contents/Developer/Platforms
+
+ # Make sure Xcode path is valid
+ !exists($$QMAKE_IOS_PLATFORM_PATH): error("Xcode is not installed in /Applications/Xcode.app! Edit mkspecs/common/ios/versions.conf to specify version installed.")
+} else {
+ # Older Xcode versions are stored in /Developer
+ QMAKE_IOS_PLATFORM_PATH = /Developer/Platforms
+
+ # Make sure Xcode path is valid
+ !exists($$QMAKE_IOS_PLATFORM_PATH): error("Xcode is not installed in /Developer! Edit mkspecs/common/ios/versions.conf to specify version installed.")
+}
+
+# iOS 4.3 is the preferred version as it is the earliest version that is armv7/gles2 only
+QMAKE_IPHONEOS_PREFERRED_TARGET = 4.3
+
+# Building for iOS device?
+!*simulator* {
+ # No iOS SDK version specified?
+ isEmpty(QMAKE_IOS_SDK_VERSION) {
+ # Get version string from installed Xcode
+ !lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ QMAKE_IOS_SDK_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -showsdks)
+ } else: QMAKE_IOS_SDK_INFO = $$system(/Developer/usr/bin/xcodebuild -showsdks)
+
+ # Get names of installed device SDKs
+ QMAKE_IOS_SDK_INFO = $$find(QMAKE_IOS_SDK_INFO, ^iphoneos)
+ for(v, QMAKE_IOS_SDK_INFO): {
+ # Extract SDK version number from output
+ v = $$replace(v,iphoneos,)
+
+ # Use latest SDK version
+ greaterThan(v, $$QMAKE_IOS_SDK_VERSION): QMAKE_IOS_SDK_VERSION = $$v
+ }
+ QMAKE_IOS_SDK_INFO =
+ }
+
+ # Make sure iOS SDK version is valid
+ !exists($$QMAKE_IOS_PLATFORM_PATH/iPhoneOS.platform/Developer/SDKs/iPhoneOS$${QMAKE_IOS_SDK_VERSION}.sdk) {
+ error("iOS $$QMAKE_IOS_SDK_VERSION SDK not found! Edit mkspecs/common/ios/versions.conf to specify version installed.")
+ }
+
+ # No deployment target specified?
+ isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) {
+ # Use SDK version for iOS versions < preferred
+ lessThan(QMAKE_IOS_SDK_VERSION, $$QMAKE_IPHONEOS_PREFERRED_TARGET) {
+ QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IOS_SDK_VERSION
+ } else: QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IPHONEOS_PREFERRED_TARGET
+ }
+
+ # Make sure iOS SDK version is >= iOS target version
+ !lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, $$QMAKE_IOS_SDK_VERSION) {
+ error("Target iOS version is greater that iOS SDK version $$QMAKE_IOS_SDK_VERSION! Edit mkspecs/common/ios/versions.conf to specify target iOS version.")
+ }
+# Building for iOS simulator
+} else {
+ # No iOS simulator SDK version specified?
+ isEmpty(QMAKE_IOS_SIMULATOR_SDK_VERSION) {
+ # Get version string from installed Xcode
+ !lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
+ QMAKE_IOS_SDK_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -showsdks)
+ } else: QMAKE_IOS_SDK_INFO = $$system(/Developer/usr/bin/xcodebuild -showsdks)
+
+ # Get names of installed device SDKs
+ QMAKE_IOS_SDK_INFO = $$find(QMAKE_IOS_SDK_INFO, ^iphonesimulator)
+ for(v, QMAKE_IOS_SDK_INFO): {
+ # Extract SDK version number from output
+ v = $$replace(v,iphonesimulator,)
+
+ # Use latest SDK version
+ greaterThan(v, $$QMAKE_IOS_SIMULATOR_SDK_VERSION): QMAKE_IOS_SIMULATOR_SDK_VERSION = $$v
+ }
+ QMAKE_IOS_SDK_INFO =
+ }
+
+ # Make sure iOS simulator SDK version is valid
+ !exists($$QMAKE_IOS_PLATFORM_PATH/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$${QMAKE_IOS_SIMULATOR_SDK_VERSION}.sdk) {
+ error("iOS $$QMAKE_IOS_SIMULATOR_SDK_VERSION simulator SDK not found! Edit mkspecs/common/ios/versions.conf to specify version installed.")
+ }
+
+ # No deployment target specified?
+ isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) {
+ # Use SDK version for iOS versions < preferred
+ lessThan(QMAKE_IOS_SIMULATOR_SDK_VERSION, $$QMAKE_IPHONEOS_PREFERRED_TARGET) {
+ QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IOS_SIMULATOR_SDK_VERSION
+ } else: QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IPHONEOS_PREFERRED_TARGET
+ }
+
+ # Make sure iOS simulator SDK version is >= iOS target version
+ !lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, $$QMAKE_IOS_SIMULATOR_SDK_VERSION) {
+ error("Target iOS version is greater that iOS simulator SDK version $$QMAKE_IOS_SIMULATOR_SDK_VERSION! Edit mkspecs/common/ios/versions.conf to specify target iOS version.")
+ }
+}
+
+QMAKE_IPHONEOS_PREFERRED_TARGET =
+QMAKE_IOS_PLATFORM_PATH =
+
+# Set deployment target
+QMAKE_IOS_VERSION_FLAGS = -miphoneos-version-min=$$QMAKE_IPHONEOS_DEPLOYMENT_TARGET
+
+# Set build flags
+QMAKE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS
+QMAKE_CXXFLAGS += $$QMAKE_IOS_VERSION_FLAGS
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS
+QMAKE_LFLAGS += $$QMAKE_IOS_VERSION_FLAGS
+QMAKE_IOS_VERSION_FLAGS =
diff --git a/mkspecs/qpa/common/g++-base-macx-iphone.conf b/mkspecs/qpa/common/g++-base-macx-iphone.conf
deleted file mode 100644
index f595deaa37..0000000000
--- a/mkspecs/qpa/common/g++-base-macx-iphone.conf
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# qmake configuration base for iphone-g++
-#
-include(../../common/mac.conf)
-include(../../common/gcc-base-macx.conf)
-include(../../common/g++-macx.conf)
-
-MAKEFILE_GENERATOR = UNIX
-TEMPLATE = app
-CONFIG += qt warn_on release incremental global_init_link_order lib_version_first plugin_no_soname link_prl
-QT += core gui
-QMAKE_INCREMENTAL_STYLE = sublib
-
-# Build everything as static libs
-CONFIG += static
-CONFIG -= app_bundle
-
-# This is Apple Darwin without the Carbon framework
-DEFINES += DARWIN_NO_CARBON
-
-# Do not compile a few things
-DEFINES += QT_NO_AUDIO_BACKEND
-
-# You may need to change this to point to the iOS SDK you want to use.
-QMAKE_IOS_SDK_VERSION = 5.0
-
-# Set up deployment targets
-QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.0
-QMAKE_MACOSX_DEPLOYMENT_TARGET =
-
-QMAKE_LIBS_OPENGL_ES1 += -framework OpenGLES
-QMAKE_LIBS_OPENGL_ES2 += -framework OpenGLES
-
-# TARGET_PLATFORM = ios
-QMAKE_CFLAGS += -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2
-QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
-QMAKE_OBJECTIVE_CFLAGS += -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2
-QMAKE_LFLAGS += -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework QuartzCore -lz
-
-QMAKE_INCDIR_OPENGL =
-QMAKE_LIBS_OPENGL =
-QMAKE_LIBS_OPENGL_QT =
-
-#QMAKE_RESOURCE =
-QMAKE_FIX_RPATH = $$QMAKE_IOS_DEV_PATH/usr/bin/install_name_tool -id
-QMAKE_AR = $$QMAKE_IOS_DEV_PATH/usr/bin/ar cq
-QMAKE_RANLIB = $$QMAKE_IOS_DEV_PATH/usr/bin/ranlib -s
diff --git a/mkspecs/qpa/common/g++-base-macx-iphonedevice.conf b/mkspecs/qpa/common/g++-base-macx-iphonedevice.conf
deleted file mode 100644
index 49e9d4662e..0000000000
--- a/mkspecs/qpa/common/g++-base-macx-iphonedevice.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# qmake configuration base for iphone-device-g++
-#
-include(g++-base-macx-iphone.conf)
-
-# You may need to change this to point to the iOS SDK you want to use.
-QMAKE_IOS_DEV_PATH = /Developer/Platforms/iPhoneOS.platform/Developer
-QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneOS$${QMAKE_IOS_SDK_VERSION}.sdk
-
-QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
-QMAKE_LIBDIR_OPENGL_ES1 =
-
-QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
-QMAKE_LIBDIR_OPENGL_ES2 =
-
-# TARGET_PLATFORM = ios
-QMAKE_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
-QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++
-QMAKE_LINK = $$QMAKE_CXX
-QMAKE_LINK_SHLIB = $$QMAKE_CXX
-
-QMAKE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
-QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
-QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK
diff --git a/mkspecs/qpa/macx-iphonedevice-g++-armv6/qmake.conf b/mkspecs/qpa/macx-iphonedevice-g++-armv6/qmake.conf
deleted file mode 100644
index 7ffaecaa96..0000000000
--- a/mkspecs/qpa/macx-iphonedevice-g++-armv6/qmake.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# qmake configuration for iphone-device-g++
-#
-include(../common/g++-base-macx-iphonedevice.conf)
-
-QMAKE_CFLAGS += -arch armv6
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_OBJECTIVE_CFLAGS += -arch armv6
-QMAKE_LFLAGS += -arch armv6
-
-load(qt_config)
diff --git a/mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qmake.conf b/mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qmake.conf
deleted file mode 100644
index 25542bc00e..0000000000
--- a/mkspecs/qpa/macx-iphonedevice-g++-armv7-nothumb/qmake.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# qmake configuration for iphone-device-g++
-#
-include(../common/g++-base-macx-iphonedevice.conf)
-
-QMAKE_CFLAGS += -arch armv7 -marm
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_OBJECTIVE_CFLAGS += -arch armv7 -marm
-QMAKE_LFLAGS += -arch armv7 -marm
-
-load(qt_config)
diff --git a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf b/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf
deleted file mode 100644
index 0fca5651df..0000000000
--- a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# qmake configuration for iphone-device-g++
-#
-include(../common/g++-base-macx-iphonedevice.conf)
-
-QMAKE_CFLAGS += -arch armv7
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_OBJECTIVE_CFLAGS += -arch armv7
-QMAKE_LFLAGS += -arch armv7
-
-load(qt_config)
diff --git a/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf b/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf
deleted file mode 100644
index 3b5fe0a146..0000000000
--- a/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# qmake configuration for iphone-simulator-g++
-#
-include(../common/g++-base-macx-iphone.conf)
-
-QMAKE_IOS_DEV_PATH = /Developer/Platforms/iPhoneSimulator.platform/Developer
-QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneSimulator$${QMAKE_IOS_SDK_VERSION}.sdk
-
-QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
-QMAKE_LIBDIR_OPENGL_ES1 =
-
-QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
-QMAKE_LIBDIR_OPENGL_ES2 =
-
-# TARGET_PLATFORM = ios
-QMAKE_CC = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
-QMAKE_CXX = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++
-QMAKE_LINK = $$QMAKE_CXX
-QMAKE_LINK_SHLIB = $$QMAKE_CXX
-
-QMAKE_CFLAGS += -arch i386 -isysroot $$QMAKE_IOS_SDK
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
-QMAKE_OBJECTIVE_CFLAGS += -arch i386 -isysroot $$QMAKE_IOS_SDK -fobjc-abi-version=2 -fobjc-legacy-dispatch
-QMAKE_OBJECTIVE_CFLAGS_X86 += -arch i386 -isysroot $$QMAKE_IOS_SDK -fobjc-abi-version=2 -fobjc-legacy-dispatch
-QMAKE_LFLAGS += -arch i386 -Wl,-syslibroot,$$QMAKE_IOS_SDK
-
-load(qt_config)
diff --git a/mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf b/mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf
new file mode 100644
index 0000000000..ff8e0b6aa9
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-clang
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/clang.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/clang.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.2.x or earlier")
+
+# iOS build tools
+QMAKE_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang
+QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++
+QMAKE_FIX_RPATH = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the clang compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/qpa/macx-iphonedevice-g++/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-clang-legacy/qplatformdefs.h
index dc3779e79a..89621ea21d 100644
--- a/mkspecs/qpa/macx-iphonedevice-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/macx-iosdevice-clang-legacy/qplatformdefs.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
@@ -35,65 +34,9 @@
**
**
**
+**
** $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
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#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 "../../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit"
-
-#endif // QPLATFORMDEFS_H
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf b/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf
new file mode 100644
index 0000000000..777b5ab6e2
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-clang/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-clang
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/clang.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/clang.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
+# iOS build tools
+QMAKE_CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
+QMAKE_CXX = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
+QMAKE_FIX_RPATH = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -id
+QMAKE_AR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar cq
+QMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the clang compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/qpa/macx-iphonesimulator-g++/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-clang/qplatformdefs.h
index dc3779e79a..89621ea21d 100644
--- a/mkspecs/qpa/macx-iphonesimulator-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/macx-iosdevice-clang/qplatformdefs.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
@@ -35,65 +34,9 @@
**
**
**
+**
** $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
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#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 "../../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit"
-
-#endif // QPLATFORMDEFS_H
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf b/mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf
new file mode 100644
index 0000000000..5fcfb4a51d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-g++
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/g++-macx.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/g++.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check (g++ was discontinued at version 4.2, but user may have added it themselves)
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.2.x or earlier")
+
+# iOS build tools
+QMAKE_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
+QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
+QMAKE_FIX_RPATH = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the g++ 4.2 compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/qpa/macx-iphonedevice-g++-armv6/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-g++-legacy/qplatformdefs.h
index d8777e7752..89621ea21d 100644
--- a/mkspecs/qpa/macx-iphonedevice-g++-armv6/qplatformdefs.h
+++ b/mkspecs/unsupported/macx-iosdevice-g++-legacy/qplatformdefs.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
@@ -35,65 +34,9 @@
**
**
**
+**
** $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
-
-#include <unistd.h>
-
-
-// We are hot - unistd.h should have turned on the specific APIs we requested
-
-
-#include <pthread.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <signal.h>
-#define QT_NO_LIBRARY_UNLOAD
-
-#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 "../../common/posix/qplatformdefs.h"
-
-#undef QT_OPEN_LARGEFILE
-#undef QT_SOCKLEN_T
-#undef QT_SIGNAL_IGNORE
-
-#define QT_OPEN_LARGEFILE 0
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
-#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
-
-#define QT_SIGNAL_IGNORE (void (*)(int))1
-
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
-
-#define QT_QPA_DEFAULT_PLATFORM_NAME "uikit"
-
-#endif // QPLATFORMDEFS_H
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iosdevice-g++/qmake.conf b/mkspecs/unsupported/macx-iosdevice-g++/qmake.conf
new file mode 100644
index 0000000000..2a29335334
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-g++/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-g++
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/g++-macx.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/g++.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check (g++ was discontinued at version 4.2, but user may have added it themselves)
+lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
+# iOS build tools
+QMAKE_CC = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
+QMAKE_CXX = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2
+QMAKE_FIX_RPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the g++ 4.2 compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/unsupported/macx-iosdevice-g++/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-g++/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf b/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf
new file mode 100644
index 0000000000..4554843610
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-llvm
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/llvm.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/llvm.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.2.x or earlier")
+
+# iOS build tools
+QMAKE_CC = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2
+QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2
+QMAKE_FIX_RPATH = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the llvm-g++ 4.2 compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-llvm-legacy/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf b/mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf
new file mode 100644
index 0000000000..335c68fd42
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf
@@ -0,0 +1,35 @@
+#
+# qmake configuration for ios-device-llvm
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/llvm.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/llvm.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
+# iOS build tools
+QMAKE_CC = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2
+QMAKE_CXX = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2
+QMAKE_FIX_RPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the llvm-g++ 4.2 compiler")
+
+load(qt_config)
+
+# Include after config is loaded to allow autodetection on GL/ES version
+include(../../common/ios/arch.conf)
diff --git a/mkspecs/unsupported/macx-iosdevice-llvm/qplatformdefs.h b/mkspecs/unsupported/macx-iosdevice-llvm/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iosdevice-llvm/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-clang-legacy/qmake.conf b/mkspecs/unsupported/macx-iossimulator-clang-legacy/qmake.conf
new file mode 100644
index 0000000000..b042766a39
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-clang-legacy/qmake.conf
@@ -0,0 +1,6 @@
+#
+# qmake configuration for ios-simulator-clang
+#
+
+# All differences between device and simulator are handled in iOS include files
+include(../macx-iosdevice-clang-legacy/qmake.conf)
diff --git a/mkspecs/unsupported/macx-iossimulator-clang-legacy/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-clang-legacy/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-clang-legacy/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-clang/qmake.conf b/mkspecs/unsupported/macx-iossimulator-clang/qmake.conf
new file mode 100644
index 0000000000..11301cb72f
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-clang/qmake.conf
@@ -0,0 +1,6 @@
+#
+# qmake configuration for ios-simulator-clang
+#
+
+# All differences between device and simulator are handled in iOS include files
+include(../macx-iosdevice-clang/qmake.conf)
diff --git a/mkspecs/unsupported/macx-iossimulator-clang/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-clang/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-clang/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf b/mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf
new file mode 100644
index 0000000000..abc695231e
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf
@@ -0,0 +1,33 @@
+#
+# qmake configuration for ios-simulator-g++
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/g++-macx.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/arch.conf)
+include(../../common/ios/g++.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check (g++ was discontinued at version 4.2)
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2"): error("This mkspec requires Xcode 4.1.x or earlier")
+
+# iOS build tools
+QMAKE_CC = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
+QMAKE_CXX = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
+QMAKE_FIX_RPATH = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the g++ 4.2 compiler")
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-iossimulator-g++-legacy/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-g++-legacy/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-g++-legacy/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-g++/qmake.conf b/mkspecs/unsupported/macx-iossimulator-g++/qmake.conf
new file mode 100644
index 0000000000..99848be410
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-g++/qmake.conf
@@ -0,0 +1,33 @@
+#
+# qmake configuration for ios-simulator-g++
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/g++-macx.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/arch.conf)
+include(../../common/ios/g++.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check (g++ was discontinued at version 4.2, but user may have added it themselves)
+lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
+# iOS build tools
+QMAKE_CC = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
+QMAKE_CXX = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
+QMAKE_FIX_RPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the g++ 4.2 compiler")
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-iossimulator-g++/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-g++/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf b/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf
new file mode 100644
index 0000000000..95d530cc18
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf
@@ -0,0 +1,33 @@
+#
+# qmake configuration for ios-simulator-llvm
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/llvm.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/arch.conf)
+include(../../common/ios/llvm.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.2.x or earlier")
+
+# iOS build tools
+QMAKE_CC = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2
+QMAKE_CXX = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2
+QMAKE_FIX_RPATH = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the llvm-g++ 4.2 compiler")
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-llvm-legacy/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"
diff --git a/mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf b/mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf
new file mode 100644
index 0000000000..7e3d4b5710
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf
@@ -0,0 +1,33 @@
+#
+# qmake configuration for ios-simulator-llvm
+#
+# Depends on:
+#
+# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
+#
+
+include(../../common/mac.conf)
+include(../../common/gcc-base-ios.conf)
+include(../../common/llvm.conf)
+include(../../common/ios.conf)
+include(../../common/ios/versions.conf)
+include(../../common/ios/arch.conf)
+include(../../common/ios/llvm.conf)
+include(../../common/ios/qmake.conf)
+
+# Version check
+lessThan(QMAKE_IOS_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
+
+# iOS build tools
+QMAKE_CC = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2
+QMAKE_CXX = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2
+QMAKE_FIX_RPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/install_name_tool -id
+QMAKE_AR = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar cq
+QMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib -s
+QMAKE_LINK = $$QMAKE_CXX
+QMAKE_LINK_SHLIB = $$QMAKE_CXX
+
+# Check that compiler is valid
+!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the llvm-g++ 4.2 compiler")
+
+load(qt_config)
diff --git a/mkspecs/unsupported/macx-iossimulator-llvm/qplatformdefs.h b/mkspecs/unsupported/macx-iossimulator-llvm/qplatformdefs.h
new file mode 100644
index 0000000000..89621ea21d
--- /dev/null
+++ b/mkspecs/unsupported/macx-iossimulator-llvm/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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.1, 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../../common/ios/qplatformdefs.h"