xref: /freebsd/sbin/ipf/ipftest/Makefile (revision 35a04710d7286aa9538917fd7f8e417dbee95b82)
1#	$FreeBSD$
2
3WARNS=0
4
5PROG=		ipftest
6SRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
7		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
8		ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
9		ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
10		ipf_l.c ipnat_y.c ipnat_l.c md5.c radix.c bpf_filter.c
11MAN=		ipftest.1
12
13CFLAGS+=	-DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
14		-DIPFILTER_SCAN -DIPFILTER_SYNC -DIPFILTER_CKSUM -I.
15
16.PATH:		${.CURDIR}/../../../sys/contrib/ipfilter/netinet
17
18GENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
19DPSRCS+=	${GENHDRS}
20
21CLEANFILES+=	${GENHDRS}
22CLEANFILES+=	ipf_y.c ipf_l.c
23CLEANFILES+=	ipf.tab.c ipf.tab.h
24CLEANFILES+=	ipnat_y.c ipnat_l.c
25CLEANFILES+=	ipnat.tab.c ipnat.tab.h
26CLEANFILES+=	ippool_y.c ippool_l.c
27CLEANFILES+=	ippool.tab.c ippool.tab.h
28
29ipnat_y.c: ipnat_y.y
30	${YACC} -b ipnat -d ${.ALLSRC}
31	sed -e 's/yy/ipnat_yy/g' \
32	    -e 's/y.tab.c/ipnat_y.c/' \
33	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
34	    ipnat.tab.c > ${.TARGET}
35	sed -e 's/yy/ipnat_yy/g' \
36	    -e 's/y.tab.h/ipnat_y.h/' \
37	    ipnat.tab.h > ${.TARGET:.c=.h}
38
39ipnat_y.h: ipnat_y.c
40
41ipnat_l.c: lexer.c
42	sed -e 's/yy/ipnat_yy/g' \
43	    -e 's/y.tab.h/ipnat_y.h/' \
44	    -e 's/lexer.h/ipnat_l.h/' \
45	    ${.ALLSRC} > ${.TARGET}
46
47ipnat_l.h: lexer.h
48	sed -e 's/yy/ipnat_yy/g' \
49	    ${.ALLSRC} > ${.TARGET}
50
51ippool_y.c: ippool_y.y
52	${YACC} -b ippool -d ${.ALLSRC}
53	sed -e 's/yy/ippool_yy/g' \
54	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
55	    ippool.tab.c > ${.TARGET}
56	sed -e 's/yy/ippool_yy/g' \
57	    ippool.tab.h > ${.TARGET:.c=.h}
58
59ippool_y.h: ippool_y.c
60
61ippool_l.c: lexer.c
62	sed -e 's/yy/ippool_yy/g' \
63	    -e 's/y.tab.h/ippool_y.h/' \
64	    -e 's/lexer.h/ippool_l.h/' \
65	    ${.ALLSRC} > ${.TARGET}
66
67ippool_l.h: lexer.h
68	sed -e 's/yy/ippool_yy/g' \
69	    ${.ALLSRC} > ${.TARGET}
70
71ipf_y.c: ipf_y.y
72	${YACC} -b ipf -d ${.ALLSRC}
73	sed -e 's/yy/ipf_yy/g' \
74	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
75		ipf.tab.c > ${.TARGET}
76	sed -e 's/yy/ipf_yy/g' \
77		ipf.tab.h > ${.TARGET:.c=.h}
78
79ipf_y.h: ipf_y.c
80
81ipf_l.c: lexer.c
82	sed -e 's/yy/ipf_yy/g' \
83	     -e 's/y.tab.h/ipf_y.h/' \
84	     -e 's/lexer.h/ipf_l.h/' \
85	    ${.ALLSRC} > ${.TARGET}
86
87ipf_l.h: lexer.h
88	sed -e 's/yy/ipf_yy/g' \
89	    ${.ALLSRC} > ${.TARGET}
90
91.include <bsd.prog.mk>
92