2014-11-03 02:33:23 +01:00
|
|
|
#!/usr/bin/env bash
|
2022-10-02 02:27:12 +02:00
|
|
|
#
|
|
|
|
# Exit if any step fails
|
|
|
|
set -e
|
2014-11-03 02:33:23 +01:00
|
|
|
|
2022-10-21 11:55:33 +02:00
|
|
|
# Use directory of current script as the working directory
|
|
|
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
export NDK_VERSION="${NDK_VERSION:-android-ndk-r25}"
|
|
|
|
export ANDROID_NDK_ROOT="${ANDROID_NDK_ROOT:-/tmp/${NDK_VERSION}}"
|
|
|
|
export MIN_SDK_VERSION=${MIN_SDK_VERSION:-21}
|
2022-11-20 00:19:06 +01:00
|
|
|
export ANDROID_BUILD_DIR="${ANDROID_BUILD_DIR:-${PWD}/.build}"
|
|
|
|
export ANDROID_BUILD_CLEAN="${ANDROID_BUILD_CLEAN:-yes}"
|
|
|
|
export ANDROID_DEPENDENCIES_DIR="${ANDROID_DEPENDENCIES_DIR:-${PWD}/.deps}"
|
2015-08-01 19:46:32 +02:00
|
|
|
|
2022-10-02 02:27:12 +02:00
|
|
|
# Cleanup.
|
2022-11-20 00:19:06 +01:00
|
|
|
if [ "${ANDROID_BUILD_CLEAN}" = "yes" ] ; then
|
|
|
|
rm -rf "${ANDROID_BUILD_DIR}/prefix"
|
|
|
|
mkdir -p "${ANDROID_BUILD_DIR}/prefix"
|
|
|
|
rm -rf "${ANDROID_DEPENDENCIES_DIR}"
|
|
|
|
mkdir -p "${ANDROID_DEPENDENCIES_DIR}"
|
|
|
|
|
|
|
|
# Called shells MUST not clean after ourselves !
|
|
|
|
export ANDROID_BUILD_CLEAN="no"
|
|
|
|
fi
|
2022-10-02 02:27:12 +02:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
./build.sh "arm"
|
|
|
|
./build.sh "arm64"
|
|
|
|
./build.sh "x86"
|
|
|
|
./build.sh "x86_64"
|