mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
ebe0edaaa9
init_dependency_root(): Moved to android_build_helper.sh ANDROID_DEPENDENCIES_DIR: added to specify a storage for dependencies when downloaded automatically. ANDROID_BUILD_DIR: Changed the default in ci_build.sh. ci_build.sh configures these 2 variables to no more use /tmp by default ( except for Android NDK), but a local clone subfolder. This helps to find downloaded dependencies and generated binaries. This avoid to have user permission conflicts, or conflicts with 2 different clones of LIBZMQ (for instance).
32 lines
931 B
Bash
Executable File
32 lines
931 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Exit if any step fails
|
|
set -e
|
|
|
|
# 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}
|
|
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}"
|
|
|
|
# Cleanup.
|
|
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
|
|
|
|
./build.sh "arm"
|
|
./build.sh "arm64"
|
|
./build.sh "x86"
|
|
./build.sh "x86_64"
|