1
<chapter id="adv-build-management">
2
<title>Advanced Build Management</title>
3
<indexterm zone="adv-build-management"><primary>&automake;</primary></indexterm>
5
<sect1 id="buildconfigurations">
6
<title>Multiple Build Configurations</title>
7
<indexterm zone="buildconfigurations"><primary>build configurations</primary><secondary>multiple</secondary></indexterm>
10
(... to be written ...)
13
</sect1> <!-- buildconfigurations -->
15
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
17
<sect1 id="crosscompiling">
18
<title>Cross-Compiling</title>
19
<indexterm zone="crosscompiling"><primary>cross compiling</primary></indexterm>
20
<indexterm zone="crosscompiling"><primary>compiling</primary><secondary>cross</secondary></indexterm>
21
<indexterm zone="crosscompiling"><primary><option>--host</option></primary></indexterm>
24
When you have suitable cross compilers available, you can cross compile your
25
programs for processors and operating systems different from the system where
26
&kdevelop; and the compiler is running. The &GNU; compiler collection &gcc; can
27
be configured and compiled as a cross compiler if you compile it yourself.
28
Consult the <ulink url="info://gcc/Cross-Compiler">GCC info pages</ulink> for
29
more information. Some &Linux; distributions also provide binary packages.
33
An <application>automake</application> based package can easily be
34
cross-compiled by specifying the <option>--host</option> option to the
35
configure script and setting the <envar>CC</envar> and <envar>CXX</envar>
36
environment variables to the respective cross compiler binaries. Often you
37
want to switch between a the cross-compiled version of your application and
38
one compiled for your development system. For this, it is advantageous to
39
use &kdevelop; capability of creating multiple build configurations, as
40
explained in <xref linkend="buildconfigurations"/>. Once you have created a
41
new build configuration for cross-compiling in the
42
<menuchoice><guimenu>Project</guimenu><guimenuitem>Project
43
Options...</guimenuitem></menuchoice> dialog, add the option
46
<screen><option>--host=</option><replaceable>platform</replaceable></screen>
49
to the configure options. The <replaceable>platform</replaceable> name
50
is a tuple of the form
53
<programlisting>cpu-vendor-os</programlisting>
55
<programlisting>cpu-vendor-kernel-os</programlisting>
58
For many combinations, you can use a short form, for instance
59
<wordasword>i386-linux</wordasword> or <wordasword>arm-elf</wordasword>.
62
</sect1> <!-- crosscompiling -->
64
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
66
<sect1 id="qtembedded">
67
<title>Qt/Embedded</title>
68
<indexterm zone="qtembedded"><primary>embedded</primary><secondary>Qt</secondary></indexterm>
69
<indexterm zone="qtembedded"><primary>Qt/Embedded</primary></indexterm>
70
<indexterm zone="qtembedded"><primary>Qtopia</primary></indexterm>
71
<indexterm zone="qtembedded"><primary>framebuffer</primary></indexterm>
74
&qte; is a version of the &Qt; library that does not use the X window
75
system, but draws directly to the framebuffer on &Linux; systems. It is
76
therefore interesting for embedded systems which have tight restrictions
77
on the memory usage of the whole system. Its &API; is fully compatible with
78
the one of the X11 version.
82
Developing an application for &qte; with &kdevelop; is not very different
83
from developing a program for the X11 version of &Qt;. In fact, you can use the
84
same codebase for both versions. If you use the autoproject project
85
management, you switch to the embedded version by passing the argument
86
<option>--enable-embedded</option> to the configure script. You can set
87
this in the <menuchoice><guimenu>Project</guimenu>
88
<guimenuitem>Project Options...</guimenuitem></menuchoice> dialog under
89
<guilabel>Configure Options</guilabel>. With the option
90
<option>--with-qt-dir=DIR</option> you set the directory in which &qte;
95
After configuring and compiling your application with these options, it will
96
link with the <filename>libqpe.so</filename> library. This version of your
97
application will not normally run when you use X11. In order to test it,
98
run it under the control of the program <application>qvfb</application>
99
(&Qt; Virtual Frame Buffer). This is done by starting
100
<application>qvfb</application> and then starting your application with
103
<screen><command>app <option>-qws</option> <option>-display QVFb:0</option></command></screen>
106
Naturally, when you have a working version of your application, you
107
will want to use it on the target processor. For this, it will probably
108
be convenient to create multiple build configurations, as explained above,
109
so that you can quickly switch between the version running on your development
110
system and the version running on the target system.
114
Applications for &qte; normally run as single applications on the
115
device they are designed for. Trolltech also supports Qtopia, which is a
116
collection of applications for PIM, web browsing and various other areas that
117
work together in a consistent manner. It is the standard environment for
118
instance on the Sharp Zaurus. You can write applications that integrate into
119
this environment by using the Qtopia SDK. This implies making your application
120
class a subclass of <classname>QPEApplication</classname> and linking to the
121
library <filename>libqpe.so</filename>. If you develop your application with
122
the autoproject project management, you have to add
123
<option>--enable-qtopia</option> to the configure options.
126
</sect1> <!-- qtembedded -->
128
</chapter> <!-- adv-build-management -->