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