Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / usr.sbin / ipf / ipftest / Makefile
blob1ac3a77fd675f30b5c825990ef9bae1049a0dd14
1 # $NetBSD: Makefile,v 1.32 2006/05/11 07:07:08 mrg Exp $
3 .include <bsd.own.mk>
5 PROG= ipftest
6 SRCS= ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \
7 ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \
8 ip_pool.c ip_scan.c ip_sync.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.c bpf_filter.c
11 MAN= ipftest.1
13 CPPFLAGS+= -DIPFILTER_LOG -DIPFILTER_LOOKUP \
14 -DIPFILTER_SCAN -DIPFILTER_SYNC -DIPFILTER_CKSUM \
15 -I.
17 COPTS.radix.c= -Wno-error
18 COPTS+= -fno-strict-aliasing
20 .PATH: ${NETBSDSRCDIR}/sys/dist/ipf/netinet
22 DPSRCS+= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
24 CLEANFILES+= ipf_y.c ipf_y.h
25 CLEANFILES+= ipf_l.c ipf_l.h
26 CLEANFILES+= ipf.tab.c ipf.tab.h
27 CLEANFILES+= ipnat_y.c ipnat_y.h
28 CLEANFILES+= ipnat_l.c ipnat_l.h
29 CLEANFILES+= ipnat.tab.c ipnat.tab.h
30 CLEANFILES+= ippool_y.c ippool_y.h
31 CLEANFILES+= ippool_l.c ippool_l.h
32 CLEANFILES+= ippool.tab.c ippool.tab.h
34 ipnat_y.c: ipnat_y.y
35 ${_MKTARGET_CREATE}
36 ${YACC} -b ipnat -d ${.ALLSRC}
37 ${TOOL_SED} -e 's/yy/ipnat_yy/g' \
38 -e 's/y.tab.c/ipnat_y.c/' \
39 -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
40 ipnat.tab.c > ${.TARGET}
41 ${TOOL_SED} -e 's/yy/ipnat_yy/g' \
42 -e 's/y.tab.h/ipnat_y.h/' \
43 ipnat.tab.h > ${.TARGET:.c=.h}
45 ipnat_y.h: ipnat_y.c
47 ipnat_l.c: lexer.c
48 ${_MKTARGET_CREATE}
49 ${TOOL_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}
54 ipnat_l.h: lexer.h
55 ${_MKTARGET_CREATE}
56 ${TOOL_SED} -e 's/yy/ipnat_yy/g' \
57 ${.ALLSRC} > ${.TARGET}
59 ippool_y.c: ippool_y.y
60 ${_MKTARGET_CREATE}
61 ${YACC} -b ippool -d ${.ALLSRC}
62 ${TOOL_SED} -e 's/yy/ippool_yy/g' \
63 -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
64 ippool.tab.c > ${.TARGET}
65 ${TOOL_SED} -e 's/yy/ippool_yy/g' \
66 ippool.tab.h > ${.TARGET:.c=.h}
68 ippool_y.h: ippool_y.c
70 ippool_l.c: lexer.c
71 ${_MKTARGET_CREATE}
72 ${TOOL_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}
77 ippool_l.h: lexer.h
78 ${_MKTARGET_CREATE}
79 ${TOOL_SED} -e 's/yy/ippool_yy/g' \
80 ${.ALLSRC} > ${.TARGET}
82 ipf_y.c: ipf_y.y
83 ${_MKTARGET_CREATE}
84 ${YACC} -b ipf -d ${.ALLSRC}
85 ${TOOL_SED} -e 's/yy/ipf_yy/g' \
86 -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
87 ipf.tab.c > ${.TARGET}
88 ${TOOL_SED} -e 's/yy/ipf_yy/g' \
89 ipf.tab.h > ${.TARGET:.c=.h}
91 ipf_y.h: ipf_y.c
93 ipf_l.c: lexer.c
94 ${_MKTARGET_CREATE}
95 ${TOOL_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}
100 ipf_l.h: lexer.h
101 ${_MKTARGET_CREATE}
102 ${TOOL_SED} -e 's/yy/ipf_yy/g' \
103 ${.ALLSRC} > ${.TARGET}
105 .include <bsd.prog.mk>