mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
5d33e04596
Where appropriate fiddle with a few other things.
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
# Handle dependencies on Blas / Lapack
|
|
#
|
|
# Feature: blaslapack
|
|
# Usage: USES=blaslapack or USES=blaslapack:ARGS
|
|
# Valid ARGS: atlas gotoblas netlib (default) openblas
|
|
#
|
|
# 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:math/atlas
|
|
_BLASLIB= ptf77blas
|
|
LAPACKLIB= -lalapack -lptcblas
|
|
_ATLASLIB= atlas
|
|
ATLASLIB= -l${_ATLASLIB}
|
|
.elif ${blaslapack_ARGS} == gotoblas
|
|
LIB_DEPENDS+= libgoto2.so:math/gotoblas
|
|
LIB_DEPENDS+= liblapack.so:math/lapack
|
|
_BLASLIB= goto2p
|
|
LAPACKLIB= -lgoto2p
|
|
.elif ${blaslapack_ARGS} == netlib
|
|
LIB_DEPENDS+= libblas.so:math/blas
|
|
LIB_DEPENDS+= liblapack.so:math/lapack
|
|
_BLASLIB= blas
|
|
LAPACKLIB= -llapack
|
|
.elif ${blaslapack_ARGS} == openblas
|
|
LIB_DEPENDS+= libopenblas.so:math/openblas
|
|
_BLASLIB= openblas
|
|
LAPACKLIB= -lopenblas
|
|
.else
|
|
IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS}
|
|
.endif
|
|
|
|
BLASLIB= -l${_BLASLIB}
|
|
|
|
.endif
|