4 SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
6 ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
7 ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
8 ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
9 ipf_l.c ipnat_y.c ipnat_l.c md5.c radix_ipf.c ip_dstlist.c
13 CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
14 -DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
16 # XXX The original tarball does not define IPFILTER_SCAN when building this
17 # XXX and other modules. It is believed the reason is it fails to build.
18 # XXX It has been removed for now.
19 # XXX CFLAGS+= -DIPFILTER_SCAN
22 .PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet
24 GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
26 CLEANFILES+= ${GENHDRS}
27 CLEANFILES+= ipf_y.c ipf_l.c
28 CLEANFILES+= ipf.tab.c ipf.tab.h
29 CLEANFILES+= ipnat_y.c ipnat_l.c
30 CLEANFILES+= ipnat.tab.c ipnat.tab.h
31 CLEANFILES+= ippool_y.c ippool_l.c
32 CLEANFILES+= ippool.tab.c ippool.tab.h
34 ipnat.tab.c ipnat.tab.h: ipnat_y.y
35 ${YACC} -b ipnat -d ${.ALLSRC}
37 ipnat_y.c: ipnat.tab.c
38 sed -e 's/yy/ipnat_yy/g' \
39 -e 's/y.tab.c/ipnat_y.c/' \
40 -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
41 ipnat.tab.c > ${.TARGET}
43 ipnat_y.h: ipnat.tab.h
44 sed -e 's/yy/ipnat_yy/g' \
45 -e 's/y.tab.h/ipnat_y.h/' \
46 ipnat.tab.h > ${.TARGET}
51 sed -e 's/yy/ipnat_yy/g' \
52 -e 's/y.tab.h/ipnat_y.h/' \
53 -e 's/lexer.h/ipnat_l.h/' \
54 ${.ALLSRC} > ${.TARGET}
57 sed -e 's/yy/ipnat_yy/g' \
58 ${.ALLSRC} > ${.TARGET}
60 ippool.tab.c ippool.tab.h: ippool_y.y
61 ${YACC} -b ippool -d ${.ALLSRC}
63 ippool_y.c: ippool.tab.c
64 sed -e 's/yy/ippool_yy/g' \
65 -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
66 ippool.tab.c > ${.TARGET}
68 ippool_y.h: ippool.tab.h
69 sed -e 's/yy/ippool_yy/g' \
70 ippool.tab.h > ${.TARGET}
72 ippool_y.h: ippool_y.c
75 sed -e 's/yy/ippool_yy/g' \
76 -e 's/y.tab.h/ippool_y.h/' \
77 -e 's/lexer.h/ippool_l.h/' \
78 ${.ALLSRC} > ${.TARGET}
81 sed -e 's/yy/ippool_yy/g' \
82 ${.ALLSRC} > ${.TARGET}
84 ipf.tab.c ipf.tab.h: ipf_y.y
85 ${YACC} -b ipf -d ${.ALLSRC}
88 sed -e 's/yy/ipf_yy/g' \
89 -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
90 ipf.tab.c > ${.TARGET}
93 sed -e 's/yy/ipf_yy/g' \
94 ipf.tab.h > ${.TARGET}
99 sed -e 's/yy/ipf_yy/g' \
100 -e 's/y.tab.h/ipf_y.h/' \
101 -e 's/lexer.h/ipf_l.h/' \
102 ${.ALLSRC} > ${.TARGET}
105 sed -e 's/yy/ipf_yy/g' \
106 ${.ALLSRC} > ${.TARGET}
108 .include <bsd.prog.mk>