1145524Sdarrenr#	$FreeBSD$
2145524Sdarrenr
3145524SdarrenrPROG=		ipftest
4162199SobrienSRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
5255332Scy		ip_nat6.c \
6145524Sdarrenr		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
7145524Sdarrenr		ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
8145524Sdarrenr		ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
9255332Scy		ipf_l.c ipnat_y.c ipnat_l.c md5.c radix_ipf.c ip_dstlist.c
10145524SdarrenrMAN=		ipftest.1
11145524Sdarrenr
12204585SuqsWARNS?=		0
13145524SdarrenrCFLAGS+=	-DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
14255332Scy		-DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
15145524Sdarrenr
16255332Scy# XXX	The original tarball does not define IPFILTER_SCAN when building this
17255332Scy# XXX	and other modules. It is believed the reason is it fails to build.
18255332Scy# XXX	It has been removed for now.
19255332Scy# XXX CFLAGS+=		-DIPFILTER_SCAN
20255332Scy
21255332Scy
22145555Sdarrenr.PATH:		${.CURDIR}/../../../sys/contrib/ipfilter/netinet
23145524Sdarrenr
24162199SobrienGENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
25145524Sdarrenr
26162199SobrienCLEANFILES+=	${GENHDRS} 
27162199SobrienCLEANFILES+=	ipf_y.c ipf_l.c
28145524SdarrenrCLEANFILES+=	ipf.tab.c ipf.tab.h
29162199SobrienCLEANFILES+=	ipnat_y.c ipnat_l.c
30145524SdarrenrCLEANFILES+=	ipnat.tab.c ipnat.tab.h
31162199SobrienCLEANFILES+=	ippool_y.c ippool_l.c
32145524SdarrenrCLEANFILES+=	ippool.tab.c ippool.tab.h
33145524Sdarrenr
34289639Sbdreweryipnat.tab.c ipnat.tab.h: ipnat_y.y
35145524Sdarrenr	${YACC} -b ipnat -d ${.ALLSRC}
36289639Sbdrewery
37289639Sbdreweryipnat_y.c: ipnat.tab.c
38145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
39145524Sdarrenr	    -e 's/y.tab.c/ipnat_y.c/' \
40145524Sdarrenr	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
41145524Sdarrenr	    ipnat.tab.c > ${.TARGET}
42289639Sbdrewery
43289639Sbdreweryipnat_y.h: ipnat.tab.h
44145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
45145524Sdarrenr	    -e 's/y.tab.h/ipnat_y.h/' \
46289639Sbdrewery	    ipnat.tab.h > ${.TARGET}
47145524Sdarrenr
48145524Sdarrenripnat_y.h: ipnat_y.c
49145524Sdarrenr
50145524Sdarrenripnat_l.c: lexer.c
51145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
52145524Sdarrenr	    -e 's/y.tab.h/ipnat_y.h/' \
53145524Sdarrenr	    -e 's/lexer.h/ipnat_l.h/' \
54145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
55145524Sdarrenr
56145524Sdarrenripnat_l.h: lexer.h
57145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
58145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
59145524Sdarrenr
60289639Sbdreweryippool.tab.c ippool.tab.h: ippool_y.y
61145524Sdarrenr	${YACC} -b ippool -d ${.ALLSRC}
62289639Sbdrewery
63289639Sbdreweryippool_y.c: ippool.tab.c
64145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
65145524Sdarrenr	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
66145524Sdarrenr	    ippool.tab.c > ${.TARGET}
67289639Sbdrewery
68289639Sbdreweryippool_y.h: ippool.tab.h
69145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
70289639Sbdrewery	    ippool.tab.h > ${.TARGET}
71145524Sdarrenr
72145524Sdarrenrippool_y.h: ippool_y.c
73145524Sdarrenr
74145524Sdarrenrippool_l.c: lexer.c
75145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
76145524Sdarrenr	    -e 's/y.tab.h/ippool_y.h/' \
77145524Sdarrenr	    -e 's/lexer.h/ippool_l.h/' \
78145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
79145524Sdarrenr
80145524Sdarrenrippool_l.h: lexer.h
81145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
82145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
83145524Sdarrenr
84289639Sbdreweryipf.tab.c ipf.tab.h: ipf_y.y
85145524Sdarrenr	${YACC} -b ipf -d ${.ALLSRC}
86289639Sbdrewery
87289639Sbdreweryipf_y.c: ipf.tab.c
88145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
89145524Sdarrenr	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
90145524Sdarrenr		ipf.tab.c > ${.TARGET}
91289639Sbdrewery
92289639Sbdreweryipf_y.h: ipf.tab.h
93145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
94289639Sbdrewery		ipf.tab.h > ${.TARGET}
95145524Sdarrenr
96145524Sdarrenripf_y.h: ipf_y.c
97145524Sdarrenr
98145524Sdarrenripf_l.c: lexer.c
99145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
100145524Sdarrenr	     -e 's/y.tab.h/ipf_y.h/' \
101145524Sdarrenr	     -e 's/lexer.h/ipf_l.h/' \
102145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
103145524Sdarrenr
104145524Sdarrenripf_l.h: lexer.h
105145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
106145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
107145524Sdarrenr
108145524Sdarrenr.include <bsd.prog.mk>
109