diff options
author | Determinant <ted.sybil@gmail.com> | 2019-12-06 09:45:54 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-12-06 09:45:54 -0500 |
commit | b6d1796be78b1156d835f8a81efbf8cc24750520 (patch) | |
tree | 273144a7b7a181a39651d1953a895c58c446cd84 /scripts/env.sh | |
parent | ec20efb7676c597c26edc63ae0ac47d3ec8b478c (diff) |
improve build scripts
Diffstat (limited to 'scripts/env.sh')
-rw-r--r-- | scripts/env.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/env.sh b/scripts/env.sh new file mode 100644 index 0000000..318c483 --- /dev/null +++ b/scripts/env.sh @@ -0,0 +1,14 @@ +export GOPATH="$(go env GOPATH)" +export SALTICIDAE_ORG="Determinant" + +if [[ "$OSTYPE" == "linux-gnu" ]]; then + export SALTICIDAE_PATH="$GOPATH/src/github.com/$SALTICIDAE_ORG/salticidae-go/salticidae" + export CGO_CFLAGS="-I$SALTICIDAE_PATH/build/include/" + export CGO_LDFLAGS="-L$SALTICIDAE_PATH/build/lib/ -lsalticidae -luv -lssl -lcrypto -lstdc++" +elif [[ "$OSTYPE" == "darwin"* ]]; then + export CGO_CFLAGS="-I/usr/local/opt/openssl/include" + export CGO_LDFLAGS="-L/usr/local/opt/openssl/lib/ -lsalticidae -luv -lssl -lcrypto" +else + echo "Your system is not supported yet." + exit 1 +fi |