Skip to content

Instantly share code, notes, and snippets.

@palmerc
Created November 22, 2022 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palmerc/e2a6d1c50d41fde217d5b262d41c63ee to your computer and use it in GitHub Desktop.
Save palmerc/e2a6d1c50d41fde217d5b262d41c63ee to your computer and use it in GitHub Desktop.
#!/bin/bash
# Remember to brew install libomp llvm
# I also build libressl
set -ex
ROOT_DIR=$( pwd )
SOURCE_DIR=${ROOT_DIR}/src
CC="$( brew --prefix llvm )/bin/clang"
CPP="$( brew --prefix llvm )/bin/clang-cpp"
LD="$( brew --prefix llvm )/bin/clang"
export CC CPP LD
OPENSSL_DIR=/opt/libressl
LIBOMP_DIR=$( brew --prefix libomp )
pushd ${SOURCE_DIR}
CFLAGS=-fopenmp \
LIBS=-lomp \
CPPFLAGS="-I${OPENSSL_DIR}/include -I${LIBOMP_DIR}/include" \
LDFLAGS="-L${OPENSSL_DIR}/lib -L${LIBOMP_DIR}/lib" \
./configure
make -j8
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment