From owner-svn-ports-all@FreeBSD.ORG Mon Jan 5 20:43:03 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2A198B8; Mon, 5 Jan 2015 20:43:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95FCA2B3E; Mon, 5 Jan 2015 20:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t05Kh3Re032946; Mon, 5 Jan 2015 20:43:03 GMT (envelope-from thierry@FreeBSD.org) Received: (from thierry@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05Kh3lg032945; Mon, 5 Jan 2015 20:43:03 GMT (envelope-from thierry@FreeBSD.org) Message-Id: <201501052043.t05Kh3lg032945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thierry set sender to thierry@FreeBSD.org using -f From: Thierry Thomas Date: Mon, 5 Jan 2015 20:43:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r376359 - head/Mk/Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 20:43:03 -0000 Author: thierry Date: Mon Jan 5 20:43:02 2015 New Revision: 376359 URL: https://svnweb.freebsd.org/changeset/ports/376359 QAT: https://qat.redports.org/buildarchive/r376359/ Log: Adding ports/Mk/Uses/blaslapack.mk. It handles the dependencies and defines BLASLIB and LAPACKLIB for the different blas / lapack implementations. It defaults to netlib, the reference libraries, but Openblas, Gotoblas or ATLAS can be selected. Differential Revision: D1354 Added: head/Mk/Uses/blaslapack.mk (contents, props changed) Added: head/Mk/Uses/blaslapack.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/blaslapack.mk Mon Jan 5 20:43:02 2015 (r376359) @@ -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