Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
brew install android-ndk
export NDK_VERSION='r13'
export NDK=/usr/local/Cellar/android-ndk
export GCC_VERSION='4.9'
export ANDROID_VERSION='21' # android 5.0
export ARCH='arm'
export PATH=$PATH:$NDK/$NDK_VERSION/toolchains/$ARCH-linux-androideabi-$GCC_VERSION/prebuilt/darwin-x86_64/bin
export SYSROOT=$NDK/$NDK_VERSION/platforms/android-$ANDROID_VERSION/arch-$ARCH/
export CFLAGS="--sysroot=$SYSROOT"
export CPPFLAGS="-I$SYSROOT/usr/include $CFLAGS"
export LDFLAGS="-L$SYSROOT/usr/lib $CFLAGS"
export CPP=arm-linux-androideabi-cpp
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
export AS=arm-linux-androideabi-as
export AR=arm-linux-androideabi-ar
export RANLIB=arm-linux-androideabi-ranlib
echo "SYSROOT is $SYSROOT"
echo "CC is $CC"
echo "PATH is $PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.