Last active
March 24, 2023 18:08
-
-
Save manojrege/82a2bff90602922c9cb042abd5a5af2a to your computer and use it in GitHub Desktop.
Setup build environment for cross-compiling IPerf for Android
This file contains hidden or 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
| #!/bin/sh | |
| # Host system | |
| export HOST_SYS=x86_64-linux-gnu | |
| # This is a symlink pointing to the real Android NDK r10e | |
| export NDK=/home/ubuntu/android-ndk | |
| # Use clang for the build | |
| export GCC_VER=clang | |
| # Android target arch | |
| export ANDROID_ARCH=arm | |
| # Android target API | |
| export ANDROID_API=21 | |
| # cross-compile toolchain | |
| export TOOLCHAIN=arm-linux-androideabi | |
| # Target directory where the binaries and libraries/headers would be placed after the build | |
| export TARGET_DIR=/home/ubuntu/android-iperf | |
| # standalone NDK toolchain | |
| export NDK_TOOLCHAIN=${NDK}/android-ndk-toolchain | |
| # Set Android Sysroot according to API and arch | |
| export SYSROOT=${NDK_TOOLCHAIN}/sysroot | |
| # Android target name | |
| export ANDROID_TARGET=armv5te-none-linux-androideabi | |
| # Binutils path | |
| export CROSS_PREFIX=${NDK_TOOLCHAIN}/bin/${TOOLCHAIN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment