49 lines
1.0 KiB
Bash
Executable File
49 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
source "$(dirname $0)/../../../lib/libem.bash"
|
|
|
|
function em.configure() {
|
|
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
|
|
PLAT =
|
|
SuperLUroot = \${PREFIX}
|
|
SUPERLULIB = \$(SuperLUroot)/lib/libsuperlu.a
|
|
BLASDEF = -DUSE_VENDOR_BLAS
|
|
BLASLIB = \${OPENBLAS_PREFIX}/lib/libopenblas.a
|
|
TMGLIB = libtmglib.a
|
|
METISLIB =
|
|
PARMETISLIB =
|
|
FLIBS =
|
|
LIBS = \$(DSUPERLULIB) \$(BLASLIB) \$(PARMETISLIB) \$(METISLIB)
|
|
ARCH = ar
|
|
ARCHFLAGS = cr
|
|
RANLIB = ranlib
|
|
CC = ${CC}
|
|
CFLAGS = -pipe -O3
|
|
NOOPTS =
|
|
FORTRAN = ${FC}
|
|
F90FLAGS =
|
|
LOADER = ${FC}
|
|
LOADOPTS = -fopenmp
|
|
CDEFS = -DAdd_
|
|
EOF
|
|
}
|
|
|
|
function em.build() {
|
|
cd "${MODULE_SRCDIR}"
|
|
mkdir -p "${PREFIX}/lib"
|
|
make
|
|
}
|
|
|
|
function em.install() {
|
|
make install
|
|
mkdir -p "${PREFIX}/include"
|
|
install -m 0444 "${MODULE_SRCDIR}"/SRC/*.h "${PREFIX}/include"
|
|
}
|
|
|
|
em.add_to_family 'Compiler'
|
|
em.set_runtime_dependencies "${COMPILER}"
|
|
em.set_build_dependencies "${COMPILER}" 'OpenBLAS'
|
|
em.set_docfiles 'README'
|
|
em.make_all
|
|
em.cleanup_src
|