device: Add device support for the Broadcom 97425 platform
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Wed, 7 Mar 2012 13:42:32 +0000 (14:42 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Apr 2012 09:44:14 +0000 (11:44 +0200)
Add mkspec for the Broadcom 97425 platform using the new device.pri
support. This allows to build Qt with the application libraries provided
by Broadcom.

Change-Id: Icad442be5da071e4f936e41236d4136234c5d16f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf [new file with mode: 0644]
mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h [new file with mode: 0644]

diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf
new file mode 100644 (file)
index 0000000..866fad6
--- /dev/null
@@ -0,0 +1,65 @@
+#
+# qmake configuration for linux-mipsel-broadcom-97425-g++
+#
+
+MAKEFILE_GENERATOR      = UNIX
+TARGET_PLATFORM         = unix
+TEMPLATE                = app
+CONFIG                  += qt warn_on release incremental link_prl gdb_dwarf_index
+QT                      += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/g++-unix.conf)
+
+load(device_config)
+
+# Modify the defaults we loaded above
+CROSS_COMPILE           = mipsel-linux-
+QMAKE_CC                = $${CROSS_COMPILE}gcc
+QMAKE_CXX               = $${CROSS_COMPILE}g++
+QMAKE_LINK              = $${QMAKE_CXX}
+QMAKE_LINK_SHLIB        = $${QMAKE_CXX}
+
+QMAKE_AR                = $${CROSS_COMPILE}ar cqs
+QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
+QMAKE_STRIP             = $${CROSS_COMPILE}strip
+
+QMAKE_CFLAGS_RELEASE    += -O2
+QMAKE_CXXFLAGS_RELEASE  += $$QMAKE_CFLAGS_RELEASE
+
+#TODO: Clean Qt to work with uclibc not calling itself GLIBC.
+#QMAKE_CFLAGS           += -D__FORCE_NOGLIBC
+#QMAKE_CXXFLAGS         += -D__FORCE_NOGLIBC
+
+
+BRCM_PLATFORM           = 97425
+
+# Sanity checks
+deviceSanityCheckCompiler()
+isEmpty(B_REFSW_DEBUG):error("B_REFSW_DEBUG needs to be set via -device-option B_REFSW_DEBUG=(y|n).")
+isEmpty(BRCM_ROCKFORD_PATH):error("BRCM_ROCKFORD_PATH needs to be set via -device-option BRCM_ROCKFORD_PATH=path.")
+isEmpty(BRCM_APPLIBS_PATH):error("BRCM_APPLIBS_PATH needs to be set via -device-option BRCM_APPLIBS_PATH=path.")
+
+# Figure the kind of directfb build used.
+BRCM_BUILD_TYPE         = debug
+contains(B_REFSW_DEBUG, [Nn]) {
+    BRCM_BUILD_TYPE     = release
+}
+
+QMAKE_INCDIR_OPENGL_ES2 = $${BRCM_ROCKFORD_PATH}/middleware/v3d/interface/khronos/include
+QMAKE_LIBDIR_OPENGL_ES2 = $${BRCM_ROCKFORD_PATH}/middleware/v3d/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE}
+QMAKE_LIBS_OPENGL_ES2   = -lv3ddriver -lrt
+
+INCLUDEPATH             += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
+QMAKE_LIBDIR            += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
+
+# DirectFB, needs to be changed once -directfb is added to configure
+DIRECTFB_INCLUDEPATH    = $${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/include/directfb $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb
+DIRECTFB_LIBS           = -L$${BRCM_APPLIBS_PATH}/opensource/directfb/bin/DirectFB-1.4.15_multi_$${BRCM_BUILD_TYPE}_build.97425B1/usr/local/lib -L$${BRCM_ROCKFORD_PATH}/middleware/platform/directfb/lib_$${BRCM_PLATFORM}_$${BRCM_BUILD_TYPE} -ldirectfb -lfusion -ldirect -lpthread -lnexus -ldbpl -lz
+
+
+QMAKE_LFLAGS            += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2  -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3
+
+load(qt_config)
diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qplatformdefs.h
new file mode 100644 (file)
index 0000000..9e6b0f5
--- /dev/null
@@ -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 "../../linux-g++/qplatformdefs.h"