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
CFLAGS+=" -DHAS_SODIUM=1" if [[ $CFLAGS != *HAS_SODIUM=1* ]]; then
LDFLAGS+=" -lsodium" CFLAGS+=" -DHAS_SODIUM=1"
LDFLAGS+=" -lsodium"
fi
return return
fi fi
depend scrypt depend scrypt
local objects=( if [[ $CFLAGS != *HAS_CPERCIVA=1* ]]; then
"lib/scrypt/src/libcperciva/"*/*.o local objects=(
"lib/scrypt/src/lib/crypto/"*.o "lib/scrypt/src/libcperciva/"*/*.o
) "lib/scrypt/src/lib/crypto/"*.o
CFLAGS+=" -DHAS_CPERCIVA=1" )
LDFLAGS+=" -Llib/scrypt/src ${objects[*]}" CFLAGS+=" -DHAS_CPERCIVA=1"
LDFLAGS+=" -Llib/scrypt/src ${objects[*]}"
fi
} }