freebsd-dev/sbin/ipf/ipf/Makefile
Isabell Long 2368efbed4 Link ipfilter(4) and ipfilter(5) to the build to stop the wrong man page
displaying for 'man 4 ipfilter'.

PR:		docs/118020
Approved by:	gjb (mentor)
MFC after:	5 days
2012-08-28 12:33:54 +00:00

43 lines
892 B
Makefile

# $FreeBSD$
PROG= ipf
SRCS= ${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c
MAN= ipfilter.4 ipfilter.5 ipf.8 ipf.4 ipf.5 ipl.4
MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5
CFLAGS+= -I. -DIPFILTER_BPF
GENHDRS= ipf_l.h ipf_y.h
DPSRCS+= ${GENHDRS}
CLEANFILES+= ${GENHDRS} ipf_y.c ipf_l.c
ipf_y.c: ipf_y.y
${YACC} -d ${.ALLSRC}
sed -e 's/yy/ipf_yy/g' \
-e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
y.tab.c > ${.TARGET}
sed -e 's/yy/ipf_yy/g' \
y.tab.h > ${.TARGET:.c=.h}
ipf_y.h: ipf_y.c
ipf_l.c: lexer.c
sed -e 's/yy/ipf_yy/g' \
-e 's/y.tab.h/ipf_y.h/' \
-e 's/lexer.h/ipf_l.h/' \
${.ALLSRC} > ${.TARGET}
ipf_l.h: lexer.h
sed -e 's/yy/ipf_yy/g' \
${.ALLSRC} > ${.TARGET}
.if defined(RESCUE)
LIBIPF_SRCS!= cd ${.CURDIR}/../libipf && ${MAKE} -V SRCS
SRCS+= ${LIBIPF_SRCS}
.else
DPADD+= ${LIBPCAP}
LDADD+= -lpcap
.endif
.include <bsd.prog.mk>