5 SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.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
14 CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
15 -DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
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
23 .PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet
25 GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
27 CLEANFILES+= ${GENHDRS}
28 CLEANFILES+= ipf_y.c ipf_l.c
29 CLEANFILES+= ipf.tab.c ipf.tab.h
30 CLEANFILES+= ipnat_y.c ipnat_l.c
31 CLEANFILES+= ipnat.tab.c ipnat.tab.h
32 CLEANFILES+= ippool_y.c ippool_l.c
33 CLEANFILES+= ippool.tab.c ippool.tab.h
35 ipnat.tab.c ipnat.tab.h: ipnat_y.y
36 ${YACC} -b ipnat -d ${.ALLSRC}
38 ipnat_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}
44 ipnat_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}
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}
58 sed -e 's/yy/ipnat_yy/g' \
59 ${.ALLSRC} > ${.TARGET}
61 ippool.tab.c ippool.tab.h: ippool_y.y
62 ${YACC} -b ippool -d ${.ALLSRC}
64 ippool_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}
69 ippool_y.h: ippool.tab.h
70 sed -e 's/yy/ippool_yy/g' \
71 ippool.tab.h > ${.TARGET}
73 ippool_y.h: ippool_y.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}
82 sed -e 's/yy/ippool_yy/g' \
83 ${.ALLSRC} > ${.TARGET}
85 ipf.tab.c ipf.tab.h: ipf_y.y
86 ${YACC} -b ipf -d ${.ALLSRC}
89 sed -e 's/yy/ipf_yy/g' \
90 -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
91 ipf.tab.c > ${.TARGET}
94 sed -e 's/yy/ipf_yy/g' \
95 ipf.tab.h > ${.TARGET}
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}
106 sed -e 's/yy/ipf_yy/g' \
107 ${.ALLSRC} > ${.TARGET}
109 .include <bsd.prog.mk>