Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148297414
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/Mk/Uses/blaslapack.mk b/Mk/Uses/blaslapack.mk
new file mode 100644
index 000000000000..d497654c429a
--- /dev/null
+++ b/Mk/Uses/blaslapack.mk
@@ -0,0 +1,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
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Aug 9, 12:04 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29371141
Default Alt Text
(1 KB)
Attached To
Mode
R11 FreeBSD ports repository
Attached
Detach File
Event Timeline
Log In to Comment