mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
28 lines
521 B
Bash
28 lines
521 B
Bash
|
source $stdenv/setup
|
||
|
|
||
|
sources=" \
|
||
|
crypto_scrypt-check \
|
||
|
crypto_scrypt-hash \
|
||
|
crypto_scrypt-hexconvert \
|
||
|
crypto_scrypt-nosse \
|
||
|
crypto-mcf \
|
||
|
crypto-scrypt-saltgen \
|
||
|
slowequals \
|
||
|
sha256 \
|
||
|
b64 \
|
||
|
"
|
||
|
|
||
|
CFLAGS="-I$src -Wall -ffast-math -O3 -D_FORTIFY_SOURCE=2 -fstack-protector"
|
||
|
|
||
|
for s in $sources
|
||
|
do echo $CC $CFLAGS -c $src/$s.c -o $s.o
|
||
|
$CC $CFLAGS -c $src/$s.c -o $s.o
|
||
|
done
|
||
|
|
||
|
echo $AR rcs libscrypt.a *.o
|
||
|
$AR rcs libscrypt.a *.o
|
||
|
|
||
|
mkdir -p $out/{lib,include}
|
||
|
cp libscrypt.a $out/lib
|
||
|
cp $src/*.h $out/include
|