summaryrefslogtreecommitdiff
path: root/parallel/openmpi/options.mk
blob: 9d78d5a23216e2af54321f124eaa75a3c2e61102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# $NetBSD: options.mk,v 1.5 2013/07/19 03:52:29 manu Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.openmpi
PKG_SUPPORTED_OPTIONS=	debug f90

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mdebug)
CONFIGURE_ARGS+=	--enable-debug
.endif


.if !empty(PKG_OPTIONS:Mf90)
GCC_REQD=		4.7
GCCDIR=			${PREFIX}/gcc47
CONFIGURE_ARGS+=	--enable-mpi-f90
CONFIGURE_ENV+=		FC=${GCCDIR}/bin/gfortran
PLIST_SRC+=		PLIST.f90

SUBST_CLASSES+=		f90
SUBST_STAGE.f90=	post-configure
SUBST_FILES.f90=	ompi/tools/wrappers/mpif90-wrapper-data.txt
SUBST_SED.f90=		-e 's,^compiler=.*$$,compiler=${GCCDIR}/bin/gfortran,'
SUBST_SED.f90+=		-e 's,^linker_flags=,linker_flags= -R${GCCDIR}/lib ,'
SUBST_SED.f90+=		-e 's,^linker_flags=,linker_flags= -L${GCCDIR}/lib ,'
.else
CONFIGURE_ARGS+=	--disable-mpi-f90
.endif

PLIST_SRC+=		PLIST