diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-08-29 13:04:12 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-08-29 13:04:12 -0400 |
commit | e1e50116a7151574f7ddfc05528bdf398e6f1566 (patch) | |
tree | 162a53ad2420651afe3e30ecdf7e57ee0f7cfbd5 /build_openblas.sh | |
download | docker-buildsys-openblas-e1e50116a7151574f7ddfc05528bdf398e6f1566.tar.gz |
Initial commit
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 |