In order to build OpenGCD for Android, you need to follow these basic steps:
* Download the OpenGCD source code
* Install the SDK and NDK for Android
* Install Eclipse
* Install the ADT Plugin for Eclipse
* Install the Android platform components
* Create a Android Virtual Device (AVD)
* Build OpenGCD
The detailed instructions are below.
Checkout a working copy of the source code with this command:
svn checkout svn://svn.code.sf.net/p/opengcd/code/trunk opengcd
Download and install the Android SDK from here:
http://developer.android.com/sdk/index.html
In order to build native C/C++ libraries to run on Android, you will need the NDK. Download and install it from here:
http://developer.android.com/tools/sdk/ndk/index.html
OpenGCD requires clang, so for this we are going to build a custom version of clang that targets the ARM/Android platform. Run this command to download and build clang:
make clang
This will work on Linux, but fail to build on Mac OS X due to bug 13478. Even though it fails to complete the build, it will build the 'clang' binary which is all you really need to build OpenGCD.
After building clang, copy it into the Android toolchain directory.
# Modify this to point at wherever you downloaded the NDK TOOLCHAIN=$HOME/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86 cp Debug+Asserts/bin/clang $TOOLCHAIN/bin cp -r Debug+Asserts/lib/clang $TOOLCHAIN/lib ln -sf clang $TOOLCHAIN/bin/arm-linux-androideabi-gcc ln -sf clang $TOOLCHAIN/bin/arm-linux-androideabi-g++
Install Eclipse and the ADT plugin for Eclipse.
Instructions:
http://developer.android.com/sdk/installing/installing-adt.html
Start the Eclipse IDE
Now you can build OpenGCD and run the unit tests on the Android emulator.
svn co svn://svn.code.sf.net/p/opengcd/code/trunk opengcd
cd opengcd
NDK := /home/johnsmith/android-ndk-r8
make
Window -> AVD Manager -> Start
make check