SuperLU_DIST.build 1.03 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
#!/bin/bash

source "$(dirname $0)/../lib/libem.bash"

function em.configure() {
	cat <<EOF > "${EM_SRCDIR}/make.inc"
PLAT		= 
DSuperLUroot 	= \${PREFIX}
DSUPERLULIB   	= \$(DSuperLUroot)/lib/libsuperlu_dist.a
BLASDEF	     	= -DUSE_VENDOR_BLAS
BLASLIB      	= \${OPENBLAS_PREFIX}/lib/libopenblas.a
METISLIB	=
PARMETISLIB	=
FLIBS	 	= 
LIBS            = \$(DSUPERLULIB) \$(BLASLIB) \$(PARMETISLIB) \$(METISLIB)
ARCH         	= ar
ARCHFLAGS    	= cr
RANLIB       	= ranlib
CC           	= mpicc
CFLAGS          = -pipe -O3
NOOPTS		= 
FORTRAN         = mpif90
F90FLAGS	= 
LOADER	        = mpif90
LOADOPTS	= 
CDEFS        = -DAdd__ 
EOF
}

function em.build() {
	cd "${EM_SRCDIR}"
	mkdir -p "${PREFIX}/lib"
	make
}

function em.install() {
	make install
	mkdir -p "${PREFIX}/include"
	install -m 0444 "${EM_SRCDIR}"/SRC/*.h "${PREFIX}/include"
}

function em.install_doc() {
	install -m 0444 README "${DOCDIR}"
}

em.add_to_family 'MPI'
em.set_runtime_dependencies "${COMPILER}" "${MPI}"
em.set_build_dependencies "${COMPILER}" "${MPI}" "OpenBLAS"
em.make_all