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
|
|
|
SODIUM_SRC_DIR=${WORKDIR}/libsodium
|
|
|
|
SODIUM_BRANCH=1.0.16
|
|
|
|
|
|
|
|
for arch in "aarch" "aarch64" "i686" "x86_64"
|
|
|
|
do
|
|
|
|
|
2021-08-31 09:27:30 +00:00
|
|
|
PREFIX=${WORKDIR}/prefix_${arch}
|
2021-03-16 18:18:54 +00:00
|
|
|
|
|
|
|
case $arch in
|
2021-08-31 09:27:30 +00:00
|
|
|
"aarch" ) TARGET="arm"
|
|
|
|
CC=armv7a-linux-androideabi${API}-clang
|
|
|
|
CXX=armv7a-linux-androideabi${API}-clang++;;
|
|
|
|
"i686" ) TARGET="x86"
|
|
|
|
CC=${arch}-linux-android${API}-clang
|
|
|
|
CXX=${arch}-linux-android${API}-clang++;;
|
|
|
|
* ) TARGET="${arch}"
|
|
|
|
CC=${arch}-linux-android${API}-clang
|
|
|
|
CXX=${arch}-linux-android${API}-clang++;;
|
2021-03-16 18:18:54 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
HOST="${TARGET}-linux-android"
|
|
|
|
cd $WORKDIR
|
|
|
|
rm -rf $SODIUM_SRC_DIR
|
|
|
|
git clone https://github.com/jedisct1/libsodium.git $SODIUM_SRC_DIR -b $SODIUM_BRANCH
|
|
|
|
cd $SODIUM_SRC_DIR
|
|
|
|
./autogen.sh
|
2021-08-31 09:27:30 +00:00
|
|
|
./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
|
2021-03-16 18:18:54 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
|
|
|
|
done
|
2021-08-31 09:27:30 +00:00
|
|
|
|