Makefile revision 285830
190075Sobrien#	$FreeBSD: releng/10.2/sbin/ipf/ipftest/Makefile 255332 2013-09-06 23:11:19Z cy $
290075Sobrien
390075SobrienPROG=		ipftest
4169689SkanSRCS=		${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
5132718Skan		ip_nat6.c \
690075Sobrien		ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
790075Sobrien		ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
890075Sobrien		ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
990075Sobrien		ipf_l.c ipnat_y.c ipnat_l.c md5.c radix_ipf.c ip_dstlist.c
1090075SobrienMAN=		ipftest.1
1190075Sobrien
1290075SobrienWARNS?=		0
1390075SobrienCFLAGS+=	-DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
1490075Sobrien		-DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
1590075Sobrien
1690075Sobrien# XXX	The original tarball does not define IPFILTER_SCAN when building this
1790075Sobrien# XXX	and other modules. It is believed the reason is it fails to build.
1890075Sobrien# XXX	It has been removed for now.
1990075Sobrien# XXX CFLAGS+=		-DIPFILTER_SCAN
2090075Sobrien
2190075Sobrien
2290075Sobrien.PATH:		${.CURDIR}/../../../sys/contrib/ipfilter/netinet
2390075Sobrien
2490075SobrienGENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
2590075SobrienDPSRCS+=	${GENHDRS}
2690075Sobrien
2790075SobrienCLEANFILES+=	${GENHDRS} 
28169689SkanCLEANFILES+=	ipf_y.c ipf_l.c
29169689SkanCLEANFILES+=	ipf.tab.c ipf.tab.h
3090075SobrienCLEANFILES+=	ipnat_y.c ipnat_l.c
3190075SobrienCLEANFILES+=	ipnat.tab.c ipnat.tab.h
3290075SobrienCLEANFILES+=	ippool_y.c ippool_l.c
3390075SobrienCLEANFILES+=	ippool.tab.c ippool.tab.h
3490075Sobrien
3590075Sobrienipnat_y.c: ipnat_y.y
3690075Sobrien	${YACC} -b ipnat -d ${.ALLSRC}
3790075Sobrien	sed -e 's/yy/ipnat_yy/g' \
3890075Sobrien	    -e 's/y.tab.c/ipnat_y.c/' \
3990075Sobrien	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
4090075Sobrien	    ipnat.tab.c > ${.TARGET}
4190075Sobrien	sed -e 's/yy/ipnat_yy/g' \
4290075Sobrien	    -e 's/y.tab.h/ipnat_y.h/' \
4390075Sobrien	    ipnat.tab.h > ${.TARGET:.c=.h}
4490075Sobrien
4590075Sobrienipnat_y.h: ipnat_y.c
4690075Sobrien
4790075Sobrienipnat_l.c: lexer.c
4890075Sobrien	sed -e 's/yy/ipnat_yy/g' \
4990075Sobrien	    -e 's/y.tab.h/ipnat_y.h/' \
5090075Sobrien	    -e 's/lexer.h/ipnat_l.h/' \
5190075Sobrien	    ${.ALLSRC} > ${.TARGET}
5290075Sobrien
5390075Sobrienipnat_l.h: lexer.h
5490075Sobrien	sed -e 's/yy/ipnat_yy/g' \
55132718Skan	    ${.ALLSRC} > ${.TARGET}
5690075Sobrien
5790075Sobrienippool_y.c: ippool_y.y
5890075Sobrien	${YACC} -b ippool -d ${.ALLSRC}
5990075Sobrien	sed -e 's/yy/ippool_yy/g' \
60132718Skan	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
6190075Sobrien	    ippool.tab.c > ${.TARGET}
6290075Sobrien	sed -e 's/yy/ippool_yy/g' \
63169689Skan	    ippool.tab.h > ${.TARGET:.c=.h}
6490075Sobrien
65132718Skanippool_y.h: ippool_y.c
66132718Skan
67132718Skanippool_l.c: lexer.c
68132718Skan	sed -e 's/yy/ippool_yy/g' \
69132718Skan	    -e 's/y.tab.h/ippool_y.h/' \
70132718Skan	    -e 's/lexer.h/ippool_l.h/' \
71132718Skan	    ${.ALLSRC} > ${.TARGET}
72132718Skan
73132718Skanippool_l.h: lexer.h
74132718Skan	sed -e 's/yy/ippool_yy/g' \
75132718Skan	    ${.ALLSRC} > ${.TARGET}
76132718Skan
77169689Skanipf_y.c: ipf_y.y
78169689Skan	${YACC} -b ipf -d ${.ALLSRC}
79132718Skan	sed -e 's/yy/ipf_yy/g' \
80132718Skan	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
81132718Skan		ipf.tab.c > ${.TARGET}
82132718Skan	sed -e 's/yy/ipf_yy/g' \
83169689Skan		ipf.tab.h > ${.TARGET:.c=.h}
84169689Skan
85169689Skanipf_y.h: ipf_y.c
86169689Skan
87169689Skanipf_l.c: lexer.c
88169689Skan	sed -e 's/yy/ipf_yy/g' \
89132718Skan	     -e 's/y.tab.h/ipf_y.h/' \
90169689Skan	     -e 's/lexer.h/ipf_l.h/' \
91169689Skan	    ${.ALLSRC} > ${.TARGET}
92169689Skan
93132718Skanipf_l.h: lexer.h
94169689Skan	sed -e 's/yy/ipf_yy/g' \
95132718Skan	    ${.ALLSRC} > ${.TARGET}
96169689Skan
97132718Skan.include <bsd.prog.mk>
98132718Skan