Wire up libTom stuff to build system.

This commit is contained in:
Ryan C. Gordon 2017-06-04 01:16:37 -04:00
parent 7542966e33
commit 62f6f0c7e0
3 changed files with 9 additions and 4 deletions

View file

@ -10,6 +10,8 @@ if [ "$OSTYPE" = "Linux" ]; then
let NCPU=$NCPU+1
elif [ "$OSTYPE" = "Darwin" ]; then
NCPU=`sysctl -n hw.ncpu`
export CFLAGS="$CFLAGS -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070"
export LDFLAGS="$LDFLAGS -mmacosx-version-min=10.7"
elif [ "$OSTYPE" = "SunOS" ]; then
NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
else

View file

@ -7,7 +7,7 @@ export TFMDIR="tomsfastmath-0.13.1"
export LTCDIR="libtomcrypt-1.17"
function build {
clang -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
clang -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -I $TFMDIR/src/headers -I $LTCDIR/src/headers -o "$1" -Wall -O3 "$1.c" rsa_common.c $LTCDIR/libtomcrypt.a $TFMDIR/libtfm.a
}
set -e