2005-04-25 18:55:52 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PROG= ipftest
|
2006-09-10 08:58:47 +00:00
|
|
|
SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
|
2013-09-06 23:11:19 +00:00
|
|
|
ip_nat6.c \
|
2005-04-25 18:55:52 +00:00
|
|
|
ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
|
|
|
|
ip_pool.c ip_scan.c ip_sync.c ip_rules.c \
|
|
|
|
ip_fil.c ip_log.c ippool_y.c ippool_l.c ipf_y.c \
|
2013-09-06 23:11:19 +00:00
|
|
|
ipf_l.c ipnat_y.c ipnat_l.c md5.c radix_ipf.c ip_dstlist.c
|
2005-04-25 18:55:52 +00:00
|
|
|
MAN= ipftest.1
|
|
|
|
|
2010-03-02 16:58:04 +00:00
|
|
|
WARNS?= 0
|
2005-04-25 18:55:52 +00:00
|
|
|
CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPILED -DIPFILTER_LOOKUP \
|
2013-09-06 23:11:19 +00:00
|
|
|
-DIPFILTER_SYNC -DIPFILTER_CKSUM -DHAS_SYS_MD5_H -I.
|
|
|
|
|
|
|
|
# XXX The original tarball does not define IPFILTER_SCAN when building this
|
|
|
|
# XXX and other modules. It is believed the reason is it fails to build.
|
|
|
|
# XXX It has been removed for now.
|
|
|
|
# XXX CFLAGS+= -DIPFILTER_SCAN
|
|
|
|
|
2005-04-25 18:55:52 +00:00
|
|
|
|
2005-04-26 15:35:50 +00:00
|
|
|
.PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet
|
2005-04-25 18:55:52 +00:00
|
|
|
|
2006-09-10 08:58:47 +00:00
|
|
|
GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
|
|
|
|
DPSRCS+= ${GENHDRS}
|
2005-04-25 18:55:52 +00:00
|
|
|
|
2006-09-10 08:58:47 +00:00
|
|
|
CLEANFILES+= ${GENHDRS}
|
|
|
|
CLEANFILES+= ipf_y.c ipf_l.c
|
2005-04-25 18:55:52 +00:00
|
|
|
CLEANFILES+= ipf.tab.c ipf.tab.h
|
2006-09-10 08:58:47 +00:00
|
|
|
CLEANFILES+= ipnat_y.c ipnat_l.c
|
2005-04-25 18:55:52 +00:00
|
|
|
CLEANFILES+= ipnat.tab.c ipnat.tab.h
|
2006-09-10 08:58:47 +00:00
|
|
|
CLEANFILES+= ippool_y.c ippool_l.c
|
2005-04-25 18:55:52 +00:00
|
|
|
CLEANFILES+= ippool.tab.c ippool.tab.h
|
|
|
|
|
|
|
|
ipnat_y.c: ipnat_y.y
|
|
|
|
${YACC} -b ipnat -d ${.ALLSRC}
|
|
|
|
sed -e 's/yy/ipnat_yy/g' \
|
|
|
|
-e 's/y.tab.c/ipnat_y.c/' \
|
|
|
|
-e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
|
|
|
|
ipnat.tab.c > ${.TARGET}
|
|
|
|
sed -e 's/yy/ipnat_yy/g' \
|
|
|
|
-e 's/y.tab.h/ipnat_y.h/' \
|
|
|
|
ipnat.tab.h > ${.TARGET:.c=.h}
|
|
|
|
|
|
|
|
ipnat_y.h: ipnat_y.c
|
|
|
|
|
|
|
|
ipnat_l.c: lexer.c
|
|
|
|
sed -e 's/yy/ipnat_yy/g' \
|
|
|
|
-e 's/y.tab.h/ipnat_y.h/' \
|
|
|
|
-e 's/lexer.h/ipnat_l.h/' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
ipnat_l.h: lexer.h
|
|
|
|
sed -e 's/yy/ipnat_yy/g' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
ippool_y.c: ippool_y.y
|
|
|
|
${YACC} -b ippool -d ${.ALLSRC}
|
|
|
|
sed -e 's/yy/ippool_yy/g' \
|
|
|
|
-e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
|
|
|
|
ippool.tab.c > ${.TARGET}
|
|
|
|
sed -e 's/yy/ippool_yy/g' \
|
|
|
|
ippool.tab.h > ${.TARGET:.c=.h}
|
|
|
|
|
|
|
|
ippool_y.h: ippool_y.c
|
|
|
|
|
|
|
|
ippool_l.c: lexer.c
|
|
|
|
sed -e 's/yy/ippool_yy/g' \
|
|
|
|
-e 's/y.tab.h/ippool_y.h/' \
|
|
|
|
-e 's/lexer.h/ippool_l.h/' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
ippool_l.h: lexer.h
|
|
|
|
sed -e 's/yy/ippool_yy/g' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
ipf_y.c: ipf_y.y
|
|
|
|
${YACC} -b ipf -d ${.ALLSRC}
|
|
|
|
sed -e 's/yy/ipf_yy/g' \
|
|
|
|
-e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
|
|
|
|
ipf.tab.c > ${.TARGET}
|
|
|
|
sed -e 's/yy/ipf_yy/g' \
|
|
|
|
ipf.tab.h > ${.TARGET:.c=.h}
|
|
|
|
|
|
|
|
ipf_y.h: ipf_y.c
|
|
|
|
|
|
|
|
ipf_l.c: lexer.c
|
|
|
|
sed -e 's/yy/ipf_yy/g' \
|
|
|
|
-e 's/y.tab.h/ipf_y.h/' \
|
|
|
|
-e 's/lexer.h/ipf_l.h/' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
ipf_l.h: lexer.h
|
|
|
|
sed -e 's/yy/ipf_yy/g' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|