dev
sh 31 lines 656 Bytes
Raw
1 #!/bin/bash
2 set -x -e
3
4 . ./config.sh
5 SODIUM_SRC_DIR=${WORKDIR}/libsodium
6 SODIUM_BRANCH=1.0.16
7
8 for arch in "aarch" "aarch64" "i686" "x86_64"
9 do
10
11 PREFIX=${WORKDIR}/prefix_${arch}
12 PATH="${TOOLCHAIN_BASE_DIR}_${arch}/bin:${ORIGINAL_PATH}"
13
14 case $arch in
15 "aarch" ) TARGET="arm";;
16 "i686" ) TARGET="x86";;
17 * ) TARGET="${arch}";;
18 esac
19
20 HOST="${TARGET}-linux-android"
21 cd $WORKDIR
22 rm -rf $SODIUM_SRC_DIR
23 git clone https://github.com/jedisct1/libsodium.git $SODIUM_SRC_DIR -b $SODIUM_BRANCH
24 cd $SODIUM_SRC_DIR
25 ./autogen.sh
26 CC=clang CXX=clang++ ./configure --prefix=${PREFIX} --host=${HOST} --enable-static --disable-shared
27 make -j$THREADS
28 make install
29
30 done
31