1# $FreeBSD$ 2 3PACKAGE= ipf 4PROG= ipftest 5SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \ 6 ip_nat6.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_ipf.c ip_dstlist.c 11MAN= ipftest.1 12 13WARNS?= 0 14CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \ 15 -DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I. 16 17# XXX The original tarball does not define IPFILTER_SCAN when building this 18# XXX and other modules. It is believed the reason is it fails to build. 19# XXX It has been removed for now. 20# XXX CFLAGS+= -DIPFILTER_SCAN 21 22 23.PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet 24 25GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h 26 27CLEANFILES+= ${GENHDRS} 28CLEANFILES+= ipf_y.c ipf_l.c 29CLEANFILES+= ipf.tab.c ipf.tab.h 30CLEANFILES+= ipnat_y.c ipnat_l.c 31CLEANFILES+= ipnat.tab.c ipnat.tab.h 32CLEANFILES+= ippool_y.c ippool_l.c 33CLEANFILES+= ippool.tab.c ippool.tab.h 34 35ipnat.tab.c ipnat.tab.h: ipnat_y.y 36 ${YACC} -b ipnat -d ${.ALLSRC} 37 38ipnat_y.c: ipnat.tab.c 39 sed -e 's/yy/ipnat_yy/g' \ 40 -e 's/y.tab.c/ipnat_y.c/' \ 41 -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \ 42 ipnat.tab.c > ${.TARGET} 43 44ipnat_y.h: ipnat.tab.h 45 sed -e 's/yy/ipnat_yy/g' \ 46 -e 's/y.tab.h/ipnat_y.h/' \ 47 ipnat.tab.h > ${.TARGET} 48 49ipnat_y.h: ipnat_y.c 50 51ipnat_l.c: lexer.c 52 sed -e 's/yy/ipnat_yy/g' \ 53 -e 's/y.tab.h/ipnat_y.h/' \ 54 -e 's/lexer.h/ipnat_l.h/' \ 55 ${.ALLSRC} > ${.TARGET} 56 57ipnat_l.h: lexer.h 58 sed -e 's/yy/ipnat_yy/g' \ 59 ${.ALLSRC} > ${.TARGET} 60 61ippool.tab.c ippool.tab.h: ippool_y.y 62 ${YACC} -b ippool -d ${.ALLSRC} 63 64ippool_y.c: ippool.tab.c 65 sed -e 's/yy/ippool_yy/g' \ 66 -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \ 67 ippool.tab.c > ${.TARGET} 68 69ippool_y.h: ippool.tab.h 70 sed -e 's/yy/ippool_yy/g' \ 71 ippool.tab.h > ${.TARGET} 72 73ippool_y.h: ippool_y.c 74 75ippool_l.c: lexer.c 76 sed -e 's/yy/ippool_yy/g' \ 77 -e 's/y.tab.h/ippool_y.h/' \ 78 -e 's/lexer.h/ippool_l.h/' \ 79 ${.ALLSRC} > ${.TARGET} 80 81ippool_l.h: lexer.h 82 sed -e 's/yy/ippool_yy/g' \ 83 ${.ALLSRC} > ${.TARGET} 84 85ipf.tab.c ipf.tab.h: ipf_y.y 86 ${YACC} -b ipf -d ${.ALLSRC} 87 88ipf_y.c: ipf.tab.c 89 sed -e 's/yy/ipf_yy/g' \ 90 -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \ 91 ipf.tab.c > ${.TARGET} 92 93ipf_y.h: ipf.tab.h 94 sed -e 's/yy/ipf_yy/g' \ 95 ipf.tab.h > ${.TARGET} 96 97ipf_y.h: ipf_y.c 98 99ipf_l.c: lexer.c 100 sed -e 's/yy/ipf_yy/g' \ 101 -e 's/y.tab.h/ipf_y.h/' \ 102 -e 's/lexer.h/ipf_l.h/' \ 103 ${.ALLSRC} > ${.TARGET} 104 105ipf_l.h: lexer.h 106 sed -e 's/yy/ipf_yy/g' \ 107 ${.ALLSRC} > ${.TARGET} 108 109.include <bsd.prog.mk> 110