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