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