summaryrefslogtreecommitdiff
path: root/benchmarks/benchfft/Makefile
blob: 64eda893cba2cfee6662a002f7bb06e6a5191666 (plain)
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
53
54
55
56
57
# $NetBSD: Makefile,v 1.38 2014/10/09 14:05:58 wiz Exp $

DISTNAME=		benchfft-2.0
PKGREVISION=		4
CATEGORIES=		benchmarks math
MASTER_SITES=		ftp://ftp.fftw.org/pub/fftw/ \
			ftp://ftp.fftw.org/pub/fftw/old/benchfft/
DISTFILES=		${DISTNAME}${EXTRACT_SUFX} fftw-2.0.1${EXTRACT_SUFX}

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.fftw.org/benchfft/
COMMENT=		Benchmark your machine with a number of FFT algorithms

GNU_CONFIGURE=		yes
USE_TOOLS+=		gmake csh:run
USE_LANGUAGES=		c fortran77
USE_LIBTOOL=		yes

LIBTOOL_OVERRIDE=	libtool ../fftw-*/libtool
CONFIG_GUESS_OVERRIDE=	config.guess ../fftw-*/config.guess
CONFIG_SUB_OVERRIDE=	config.sub ../fftw-*/config.sub
CONFIG_STATUS_OVERRIDE=	config.status ../fftw-*/config.status

REPLACE_CSH=		submit-script

INSTALLATION_DIRS=	bin

CONFIGURE_DIRS=		${WRKDIR}/fftw-2.0.1 ${WRKSRC}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bench \
		${DESTDIR}${PREFIX}/bin/bench-fft
	${INSTALL_SCRIPT} ${WRKSRC}/submit-script \
		${DESTDIR}${PREFIX}/bin/run-fftbench

.include "../../mk/bsd.prefs.mk"

benchmark:
.if defined(BATCH)
	@${ECHO} "*** This benchmark should be run in non-batch mode"
	@${SED} -e 's|bench-fft|./bench|g' <${WRKSRC}/submit-script> ${WRKSRC}/run_bench
	@${CHMOD} 755 ${WRKSRC}/run_bench
	@${SED} -e 's|@machine@|'`uname -m`'|'				\
	${FILESDIR}/setup.answers | (cd ${WRKSRC} ; ./run_bench)
.else
	@${SED} -e 's|bench-fft|./bench|g' <${WRKSRC}/submit-script> ${WRKSRC}/run_bench
	@${CHMOD} 755 ${WRKSRC}/run_bench
	@(cd ${WRKSRC} ; ./run_bench)
	@${ECHO} ${PKGNAME} results:
	${CAT} submit.txt
.endif

results:
	@${MKDIR} /tmp/benches/`domainname`
	-@${CP} ${WRKSRC}/submit.txt /tmp/benches/`domainname`/fft.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"