libuv/android-configure
guworks d57c7e685f build: proper support for android cross compilation
The build script needs to properly specify the target as android
so the gyp build scripts can properly leverage cross compilation
using the android NDK.

PR-URL: https://github.com/libuv/libuv/pull/433
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-15 10:16:22 +02:00

21 lines
539 B
Bash
Executable File

#!/bin/bash
export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=arm-linux-androideabi-4.8 \
--arch=arm \
--install-dir=$TOOLCHAIN \
--platform=android-21
export PATH=$TOOLCHAIN/bin:$PATH
export AR=arm-linux-androideabi-ar
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LINK=arm-linux-androideabi-g++
export PLATFORM=android
if [ $2 -a $2 == 'gyp' ]
then
./gyp_uv.py -Dtarget_arch=arm -DOS=android -f make-android
fi