1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00
freebsd-ports/math/umfpack/Makefile
Thierry Thomas 066ac7b976 Use BLAS instead of ATLAS by default.
I used to recommend the use of ATLAS over the standard fortran BLAS.
Unfortunately for some time we are not packaging ATLAS anymore, and very
recently the source code of GotoBLAS has been made available for
research purposes. GotoBLAS is said to be faster than ATLAS and the
shared library is exchangeable with the standard BLAS. Curiously the
standard BLAS is known to beat both GotoBLAS and ATLAS when the problems
are not too complex, so I expect it's better for beginners.

I am hereto recommending the use of shared blas by default but leaving a
WITH_ATLAS knob in case someone doesn't have access to GotoBLAS and
wants to try to squeeze some more performance.

PR:		ports/98070
Submitted by:	Pedro F. Giffuni <giffunip (at) asme.org>
2006-05-29 20:34:20 +00:00

81 lines
2.1 KiB
Makefile

# New ports collection makefile for: UMFPACK
# Date created: 5 Nov 97
# Whom: Pedro Giffuni <giffunip@asme.org>
#
# $FreeBSD$
#
PORTNAME= umfpack
PORTVERSION= 4.4
CATEGORIES= math
MASTER_SITES= http://www.cise.ufl.edu/research/sparse/umfpack/v${PORTVERSION}/
DISTNAME= UMFPACKv${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Unsymmetric-pattern MultiFrontal Package
.ifdef WITH_ATLAS
LIB_DEPENDS= atlas.1:${PORTSDIR}/math/atlas
.else
LIB_DEPENDS= blas.1:${PORTSDIR}/math/blas
.endif
CONFLICTS= elmer-umfpack-4*
WRKSRC= ${WRKDIR}/${DISTNAME}/UMFPACK
ALL_TARGET= lib
.ifdef WITH_ATLAS
BLAS_LIBS= -lf77blas -latlas
.else
BLAS_LIBS?= -lblas
.endif
post-extract:
${CP} ${WRKDIR}/${DISTNAME}/AMD/Make/Make.linux \
${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd
pre-build:
@${REINPLACE_CMD} -e 's+%%CC%%+${CC}+g ; \
s+%%CFLAGS%%+${CFLAGS}+ ; \
s+%%LOCALBASE%%+${LOCALBASE}+ ; \
s+%%BLAS_LIBS%%+${BLAS_LIBS}+ ;' \
${WRKDIR}/${DISTNAME}/AMD/Make/Make.freebsd
do-install:
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/AMD/Lib/libamd.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/Lib/libumfpack.a ${PREFIX}/lib
.for mod in AMD UMFPACK
@${MKDIR} ${PREFIX}/include/${mod}
@for inc in `${LS} ${WRKSRC}/../${mod}/Include` ; do \
${INSTALL_DATA} ${WRKSRC}/../${mod}/Include/$$inc ${PREFIX}/include/${mod}; \
done
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/AMD/Doc/*.pdf ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
${GZIP_CMD} ${DOCSDIR}/README.txt
${INSTALL_DATA} ${WRKSRC}/Doc/*.pdf ${DOCSDIR}
@${FIND} ${DOCSDIR} | ${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
@${FIND} ${DOCSDIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
@${MKDIR} ${EXAMPLESDIR}
@${TAR} --exclude tmp -C ${WRKSRC}/Demo -cf - . | \
${TAR} -C ${EXAMPLESDIR} -xf -
@${FIND} ${EXAMPLESDIR} | ${XARGS} ${CHOWN} ${SHAREOWN}:${SHAREGRP}
@${FIND} ${EXAMPLESDIR} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}
.endif
.if defined(MAINTAINER_MODE)
regression-test: build
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} hb )
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
.include <bsd.port.post.mk>