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}
|
|
|
|
|
|
|
|
case $arch in
|
2021-08-31 09:27:30 +00:00
|
|
|
"aarch" ) TARGET="arm"
|
|
|
|
ANDROID_CLANG=armv7a-linux-androideabi${API}-clang
|
|
|
|
ANDROID_CLANGPP=armv7a-linux-androideabi${API}-clang++;;
|
|
|
|
"i686" ) TARGET="x86"
|
|
|
|
ANDROID_CLANG=${arch}-linux-android${API}-clang
|
|
|
|
ANDROID_CLANGPP=${arch}-linux-android${API}-clang++;;
|
|
|
|
* ) TARGET="${arch}"
|
|
|
|
ANDROID_CLANG=${arch}-linux-android${API}-clang
|
|
|
|
ANDROID_CLANGPP=${arch}-linux-android${API}-clang++;;
|
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-08-31 09:27:30 +00:00
|
|
|
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
2021-03-16 18:18:54 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
done
|