1145524Sdarrenr#	$FreeBSD: stable/11/sbin/ipf/ipftest/Makefile 319185 2017-05-30 04:17:22Z ngie $
2145524Sdarrenr
3298107SgjbPACKAGE=	ipf
4145524SdarrenrPROG=		ipftest
5162199SobrienSRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
6255332Scy		ip_nat6.c \
7145524Sdarrenr		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
8145524Sdarrenr		ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
9145524Sdarrenr		ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
10255332Scy		ipf_l.c ipnat_y.c ipnat_l.c md5.c radix_ipf.c ip_dstlist.c
11145524SdarrenrMAN=		ipftest.1
12145524Sdarrenr
13204585SuqsWARNS?=		0
14145524SdarrenrCFLAGS+=	-DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
15255332Scy		-DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
16145524Sdarrenr
17255332Scy# XXX	The original tarball does not define IPFILTER_SCAN when building this
18255332Scy# XXX	and other modules. It is believed the reason is it fails to build.
19255332Scy# XXX	It has been removed for now.
20255332Scy# XXX CFLAGS+=		-DIPFILTER_SCAN
21255332Scy
22255332Scy
23319185Sngie.PATH:		${SRCTOP}/sys/contrib/ipfilter/netinet
24145524Sdarrenr
25162199SobrienGENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
26145524Sdarrenr
27319185SngieCLEANFILES+=	${GENHDRS}
28162199SobrienCLEANFILES+=	ipf_y.c ipf_l.c
29145524SdarrenrCLEANFILES+=	ipf.tab.c ipf.tab.h
30162199SobrienCLEANFILES+=	ipnat_y.c ipnat_l.c
31145524SdarrenrCLEANFILES+=	ipnat.tab.c ipnat.tab.h
32162199SobrienCLEANFILES+=	ippool_y.c ippool_l.c
33145524SdarrenrCLEANFILES+=	ippool.tab.c ippool.tab.h
34145524Sdarrenr
35288477Sbdreweryipnat.tab.c ipnat.tab.h: ipnat_y.y
36145524Sdarrenr	${YACC} -b ipnat -d ${.ALLSRC}
37288477Sbdrewery
38288477Sbdreweryipnat_y.c: ipnat.tab.c
39145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
40145524Sdarrenr	    -e 's/y.tab.c/ipnat_y.c/' \
41145524Sdarrenr	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
42145524Sdarrenr	    ipnat.tab.c > ${.TARGET}
43288477Sbdrewery
44288477Sbdreweryipnat_y.h: ipnat.tab.h
45145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
46145524Sdarrenr	    -e 's/y.tab.h/ipnat_y.h/' \
47288477Sbdrewery	    ipnat.tab.h > ${.TARGET}
48145524Sdarrenr
49145524Sdarrenripnat_y.h: ipnat_y.c
50145524Sdarrenr
51145524Sdarrenripnat_l.c: lexer.c
52145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
53145524Sdarrenr	    -e 's/y.tab.h/ipnat_y.h/' \
54145524Sdarrenr	    -e 's/lexer.h/ipnat_l.h/' \
55145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
56145524Sdarrenr
57145524Sdarrenripnat_l.h: lexer.h
58145524Sdarrenr	sed -e 's/yy/ipnat_yy/g' \
59145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
60145524Sdarrenr
61288477Sbdreweryippool.tab.c ippool.tab.h: ippool_y.y
62145524Sdarrenr	${YACC} -b ippool -d ${.ALLSRC}
63288477Sbdrewery
64288477Sbdreweryippool_y.c: ippool.tab.c
65145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
66145524Sdarrenr	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
67145524Sdarrenr	    ippool.tab.c > ${.TARGET}
68288477Sbdrewery
69288477Sbdreweryippool_y.h: ippool.tab.h
70145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
71288477Sbdrewery	    ippool.tab.h > ${.TARGET}
72145524Sdarrenr
73145524Sdarrenrippool_y.h: ippool_y.c
74145524Sdarrenr
75145524Sdarrenrippool_l.c: lexer.c
76145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
77145524Sdarrenr	    -e 's/y.tab.h/ippool_y.h/' \
78145524Sdarrenr	    -e 's/lexer.h/ippool_l.h/' \
79145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
80145524Sdarrenr
81145524Sdarrenrippool_l.h: lexer.h
82145524Sdarrenr	sed -e 's/yy/ippool_yy/g' \
83145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
84145524Sdarrenr
85288477Sbdreweryipf.tab.c ipf.tab.h: ipf_y.y
86145524Sdarrenr	${YACC} -b ipf -d ${.ALLSRC}
87288477Sbdrewery
88288477Sbdreweryipf_y.c: ipf.tab.c
89145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
90145524Sdarrenr	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
91145524Sdarrenr		ipf.tab.c > ${.TARGET}
92288477Sbdrewery
93288477Sbdreweryipf_y.h: ipf.tab.h
94145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
95288477Sbdrewery		ipf.tab.h > ${.TARGET}
96145524Sdarrenr
97145524Sdarrenripf_y.h: ipf_y.c
98145524Sdarrenr
99145524Sdarrenripf_l.c: lexer.c
100145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
101145524Sdarrenr	     -e 's/y.tab.h/ipf_y.h/' \
102145524Sdarrenr	     -e 's/lexer.h/ipf_l.h/' \
103145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
104145524Sdarrenr
105145524Sdarrenripf_l.h: lexer.h
106145524Sdarrenr	sed -e 's/yy/ipf_yy/g' \
107145524Sdarrenr	    ${.ALLSRC} > ${.TARGET}
108145524Sdarrenr
109145524Sdarrenr.include <bsd.prog.mk>
110