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