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