diff options
Diffstat (limited to 'build_openblas.sh')
-rwxr-xr-x | build_openblas.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/build_openblas.sh b/build_openblas.sh new file mode 100755 index 0000000..94a0735 --- /dev/null +++ b/build_openblas.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e +set -x + +name="OpenBLAS" +version="0.3.2" +tarball="v${version}.tar.gz" +dest="${name}-${version}" # Ugh. +url="http://github.com/xianyi/${name}/archive/${tarball}" +prefix="/opt/OpenBLAS" + +function pre() +{ + curl -LO "${url}" + tar xf "${tarball}" +} + +function build() +{ + pre + pushd "${dest}" + export LDFLAGS="-Wl,-rpath=$prefix/lib" + make USE_OPENMP=1 + make install PREFIX="${prefix}" NO_STATIC=1 + popd + post +} + +function post() +{ + rm -rf "${dest}" + rm -rf "${tarball}" + echo "All done." +} + +# Main +build |