Makefile revision 289639
1#	$FreeBSD: stable/10/sbin/ipf/ipftest/Makefile 289639 2015-10-20 18:23:14Z bdrewery $
2
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:		${.CURDIR}/../../../sys/contrib/ipfilter/netinet
23
24GENHDRS=	ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
25DPSRCS+=	${GENHDRS}
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	    -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
42	    ipnat.tab.c > ${.TARGET}
43
44ipnat_y.h: ipnat.tab.h
45	sed -e 's/yy/ipnat_yy/g' \
46	    -e 's/y.tab.h/ipnat_y.h/' \
47	    ipnat.tab.h > ${.TARGET}
48
49ipnat_y.h: ipnat_y.c
50
51ipnat_l.c: lexer.c
52	sed -e 's/yy/ipnat_yy/g' \
53	    -e 's/y.tab.h/ipnat_y.h/' \
54	    -e 's/lexer.h/ipnat_l.h/' \
55	    ${.ALLSRC} > ${.TARGET}
56
57ipnat_l.h: lexer.h
58	sed -e 's/yy/ipnat_yy/g' \
59	    ${.ALLSRC} > ${.TARGET}
60
61ippool.tab.c ippool.tab.h: ippool_y.y
62	${YACC} -b ippool -d ${.ALLSRC}
63
64ippool_y.c: ippool.tab.c
65	sed -e 's/yy/ippool_yy/g' \
66	    -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
67	    ippool.tab.c > ${.TARGET}
68
69ippool_y.h: ippool.tab.h
70	sed -e 's/yy/ippool_yy/g' \
71	    ippool.tab.h > ${.TARGET}
72
73ippool_y.h: ippool_y.c
74
75ippool_l.c: lexer.c
76	sed -e 's/yy/ippool_yy/g' \
77	    -e 's/y.tab.h/ippool_y.h/' \
78	    -e 's/lexer.h/ippool_l.h/' \
79	    ${.ALLSRC} > ${.TARGET}
80
81ippool_l.h: lexer.h
82	sed -e 's/yy/ippool_yy/g' \
83	    ${.ALLSRC} > ${.TARGET}
84
85ipf.tab.c ipf.tab.h: ipf_y.y
86	${YACC} -b ipf -d ${.ALLSRC}
87
88ipf_y.c: ipf.tab.c
89	sed -e 's/yy/ipf_yy/g' \
90	    -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
91		ipf.tab.c > ${.TARGET}
92
93ipf_y.h: ipf.tab.h
94	sed -e 's/yy/ipf_yy/g' \
95		ipf.tab.h > ${.TARGET}
96
97ipf_y.h: ipf_y.c
98
99ipf_l.c: lexer.c
100	sed -e 's/yy/ipf_yy/g' \
101	     -e 's/y.tab.h/ipf_y.h/' \
102	     -e 's/lexer.h/ipf_l.h/' \
103	    ${.ALLSRC} > ${.TARGET}
104
105ipf_l.h: lexer.h
106	sed -e 's/yy/ipf_yy/g' \
107	    ${.ALLSRC} > ${.TARGET}
108
109.include <bsd.prog.mk>
110