xref: /freebsd/sbin/ipf/ipmon/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1PACKAGE=	ipf
2PROG=		ipmon
3SRCS=		${GENHDRS} ipmon.c ipmon_y.c ipmon_l.c
4MAN=		ipmon.5 ipmon.8
5MLINKS=		ipmon.5 ipmon.conf.5
6
7CFLAGS+=	-DLOGFAC=LOG_LOCAL0 -I.
8CFLAGS+=	-Wno-error=unused-but-set-variable
9
10GENHDRS+=	ipmon_l.h ipmon_y.h
11CLEANFILES+=	${GENHDRS} ipmon_y.c ipmon_l.c
12
13ipmon_y.c: ipmon_y.y
14	${YACC} -d ${.ALLSRC}
15	sed -e 's/yy/ipmon_yy/g' \
16	    y.tab.c > ${.TARGET}
17	sed -e 's/yy/ipmon_yy/g' \
18	    y.tab.h > ${.TARGET:.c=.h}
19
20ipmon_y.h: ipmon_y.c
21
22ipmon_l.c: lexer.c
23	sed -e 's/yy/ipmon_yy/g' \
24	    -e 's/y.tab.h/ipmon_y.h/' \
25	    -e 's/lexer.h/ipmon_l.h/' \
26	    ${.ALLSRC} > ${.TARGET}
27
28ipmon_l.h: lexer.h
29	sed -e 's/yy/ipmon_yy/g' \
30	    ${.ALLSRC} > ${.TARGET}
31
32.include <bsd.prog.mk>
33