cake_wallet/scripts/android/build_zmq.sh

33 lines
706 B
Bash
Raw Permalink Normal View History

2021-08-31 09:27:30 +00:00
#!/bin/sh
2021-03-16 18:18:54 +00:00
2021-08-31 09:27:30 +00:00
. ./config.sh
2021-03-16 18:18:54 +00:00
ZMQ_SRC_DIR=$WORKDIR/libzmq
2021-08-31 09:27:30 +00:00
ZMQ_BRANCH=v4.3.3
ZMQ_COMMIT_HASH=04f5bbedee58c538934374dc45182d8fc5926fa3
2021-03-16 18:18:54 +00:00
for arch in "aarch" "aarch64" "i686" "x86_64"
do
PREFIX=$WORKDIR/prefix_${arch}
2021-12-29 20:12:54 +00:00
PATH="${TOOLCHAIN_BASE_DIR}_${arch}/bin:${ORIGINAL_PATH}"
2021-03-16 18:18:54 +00:00
case $arch in
2021-12-29 20:12:54 +00:00
"aarch" ) TARGET="arm";;
"i686" ) TARGET="x86";;
* ) TARGET="${arch}";;
2021-03-16 18:18:54 +00:00
esac
2021-08-31 09:27:30 +00:00
2021-03-16 18:18:54 +00:00
HOST="${TARGET}-linux-android"
cd $WORKDIR
rm -rf $ZMQ_SRC_DIR
git clone https://github.com/zeromq/libzmq.git ${ZMQ_SRC_DIR} -b ${ZMQ_BRANCH}
cd $ZMQ_SRC_DIR
git checkout ${ZMQ_COMMIT_HASH}
./autogen.sh
2021-12-29 20:12:54 +00:00
CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
make -j$THREADS
2021-03-16 18:18:54 +00:00
make install
done