build 950 Bytes
Newer Older
gsell's avatar
gsell committed
1
#!/usr/bin/env modbuild
gsell's avatar
gsell committed
2

gsell's avatar
gsell committed
3
pbuild::configure() {
4
	cat <<EOF > "${MODULE_SRCDIR}/SuiteSparse_config/SuiteSparse_config.mk"
gsell's avatar
gsell committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
CF = \$(CFLAGS) \$(CPPFLAGS) \$(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER
RANLIB = ranlib
ARCHIVE = \$(AR) \$(ARFLAGS)
CP = cp -f
MV = mv -f
F77 = gfortran
F77FLAGS = \$(FFLAGS) -O
F77LIB =
LIB = -lm
INSTALL_LIB = \${PREFIX}/lib
INSTALL_INCLUDE = \${PREFIX}/include
BLAS = -lopenblas -lgfortran
XERBLA = 
GPU_BLAS_PATH =
GPU_CONFIG =
UMFPACK_CONFIG = -DNCHOLMOD
CHOLMOD_CONFIG = \$(GPU_CONFIG)
SPQR_CONFIG =
TBB =
EOF
}

gsell's avatar
gsell committed
27
pbuild::build() {
28
	cd "${MODULE_SRCDIR}/UMFPACK"
gsell's avatar
gsell committed
29 30 31
	make TARGET=CORE2 BINARY=64 USE_THREAD=0 NO_SHARED=1
}

gsell's avatar
gsell committed
32
pbuild::install() {
gsell's avatar
gsell committed
33 34 35 36 37
	install -d "${PREFIX}/include"
	install -d "${PREFIX}/lib"
	make PREFIX="${PREFIX}" install
}

gsell's avatar
gsell committed
38 39 40 41 42
pbuild::add_to_group 'Compiler'
pbuild::set_runtime_dependencies "${COMPILER}" 'OpenBLAS'
pbuild::set_build_dependencies "${COMPILER}" 'OpenBLAS'
pbuild::make_all
#pbuild::cleanup_src