From d8312f930befa013a74010a3f30f69fdb1a01417 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 31 May 2019 13:19:26 +0200 Subject: [PATCH] Update README.android. Emphasize getting a recent version of the NDK, and also set the CXX variable to ensure the C++ examples are compiled properly for Android. Also ensure that README.android is a valid Markdown/CommonMark file. --- README.android | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.android b/README.android index 42b21368..20cd69a0 100644 --- a/README.android +++ b/README.android @@ -1,13 +1,15 @@ -Quick how-to cross compile MeshLink for android (done from $HOME/android/): +# Quick how-to cross compile MeshLink for Android -- Download android NDK and setup local ARM toolchain: -wget http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2 -tar xfj android-ndk-r8b-linux-x86.tar.bz2 -./android-ndk-r8b/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain +- Download the *latest* Android NDK for your OS from https://developer.android.com/ndk/downloads +- Unzip the NDK in a suitable location, for example `/usr/local` +- Create a standalone toolchain using the NDK, like so: + + /usr/local/android-ndk-rXXX/build/toold/make-standalone-toolchain.sh --install-dir=/tmp/my-android-toolchain - Clone and cross-compile MeshLink: -git clone git://meshlink.io/meshlink -cd meshlink -autoreconf -fsi -CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc ./configure --host=arm-linux -make -j5 + + git clone git://meshlink.io/meshlink + cd meshlink + autoreconf -fsi + CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc CXX=/tmp/my-android-toolchain/bin/arm-linux-androideabi-g++ ./configure --host=arm-linux-androideabi + make -j$(nproc) -- 2.39.5