1
2PACKAGE=	ipf
3PROG=		ippool
4SRCS=		${GENHDRS} ippool_y.c ippool_l.c ippool.c
5MAN=		ippool.5 ippool.8
6CFLAGS+=	-I.
7CFLAGS+=	-Wno-error=unused-but-set-variable
8
9GENHDRS=	ippool_l.h ippool_y.h
10CLEANFILES+=	${GENHDRS} ippool_y.c ippool_l.c
11
12ippool_y.c: ippool_y.y
13	${YACC} -d ${.ALLSRC}
14	sed -e 's/yy/ippool_yy/g' \
15	    y.tab.c > ${.TARGET}
16	sed -e 's/yy/ippool_yy/g' \
17	    y.tab.h > ${.TARGET:.c=.h}
18
19ippool_y.h: ippool_y.c
20
21ippool_l.c: lexer.c
22	sed -e 's/yy/ippool_yy/g' \
23	    -e 's/y.tab.h/ippool_y.h/' \
24	    -e 's/lexer.h/ippool_l.h/' \
25	    ${.ALLSRC} > ${.TARGET}
26
27ippool_l.h: lexer.h
28	sed -e 's/yy/ippool_yy/g' \
29	    ${.ALLSRC} > ${.TARGET}
30
31.include <bsd.prog.mk>
32