Created
December 12, 2012 22:32
-
-
Save deltheil/4272266 to your computer and use it in GitHub Desktop.
Android NDK: build c-ares w/ the Standalone Toolchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NDK=/tmp/android-ndk-r8b | |
# Create the standalone toolchain | |
$NDK/build/tools/make-standalone-toolchain.sh \ | |
--platform=android-9 \ | |
--install-dir=/tmp/my-android-toolchain | |
export PATH=/tmp/my-android-toolchain/bin:$PATH | |
export SYSROOT=/tmp/my-android-toolchain/sysroot | |
export CC="arm-linux-androideabi-gcc --sysroot $SYSROOT" | |
# Download the latest release | |
curl -O http://c-ares.haxx.se/download/c-ares-1.9.1.tar.gz | |
tar xvfz c-ares-1.9.1.tar.gz | |
# Configure | |
cd c-ares-1.9.1 && mkdir build | |
./configure --prefix=$(pwd)/build \ | |
--host=arm-linux-androideabi \ | |
--disable-shared \ | |
CFLAGS="-march=armv7-a" | |
# Build and install | |
make && make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment