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

gsell's avatar
gsell committed
3
pbuild::configure() {
4
	cat <<EOF > "${MODULE_SRCDIR}/make.inc"
5 6 7 8 9 10
SHELL = /bin/sh
PLAT = 
DRVOPTS  = \$(OPTS)
LOADER   = \$(FORTRAN) -pthread
ARCHFLAGS= -ru
EOF
11
	cat <<EOF > "${MODULE_SRCDIR}/Makefile.rule"
12 13 14 15 16 17 18 19 20 21 22 23 24 25
VERSION = 0.2.9
TARGET = CORE2
CC = gcc
BINARY=64
USE_THREAD = 1
USE_OPENMP = 1
NO_SHARED = 1
NO_WARMUP = 1
NO_AFFINITY = 1
FCOMMON_OPT = -frecursive
COMMON_PROF = -pg
EOF
}

gsell's avatar
gsell committed
26
pbuild::build() {
27
	cd "${MODULE_SRCDIR}"
28 29 30
	make
}

gsell's avatar
gsell committed
31
pbuild::install() {
32 33 34 35 36 37 38 39 40
	make PREFIX="${PREFIX}" install
	# We have to build shared libs and remove them here.
	# Building with NOSHARED gives an error during install -
	# due to a bug in the Makefile(s).
	rm -f "${PREFIX}/lib/"*.so
	rm -f "${PREFIX}/lib/"*.dylib 
	#( cd "${PREFIX}/lib"; ln -fs
}

gsell's avatar
gsell committed
41 42 43 44 45 46 47
pbuild::add_to_group 'Compiler'
pbuild::set_runtime_dependencies "${COMPILER}"
pbuild::set_build_dependencies "${COMPILER}"
pbuild::set_docfiles 'LICENSE' 'README.md'
pbuild::set_supported_compilers 'gcc'
pbuild::make_all
pbuild::cleanup_src