aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/iozone/Makefile
blob: aee53c1cb23531d44b480c0bf2c248a27d8bf320 (plain) (blame)
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
# New ports collection makefile for:    iozone
# Date created:         26 September 1994
# Whom:                 jmz
#
# $FreeBSD$
#

PORTNAME=   iozone
PORTVERSION=    3.370
CATEGORIES= benchmarks
MASTER_SITES=   http://www.iozone.org/src/current/
DISTNAME=   ${PORTNAME}${PORTVERSION:S/./_/}
EXTRACT_SUFX=   .tar

MAINTAINER= chifeng@gmail.com
COMMENT=    Performance Test of Sequential File I/O

CONFLICTS=  iozone-2.*

WRKSRC=     ${WRKDIR}/${DISTNAME}/src/current

MAKEFILE=   makefile
MAKE_ARGS=  freebsd CFLAGS="${CFLAGS}"
ALL_TARGET=
MAKE_JOBS_UNSAFE=   yes

MAN1=       iozone.1
PLIST_FILES=    bin/iozone

OPTIONS=    THREADS "Enable threading (uses pthreads)"  on \
        SSH "Use ssh in distributed measurement"    on

.include <bsd.port.pre.mk>

.if defined (WITH_THREADS)
CFLAGS+=    ${PTHREAD_CFLAGS}
MAKE_ENV=   LDFLAGS=${PTHREAD_LIBS}
.else
CFLAGS+=-DNO_THREADS
.endif

.if defined (WITH_SSH)
post-patch::
    @${REINPLACE_CMD} -e 's|shell\,\"rsh\"|shell\,\"ssh\"|' ${WRKSRC}/iozone.c
.endif

post-patch::
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/makefile

do-install:
    ${STRIP_CMD} ${WRKSRC}/iozone
    ${INSTALL_PROGRAM} ${WRKSRC}/iozone ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/docs/iozone.1 ${PREFIX}/man/man1

.include <bsd.port.post.mk>