Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference

Specification Files

Makefiles and Cross-compiling

Cross-compiling is the process of executing a compile on one machine and producing object/executable code for a different machine or device. To build the Qtopia source code a compiler requires a makefile. This makefile defines the source files to be compiled and the compile options required. Makefiles are not platform-independent and require configuration depending on the operating system and/or micro-processor architecture. Manually writing makefiles is arduous and Trolltech provides tools and configuration files to assist the process.

To port Qt or Qtopia to a new platform the first step is to create a new set of specification files. In most cases a simple modification of one or two of the compiler options is all that it takes to enable Qtopia on a new device. The procedure is discussed in detail below .

Creating Custom Spec Files

Building a complete Qtopia system requires three separate configuration systems as follows:

Prior to building Qtopia the configuration files must be setup.

The following is an example to create a "myarm" configuration:

cp -r $TMAKEDIR/lib/qws/linux-arm-g++ $TMAKEDIR/lib/qws/linux-myarm-g++
cp -r $QPEDIR/mkspecs/qws/linux-arm-g++ $QPEDIR/mkspecs/qws/linux-myarm-g++

Qt/Embedded

The $QTEDIR/configs directory contains files that Qt generates at configure time. You are free to modify the files here but you should instead modify files in TMAKEDIR since any changes to those files cause the related configs files to be re-created.

tmake

Open $TMAKEDIR/lib/qws/linux-myarm-g++/tmake.conf and ensure that the utilities and flags are suitable for the system. For example:

qmake

Open $QPEDIR/mkspecs/qws/linux-myarm-g++/qmake.conf and ensure that the utilities and flags are suitable for the system. For example:

Note: The qmake.conf file must have the following code at the bottom of the file:

exists($$(QPEDIR)/src/config.pri):include($$(QPEDIR)/src/config.pri)


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.2.0