1# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $ 2# $FreeBSD$ 3# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $ 4 5.include <bsd.own.mk> 6 7.if ${MK_BSD_GREP} == "yes" 8PROG= grep 9.else 10PROG= bsdgrep 11.endif 12SRCS= fastgrep.c file.c grep.c queue.c util.c 13 14.if ${MK_BSD_GREP} == "yes" 15LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ 16 ${BINDIR}/grep ${BINDIR}/fgrep \ 17 ${BINDIR}/grep ${BINDIR}/zgrep \ 18 ${BINDIR}/grep ${BINDIR}/zegrep \ 19 ${BINDIR}/grep ${BINDIR}/zfgrep 20 21MLINKS= grep.1 egrep.1 \ 22 grep.1 fgrep.1 \ 23 grep.1 zgrep.1 \ 24 grep.1 zegrep.1 \ 25 grep.1 zfgrep.1 26.endif 27 28bsdgrep.1: grep.1 29 cp ${.ALLSRC} ${.TARGET} 30 31WARNS?= 6 32 33LDADD= -lz -lbz2 34DPADD= ${LIBZ} ${LIBBZ2} 35 36.if !defined(WITHOUT_GNU_COMPAT) 37CFLAGS+= -I/usr/include/gnu 38LDADD+= -lgnuregex 39DPADD+= ${LIBGNUREGEX} 40.endif 41 42.if !defined(WITHOUT_NLS) 43.include "${.CURDIR}/nls/Makefile.inc" 44.else 45CFLAGS+= -DWITHOUT_NLS 46.endif 47 48.include <bsd.prog.mk> 49