serval-dna/libsodium/dist-build/osx.sh
Andrew Bettison 63d5cec1c6 Merge libsodium 1.0.13
git subtree add --squash --prefix libsodium git@github.com:jedisct1/libsodium.git 1.0.13
git commit --amend (to rewrite this commit message)
2017-09-19 10:16:40 +09:30

21 lines
560 B
Bash
Executable File

#! /bin/sh
export PREFIX="$(pwd)/libsodium-osx"
export OSX_VERSION_MIN=${OSX_VERSION_MIN-"10.8"}
export OSX_CPU_ARCH=${OSX_CPU_ARCH-"core2"}
mkdir -p $PREFIX || exit 1
export CFLAGS="-arch x86_64 -mmacosx-version-min=${OSX_VERSION_MIN} -march=${OSX_CPU_ARCH} -O2 -g -flto"
export LDFLAGS="-arch x86_64 -mmacosx-version-min=${OSX_VERSION_MIN} -march=${OSX_CPU_ARCH} -flto"
make distclean > /dev/null
./configure --enable-minimal \
--prefix="$PREFIX" || exit 1
make -j3 check && make -j3 install || exit 1
# Cleanup
make distclean > /dev/null