2016-04-29 12:55:06 -07:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
export NACL_SDK_ROOT=${NACL_SDK_ROOT-"/opt/nacl_sdk/pepper_49"}
|
|
|
|
export NACL_TOOLCHAIN=${NACL_TOOLCHAIN-"${NACL_SDK_ROOT}/toolchain/mac_x86_glibc"}
|
|
|
|
export NACL_BIN=${NACL_BIN-"${NACL_TOOLCHAIN}/bin"}
|
2016-04-29 13:56:09 -07:00
|
|
|
export PREFIX="$(pwd)/libsodium-nativeclient-x86_64"
|
2016-04-29 12:55:06 -07:00
|
|
|
export PATH="${NACL_BIN}:$PATH"
|
2016-04-29 13:29:34 -07:00
|
|
|
export CFLAGS="-O3 -fomit-frame-pointer -fforce-addr"
|
2016-04-29 12:55:06 -07:00
|
|
|
|
|
|
|
mkdir -p $PREFIX || exit 1
|
|
|
|
|
|
|
|
make distclean > /dev/null
|
|
|
|
|
2018-03-06 13:10:05 -07:00
|
|
|
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
|
2018-03-06 12:36:39 -07:00
|
|
|
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
|
2018-03-06 13:20:17 -07:00
|
|
|
else
|
|
|
|
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
|
2018-03-06 12:36:39 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
|
2016-04-29 12:55:06 -07:00
|
|
|
--host=x86_64-nacl \
|
2016-04-30 01:17:47 -07:00
|
|
|
--disable-ssp --without-pthreads \
|
2016-04-29 12:55:06 -07:00
|
|
|
--prefix="$PREFIX" || exit 1
|
|
|
|
|
|
|
|
make -j3 check && make -j3 install || exit 1
|