Files
MX_Pmodule/scripts/Compiler/OpenBLAS/build
Achim Gsell b129a8d05d - em.xyz renamed to pmodules.xxy
- underscore removed as prefix of function names
- keyword function removed
2015-06-04 20:38:33 +02:00

50 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
source "$(dirname $0)/../../../lib/libpmodules.bash"
pmodules.configure() {
cat <<EOF > "${MODULE_SRCDIR}/make.inc"
SHELL = /bin/sh
PLAT =
DRVOPTS = \$(OPTS)
LOADER = \$(FORTRAN) -pthread
ARCHFLAGS= -ru
EOF
cat <<EOF > "${MODULE_SRCDIR}/Makefile.rule"
VERSION = 0.2.9
TARGET = CORE2
CC = gcc
BINARY=64
USE_THREAD = 0
USE_OPENMP = 0
NO_SHARED = 1
NO_WARMUP = 1
NO_AFFINITY = 1
FCOMMON_OPT = -frecursive
COMMON_PROF = -pg
EOF
}
pmodules.build() {
cd "${MODULE_SRCDIR}"
make
}
pmodules.install() {
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
}
pmodules.add_to_group 'Compiler'
pmodules.set_runtime_dependencies "${COMPILER}"
pmodules.set_build_dependencies "${COMPILER}"
pmodules.set_docfiles 'LICENSE' 'README.md'
pmodules.set_supported_compilers 'gcc'
pmodules.make_all
pmodules.cleanup_src