summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/grep/Makefile
blob: 0502d670f8c27ecb5dcf92ae6ebc050f19be740e (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
# $FreeBSD$

MAINTAINER= wosch

GREP_LIBZ= YES
GREP_FTS=  YES

PROG=	grep
SRCS=   dfa.c grep.c getopt.c kwset.c obstack.c search.c
CFLAGS+=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 \
	-DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 \
	-DHAVE_VALLOC=1 -DHAVE_WORKING_MMAP=1

LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
	${BINDIR}/grep ${BINDIR}/fgrep
MLINKS= grep.1 egrep.1 grep.1 fgrep.1

DPADD+= ${LIBGNUREGEX}
LDADD+= -lgnuregex

.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
LDADD+= -lz
DPADD+= ${LIBZ}
CFLAGS+= -DHAVE_LIBZ=1
LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \
	${BINDIR}/grep ${BINDIR}/zegrep \
	${BINDIR}/grep ${BINDIR}/zfgrep 
MLINKS+= grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1
.endif
.if defined(GREP_FTS) && !empty(GREP_FTS)
CFLAGS+= -DHAVE_FTS=1
.endif

check:	all
	sh ${.CURDIR}/tests/check.sh ${.CURDIR}/tests

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud