xref: /netbsd-src/external/bsd/ipf/bin/ipnat/Makefile (revision 8e2bdc9a647194cb75140a767b1531c1ff0acd1e)
1#	$NetBSD: Makefile,v 1.1 2012/03/23 21:29:45 christos Exp $
2
3PROG=		ipnat
4SRCS=		ipnat.c ipnat_y.c ipnat_l.c
5MAN=		ipnat.8 ipnat.4 ipnat.5
6MLINKS=		ipnat.5 ipnat.conf.5
7CPPFLAGS+=	-I.
8
9DPSRCS+=	ipnat_l.h ipnat_y.h
10
11CLEANFILES+=	ipnat_y.c ipnat_y.h
12CLEANFILES+=	ipnat_l.c ipnat_l.h
13
14ipnat_y.c: ipnat_y.y
15	${_MKTARGET_CREATE}
16	${YACC} -d ${.ALLSRC}
17	${TOOL_SED} -e 's/yy/ipnat_yy/g' \
18	    -e 's/y.tab.c/ipnat_y.c/' \
19	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
20	    y.tab.c > ${.TARGET}
21	${TOOL_SED} -e 's/yy/ipnat_yy/g' \
22	    -e 's/y.tab.h/ipnat_y.h/' \
23	    y.tab.h > ${.TARGET:.c=.h}
24
25ipnat_y.h: ipnat_y.c
26
27ipnat_l.c: lexer.c
28	${_MKTARGET_CREATE}
29	${TOOL_SED} -e 's/yy/ipnat_yy/g' \
30	    -e 's/y.tab.h/ipnat_y.h/' \
31	    -e 's/lexer.h/ipnat_l.h/' \
32	    ${.ALLSRC} > ${.TARGET}
33
34ipnat_l.h: lexer.h
35	${_MKTARGET_CREATE}
36	${TOOL_SED} -e 's/yy/ipnat_yy/g' \
37	    ${.ALLSRC} > ${.TARGET}
38
39.include <bsd.prog.mk>
40