diff options
Diffstat (limited to 'bin/env.sh')
-rw-r--r-- | bin/env.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/env.sh b/bin/env.sh new file mode 100644 index 0000000..ca884b4 --- /dev/null +++ b/bin/env.sh @@ -0,0 +1,11 @@ +# Environment variables for the project. + +# Setup custom build flags for non-root homebrew installation. +if [ "$(uname -o)" = "Darwin" ] && [ "$(brew --prefix)" != "/usr/local" ]; then + export BLS256_SLIB_LDFLAGS="-L$(brew --prefix gmp)/lib" + export BLS384_SLIB_LDFLAGS="-L$(brew --prefix gmp)/lib" + + export CFLAGS="-I$(brew --prefix gmp)/include -I$(brew --prefix openssl)/include $CFLAGS" + export LDFLAGS="-L$(brew --prefix gmp)/lib $LDFLAGS -L$(brew --prefix openssl)/lib $LDFLAGS" + export CGO_LDFLAGS=$LDFLAGS +fi |