install.sh

来自「利用C」· Shell 代码 · 共 49 行

SH
49
字号
#!/bin/bashprefix=${1:-"/usr/local/hypre"}echo "Install Hypre 2.0.0 in $prefix"builddir=$(mktemp -dt hyprebuild)#copy files needed by Mac OS Xcp hypre-* $builddircd $builddircurl -O -k https://computation.llnl.gov/casc/hypre/download/hypre-2.0.0.tar.gztar xzf hypre-2.0.0.tar.gz cd hypre-2.0.0/srccputype=$(uname -m)arch=$(uname -s)if [ $cputype == "i386" -a $arch == "Darwin" ] ; then    #copy files that are needed by mac os x    rm -f configure    cp ../../hypre-configure configure    chmod u+x configure    cp ../../hypre-struct_overlap_innerprod.c struct_mv/struct_overlap_innerprod.c     echo "Configuring for Darwin"    MACOSX_DEPLOYMENT_TARGET=10.5    LDFLAGS='-framework vecLib'     ./configure --without-MPI --enable-shared --prefix=$prefix --without-fei --without-superlu --without-mli --with-blas --with-lapackelif [ $cputype == "x86_64" -a $arch == "Linux" ] ; then    echo "Configuring for 64 bit linux"    CFLAGS=-fPIC    CXXFLAGS=-fPIC    FFLAGS=-fPIC    LDFLAGS=-fPIC    ./configure --without-MPI --enable-shared --prefix=$prefix --without-fei --without-superlu --without-mli --with-blas --with-lapackelse    echo "Using default configuration"    ./configure --without-MPI --enable-shared --prefix=$prefix --without-fei --without-superlu --without-mli --with-blas --with-lapackfimakemake install# finally, remove the builddirrm -rf $builddir

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?