diff --git a/platform-independent/cli-c/build b/platform-independent/cli-c/build index f2c7d869..0d6a00d3 100755 --- a/platform-independent/cli-c/build +++ b/platform-independent/cli-c/build @@ -214,18 +214,22 @@ depend() { } depend_scrypt() { if haslib sodium; then - CFLAGS+=" -DHAS_SODIUM=1" - LDFLAGS+=" -lsodium" + if [[ $CFLAGS != *HAS_SODIUM=1* ]]; then + CFLAGS+=" -DHAS_SODIUM=1" + LDFLAGS+=" -lsodium" + fi return fi depend scrypt - local objects=( - "lib/scrypt/src/libcperciva/"*/*.o - "lib/scrypt/src/lib/crypto/"*.o - ) - CFLAGS+=" -DHAS_CPERCIVA=1" - LDFLAGS+=" -Llib/scrypt/src ${objects[*]}" + if [[ $CFLAGS != *HAS_CPERCIVA=1* ]]; then + local objects=( + "lib/scrypt/src/libcperciva/"*/*.o + "lib/scrypt/src/lib/crypto/"*.o + ) + CFLAGS+=" -DHAS_CPERCIVA=1" + LDFLAGS+=" -Llib/scrypt/src ${objects[*]}" + fi }