mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-28 16:15:23 +08:00
341f56ccac
Solution: Modify the build scripts so the user can specify the platform for which to build, e.g. `./build.sh arm`. This approach originally significantly reduces the parameters which have to be set before running the script. Further the build process is documented in a README now.
32 lines
649 B
Bash
Executable File
32 lines
649 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
export NDK_VERSION=android-ndk-r20
|
|
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
|
|
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
|
linux*)
|
|
HOST_PLATFORM=linux-x86_64
|
|
;;
|
|
darwin*)
|
|
HOST_PLATFORM=darwin-x86_64
|
|
;;
|
|
*)
|
|
echo "Unsupported platform"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
|
|
export FILENAME=$NDK_VERSION-$HOST_PLATFORM.zip
|
|
|
|
(cd '/tmp' \
|
|
&& wget http://dl.google.com/android/repository/$FILENAME -O $FILENAME &> /dev/null \
|
|
&& unzip -q $FILENAME) || exit 1
|
|
unset FILENAME
|
|
fi
|
|
|
|
./build.sh "arm"
|
|
./build.sh "arm64"
|
|
./build.sh "x86"
|
|
./build.sh "x86_64"
|