blob: d497654c429a028d8da0d20c61e53e19e35569c2 (
plain) (
blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# $FreeBSD$
#
# Handle dependencies on Blas / Lapack
#
# Feature: blaslapack
# Usage: USES=blaslapack or USES=blaslapack:ARGS
# Valid ARGS: atlas netlib gotoblas openblas (default)
#
# Provides: BLASLIB and LAPACKLIB
#
# Maintainer: thierry@FreeBSD.org
.if !defined(_INCLUDE_USES_BLASLAPACK_MK)
_INCLUDE_USES_BLASLAPACK_MK= yes
_valid_ARGS= atlas gotoblas netlib openblas
_DEFAULT_BLASLAPACK= netlib
.if empty(blaslapack_ARGS)
blaslapack_ARGS= ${_DEFAULT_BLASLAPACK}
.endif
LDFLAGS+= -L${LOCALBASE}/lib
.if ${blaslapack_ARGS} == atlas
LIB_DEPENDS+= libatlas.so:${PORTSDIR}/math/atlas
_BLASLIB= ptf77blas
LAPACKLIB= -lalapack -lptcblas
_ATLASLIB= atlas
ATLASLIB= -l${_ATLASLIB}
.elif ${blaslapack_ARGS} == gotoblas
LIB_DEPENDS+= libgoto2.so:${PORTSDIR}/math/gotoblas
LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack
_BLASLIB= goto2p
LAPACKLIB= -lgoto2p
.elif ${blaslapack_ARGS} == netlib
LIB_DEPENDS+= libblas.so:${PORTSDIR}/math/blas
LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack
_BLASLIB= blas
LAPACKLIB= -llapack
.elif ${blaslapack_ARGS} == openblas
LIB_DEPENDS+= libopenblas.so:${PORTSDIR}/math/openblas
_BLASLIB= openblasp
LAPACKLIB= -lopenblasp
.else
IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS}
.endif
BLASLIB= -l${_BLASLIB}
.endif
|