1 \chapter{Compiling XCSoar
}\label{cha:compiling
}
3 The
\texttt{make
} command is used to launch the XCSoar build process.
4 You can learn more about the build system internals in chapter
7 Most of this chapter describes how to build XCSoar on Linux, with
8 examples for Debian/Ubuntu. A cross-compiler is used to build
9 binaries for other operating systems (for example Android and
12 \section{Getting the Source Code
}
14 The XCSoar source code is managed with
15 \href{http://git-scm.com/
}{git
}. It can be downloaded with the
19 git clone git://git.xcsoar.org/xcsoar/master/xcsoar.git
22 To update your repository, type:
28 For more information, please read to the git documentation.
30 \section{Requirements
}
32 The following is needed for all targets:
36 \item GNU compiler collection (
\texttt{gcc
}), version
4.6.2 or later
37 or clang/LLVM
3.1 (with "make CLANG=y")
39 \item \href{http://librsvg.sourceforge.net/)
}{rsvg
}
40 \item \href{http://www.imagemagick.org/
}{ImageMagick
6.4}
41 \item \href{http://xmlsoft.org/XSLT/xsltproc2.html
}{xsltproc
}
42 \item Perl and XML::Parser
45 The following command installs these on Debian:
48 apt-get install make \
49 librsvg2-bin xsltproc \
53 \section{Target-specific Build Instructions
}
55 \subsection{Compiling for Linux/UNIX
}
57 The following additional packages are needed to build for Linux and
58 similar operating systems:
61 \item \href{http://www.boost.org/
}{Boost
}
62 \item \href{http://www.zlib.net/
}{zlib
}
63 \item \href{http://curl.haxx.se/
}{CURL
}
64 \item \href{http://www.libsdl.org/
}{SDL
}
65 \item \href{http://www.libsdl.org/projects/SDL
\_ttf/
}{SDL
\_ttf}
66 \item \href{http://www.libpng.org/
}{libpng
}
67 \item \href{http://libjpeg.sourceforge.net/
}{libjpeg
}
69 \item to run XCSoar, you need one of the following fonts (Debian
70 package): DejaVu (
\texttt{ttf-dejavu
}), Droid (
\texttt{ttf-droid
}),
71 Freefont (
\texttt{ttf-freefont
})
74 The following command installs these on Debian:
77 apt-get install make g++ \
78 libboost-dev zlib1g-dev \
79 libsdl1.2-dev libsdl-ttf2.0-dev \
80 libpng-dev libjpeg-dev \
81 libcurl4-openssl-dev \
83 librsvg2-bin xsltproc \
94 You may specify one of the following targets with
\texttt{TARGET=x
}:
96 \begin{tabular
}{lp
{8cm
}}
98 \texttt{UNIX
} & regular build (the default setting) \\
100 \texttt{UNIX32
} & generate
32 bit binary \\
102 \texttt{UNIX64
} & generate
64 bit binary \\
104 \texttt{OPT
} & alias for UNIX with optimisation and no debugging \\
108 \subsection{Compiling for Android
}
110 For Android, you need:
113 \item \href{http://developer.android.com/sdk/
}{Android SDK level
16}
114 \item \href{http://developer.android.com/sdk/ndk/
}{Android NDK r8e
}
115 \item \href{http://www.vorbis.com/
}{Ogg Vorbis
}
116 \item \href{http://ant.apache.org/
}{Apache Ant
}
125 Use one of the following targets:
127 \begin{tabular
}{lp
{8cm
}}
129 \texttt{ANDROID
} & for ARMv6 CPUs \\
131 \texttt{ANDROID7
} & for ARMv7 CPUs \\
133 \texttt{ANDROID7NEON
} & with
134 \href{http://www.arm.com/products/processors/technologies/neon.php
}{NEON
}
137 \texttt{ANDROID86
} & for x86 CPUs \\
139 \texttt{ANDROIDMIPS
} & for MIPS CPUs \\
141 \texttt{ANDROIDFAT
} & "fat" package for all supported CPUs \\
145 \subsubsection{Enabling IOIO Support
}
147 IOIO support must be enabled explicitly, because it depends on
148 IOIOLib. First get the IOIOLib source code:
151 git clone git://github.com/ytai/ioio.git
154 Now add the parameter
\verb|IOIOLIB_DIR| pointing to this repository:
157 make TARGET=ANDROID clean
158 make TARGET=ANDROID \
159 IOIOLIB_DIR=/usr/src/git/ioio/software/IOIOLib
162 The first command may be necessary if the output directory already
163 contains binaries without IOIO support.
165 \subsection{Compiling for Windows
}
167 To cross-compile to (desktop) Windows, you need the mingw-w64 version
170 http://mingw-w64.sourceforge.net/
172 To compile, run one of the following:
178 Use one of the following targets:
180 \begin{tabular
}{lp
{8cm
}}
182 \texttt{PC
} &
32 bit Windows (i686) \\
184 \texttt{WIN64
} & Windows x64 (amd64 / x86-
64) \\
186 \texttt{WINE
} & WineLib (experimental) \\
188 \texttt{CYGWIN
} & Windows build with Cygwin (experimental) \\
192 \subsection{Compiling for Windows CE
}
194 For PocketPC / Windows CE / Windows Mobile, you need mingw32ce:
197 \item \href{http://max.kellermann.name/projects/cegcc/
}{mingw32ce
}
206 Use one of the following targets:
208 \begin{tabular
}{lp
{8cm
}}
210 \texttt{PPC2000
} & PocketPC
2000 / Windows CE
3.0 \\
212 \texttt{PPC2003
} & PocketPC
2003 / Windows CE
4.0 \\
214 \texttt{PPC2003X
} & for XScale CPUs \\
216 \texttt{WM5
} & Windows Mobile / Windows CE
5.0 \\
218 \texttt{WM5X
} & for XScale CPUs \\
220 \texttt{ALTAIR
} & for Triadis Altair \\
224 \subsection{Compiling for Mac OS X
}
226 For Mac OS X, you need:
229 \item GCC
4.6.2 or newer (http://hpc.sourceforge.net/, or homebrew, or Macports)
230 \item \href{http://www.boost.org/
}{Boost
}
231 \item \href{http://www.zlib.net/
}{zlib
}
232 \item \href{http://curl.haxx.se/
}{CURL
}
233 \item \href{http://www.libsdl.org/
}{SDL
}
234 \item \href{http://www.libsdl.org/projects/SDL
\_ttf/
}{SDL
\_ttf}
235 \item \href{http://www.libpng.org/
}{libpng
}
236 \item \href{http://libjpeg.sourceforge.net/
}{libjpeg
}
237 \item \href{http://icns.sourceforge.net/
}{libicns
}
240 \subsection{Compiling for the Raspberry Pi
}
248 \subsection{Compiling for Kobo E-book Readers
}