2
0

Don't add scrypt objects in twice.

This commit is contained in:
Maarten Billemont 2017-04-08 16:48:20 -04:00
parent 385f347b33
commit 9ef265d9de

View File

@ -214,18 +214,22 @@ depend() {
} }
depend_scrypt() { depend_scrypt() {
if haslib sodium; then if haslib sodium; then
if [[ $CFLAGS != *HAS_SODIUM=1* ]]; then
CFLAGS+=" -DHAS_SODIUM=1" CFLAGS+=" -DHAS_SODIUM=1"
LDFLAGS+=" -lsodium" LDFLAGS+=" -lsodium"
fi
return return
fi fi
depend scrypt depend scrypt
if [[ $CFLAGS != *HAS_CPERCIVA=1* ]]; then
local objects=( local objects=(
"lib/scrypt/src/libcperciva/"*/*.o "lib/scrypt/src/libcperciva/"*/*.o
"lib/scrypt/src/lib/crypto/"*.o "lib/scrypt/src/lib/crypto/"*.o
) )
CFLAGS+=" -DHAS_CPERCIVA=1" CFLAGS+=" -DHAS_CPERCIVA=1"
LDFLAGS+=" -Llib/scrypt/src ${objects[*]}" LDFLAGS+=" -Llib/scrypt/src ${objects[*]}"
fi
} }