Hash :
5d195ae9
Author :
Thomas de Grivel
Date :
2025-10-02T18:59:57
add support for cross compilation
#!/bin/sh
set -e
NDK_VERSION=${NDK_VERSION:-28.2.13676358}
API_LEVEL=${API_LEVEL:-21}
ARCH=${ARCH:-aarch64}
NDK_ROOT="${HOME}/Android/Sdk/ndk/${NDK_VERSION}"
TOOLCHAIN="${NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64"
export target="${ARCH}-linux-android${API_LEVEL}"
export host="${ARCH}-linux-android${API_LEVEL}"
export CC="${TOOLCHAIN}/bin/${ARCH}-linux-android${API_LEVEL}-clang"
export AR="${TOOLCHAIN}/bin/llvm-ar"
export RANLIB="${TOOLCHAIN}/bin/llvm-ranlib"
export CPPFLAGS="-I${PWD}/android/egl/demo/app/src/main/jni/obj/libffi/install/include -I${PWD}/android/egl/demo/app/src/main/jni/libevent/include -I${PWD}/android/egl/demo/app/src/main/jni/obj/libevent/include -I${PWD}/android/egl/demo/app/src/main/jni/obj/libressl/install/include"
export HAVE_XCB=false
export HAVE_EGL=true
export HAVE_ANDROID=true
export HAVE_LIBTLS=true
./configure "$@"