3 | | == Building GDAL using Android NDK == |
4 | | |
5 | | This procedure was developed on a Linux system using Android NDK r5b. |
6 | | |
7 | | First, a standalone toolchain is created to make the configure script easier to use. (See android-ndk-r5b/docs/STANDALONE-TOOLCHAIN.html for more details) |
8 | | |
9 | | {{{ |
10 | | ~$ android-ndk-r5b/build/tools/make-standalone-toolchain.sh --platform=android-8 --install-dir=android-8-toolchain |
11 | | }}} |
12 | | |
13 | | Next, the toolchain's bin directory is added to the PATH. |
14 | | |
15 | | {{{ |
16 | | ~$ export PATH=$PATH:~/android-8-toolchain/bin/ |
17 | | }}} |
18 | | |
19 | | From the GDAL source directory, configure for cross compiling and make. |
20 | | |
21 | | {{{ |
22 | | gdal$ CC="arm-linux-androideabi-gcc" CXX="arm-linux-androideabi-g++" \ |
23 | | CFLAGS="-mthumb" CXXFLAGS="-mthumb" LIBS="-lsupc++ -lstdc++" ./configure --host=arm-linux-eabi --without-grib |
24 | | gdal$ make |
25 | | }}} |
26 | | |
27 | | == Next steps == |
28 | | |
29 | | * check if resulting libs are usable. |
30 | | * build and adapt the Java swig bindings to expose GDAL to the Java portion of an Android application. |
| 3 | Instructions for building can be found at http://trac.osgeo.org/gdal/wiki/BuildingForAndroid |