1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-25 13:05:08 -07:00
libsodium/dist-build/nativeclient-pnacl.sh

28 lines
881 B
Bash
Raw Normal View History

2015-08-02 05:17:22 -07:00
#! /bin/sh
2016-04-29 00:45:12 -07:00
export NACL_SDK_ROOT=${NACL_SDK_ROOT-"/opt/nacl_sdk/pepper_49"}
2015-08-02 05:17:22 -07:00
export NACL_TOOLCHAIN=${NACL_TOOLCHAIN-"${NACL_SDK_ROOT}/toolchain/mac_pnacl"}
export NACL_BIN=${NACL_BIN-"${NACL_TOOLCHAIN}/bin"}
export PREFIX="$(pwd)/libsodium-nativeclient"
export PATH="${NACL_BIN}:$PATH"
export AR=${AR-"pnacl-ar"}
export AS=${AS-"pnacl-as"}
export CC=${CC-"pnacl-clang"}
export LD=${LD-"pnacl-ld"}
export NM=${NM-"pnacl-nm"}
export RANLIB=${RANLIB-"pnacl-ranlib"}
export PNACL_FINALIZE=${PNACL_FINALIZE-"pnacl-finalize"}
export PNACL_TRANSLATE=${PNACL_TRANSLATE-"pnacl-translate"}
export CFLAGS="-O3 -fomit-frame-pointer -fforce-addr"
2015-08-02 05:17:22 -07:00
mkdir -p $PREFIX || exit 1
make distclean > /dev/null
./configure --enable-minimal \
--host=nacl \
2016-04-30 01:17:47 -07:00
--disable-ssp --without-pthreads \
2015-08-02 05:17:22 -07:00
--prefix="$PREFIX" || exit 1
make -j3 check && make -j3 install || exit 1