Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / mpi.buildlink3.mk
blob6c47d50dcef242fb6763d99a680e14a13c9df446
1 # $NetBSD$
3 # This Makefile fragment is meant to be included by packages
4 # that use any MPI implementation instead of one particular one.
5 # The available MPI implementations are "mpich" and "openmpi".
7 # === User-settable variables ===
9 # MPI_TYPE
10 # This value represents the type of MPI we wish to use on the system.
12 # Possible: mpich, openmpi
13 # Default: mpich
15 .if !defined(MPI_BUILDLINK3_MK)
16 MPI_BUILDLINK3_MK= # define it
18 .include "../../mk/bsd.prefs.mk"
20 # Try to find if we have anything installed already
21 .if exists($(LOCALBASE)/bin/mpicc)
22 _MPI_PACKAGE!= $(PKG_INFO) -Q PKGPATH -F $(LOCALBASE)/bin/mpicc
23 MPI_TYPE?= $(_MPI_PACKAGE:T)
24 .else
26 MPI_TYPE?= mpich # default to MPICH due to backward compatibility
27 .if $(MPI_TYPE) == "mpich"
28 _MPI_PACKAGE= parallel/mpi-ch
29 .elif $(MPI_TYPE) == "openmpi"
30 _MPI_PACKAGE= parallel/openmpi
31 .else # invalid or unimplemented type
32 PKG_FAIL_REASON= \
33 "${MPI_TYPE} is not an acceptable MPI type for ${PKGNAME}."
34 .endif
35 .endif
37 .include "../../$(_MPI_PACKAGE)/buildlink3.mk"
39 .endif # MPI_BUILDLINK3_MK