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