build 1.02 KB
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}/make.inc"
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 27 28
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
}

gsell's avatar
gsell committed
29
pbuild::build() {
30
	cd "${MODULE_SRCDIR}"
gsell's avatar
gsell committed
31 32 33 34
	mkdir -p "${PREFIX}/lib"
	make
}

gsell's avatar
gsell committed
35
pbuild::install() {
gsell's avatar
gsell committed
36 37
	make install
	mkdir -p "${PREFIX}/include"
38
	install -m 0444 "${MODULE_SRCDIR}"/SRC/*.h "${PREFIX}/include"
gsell's avatar
gsell committed
39 40
}

gsell's avatar
gsell committed
41 42 43 44 45 46
pbuild::add_to_group 'Compiler'
pbuild::set_runtime_dependencies "${COMPILER}"
pbuild::set_build_dependencies "${COMPILER}" 'OpenBLAS'
pbuild::set_docfiles 'README'
pbuild::make_all
pbuild::cleanup_src