1 # How to build from source?
\r
3 Both development environment and GCS are supported on Windows, Linux and Mac OS X.
\r
5 # Install prerequisites
\r
7 The first step is to Install all OS specific prerequisites.
\r
11 Install XCode and its relatated command line tools (follow Apple documentation). Install git, curl and p7zip.
\r
13 You can use brew with `brew install git curl p7zip` or macport with `sudo port install git curl p7zip`.
\r
18 sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev
\r
23 ### Install [Msys2](https://msys2.github.io/)
\r
25 Follow the instructions on the web site. You can either install the i686 (Win32) or x86_64 (Win64) version.
\r
26 It is recommended to go for the Win64 Shell if possible.
\r
27 The x86_64 version has both Win32 and Win64 shells and it is possible to build both i686 and x86_64 applications.
\r
29 ### Add the LibrePilot MinGW package repository
\r
31 Add the following lines at the end of your /etc/pacman.conf file:
\r
34 SigLevel = Optional TrustAll
\r
35 Server = http://download.librepilot.org/repo/mingw
\r
37 ### Install required packages
\r
39 #### For i686 applications
\r
41 Start a MinGW-w64 Win64 Shell or a MinGW-w64 Win32 Shell.
\r
44 pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-ccache mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl mingw-w64-i686-gdal-minimal mingw-w64-i686-OpenSceneGraph mingw-w64-i686-osgearth
\r
46 Optionally install debug packages:
\r
48 pacman -S --needed mingw-w64-i686-OpenSceneGraph-debug mingw-w64-i686-osgearth-debug
\r
50 #### For x86_64 applications
\r
52 Start a MinGW-w64 Win64 Shell.
\r
55 pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-ccache mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl mingw-w64-x86_64-gdal-minimal mingw-w64-x86_64-OpenSceneGraph mingw-w64-x86_64-osgearth
\r
57 Optionally install debug packages:
\r
59 pacman -S --needed mingw-w64-x86_64-OpenSceneGraph-debug mingw-w64-x86_64-osgearth-debug
\r
61 **NOTE** On Windows you need to run the mingw version of make, which is `mingw32-make`
\r
64 # Setup the build environment and build
\r
66 The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc, etc.) in a local folder `/path/to/LibrePilot_root/tools`
\r
68 ## Ubuntu / Mac OS X
\r
70 make all_sdk_install
\r
75 mingw32-make all_sdk_install
\r
76 mingw32-make package
\r
78 The `package` target will build the complete installable package for the current platform.
\r
80 You can build the `all` target to just build the software.
\r
82 Run `make` with no arguments to show the complete list of supported targets.
\r