From 01189398e4a86004dc3d752e8359f37dbfd07a66 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 5 Aug 2020 17:34:44 +0200 Subject: [PATCH] OSX -> MACOS --- dist-build/osx.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dist-build/osx.sh b/dist-build/osx.sh index d47a0018..b7ff1bd5 100755 --- a/dist-build/osx.sh +++ b/dist-build/osx.sh @@ -1,15 +1,7 @@ #! /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" -export LDFLAGS="-arch x86_64 -mmacosx-version-min=${OSX_VERSION_MIN} -march=${OSX_CPU_ARCH}" - -make distclean > /dev/null +export MACOS_VERSION_MIN=${MACOS_VERSION_MIN-"10.10"} if [ -z "$LIBSODIUM_FULL_BUILD" ]; then export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal" @@ -17,14 +9,18 @@ else export LIBSODIUM_ENABLE_MINIMAL_FLAG="" fi -./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$PREFIX" || exit 1 - - NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) PROCESSORS=${NPROCESSORS:-3} +mkdir -p $PREFIX || exit 1 + +export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -O2 -g" +export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}" + +make distclean >/dev/null +./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ + --prefix="$PREFIX" || exit 1 make -j${PROCESSORS} check && make -j${PROCESSORS} install || exit 1 # Cleanup -make distclean > /dev/null +make distclean >/dev/null