]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - sbin/ipf/ipftest/Makefile
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / sbin / ipf / ipftest / Makefile
1 #       $FreeBSD$
2
3 PROG=           ipftest
4 SRCS=           ${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
10 MAN=            ipftest.1
11
12 WARNS?=         0
13 CFLAGS+=        -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
24 GENHDRS=        ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h
25 DPSRCS+=        ${GENHDRS}
26
27 CLEANFILES+=    ${GENHDRS} 
28 CLEANFILES+=    ipf_y.c ipf_l.c
29 CLEANFILES+=    ipf.tab.c ipf.tab.h
30 CLEANFILES+=    ipnat_y.c ipnat_l.c
31 CLEANFILES+=    ipnat.tab.c ipnat.tab.h
32 CLEANFILES+=    ippool_y.c ippool_l.c
33 CLEANFILES+=    ippool.tab.c ippool.tab.h
34
35 ipnat_y.c: ipnat_y.y
36         ${YACC} -b ipnat -d ${.ALLSRC}
37         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         sed -e 's/yy/ipnat_yy/g' \
42             -e 's/y.tab.h/ipnat_y.h/' \
43             ipnat.tab.h > ${.TARGET:.c=.h}
44
45 ipnat_y.h: ipnat_y.c
46
47 ipnat_l.c: lexer.c
48         sed -e 's/yy/ipnat_yy/g' \
49             -e 's/y.tab.h/ipnat_y.h/' \
50             -e 's/lexer.h/ipnat_l.h/' \
51             ${.ALLSRC} > ${.TARGET}
52
53 ipnat_l.h: lexer.h
54         sed -e 's/yy/ipnat_yy/g' \
55             ${.ALLSRC} > ${.TARGET}
56
57 ippool_y.c: ippool_y.y
58         ${YACC} -b ippool -d ${.ALLSRC}
59         sed -e 's/yy/ippool_yy/g' \
60             -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
61             ippool.tab.c > ${.TARGET}
62         sed -e 's/yy/ippool_yy/g' \
63             ippool.tab.h > ${.TARGET:.c=.h}
64
65 ippool_y.h: ippool_y.c
66
67 ippool_l.c: lexer.c
68         sed -e 's/yy/ippool_yy/g' \
69             -e 's/y.tab.h/ippool_y.h/' \
70             -e 's/lexer.h/ippool_l.h/' \
71             ${.ALLSRC} > ${.TARGET}
72
73 ippool_l.h: lexer.h
74         sed -e 's/yy/ippool_yy/g' \
75             ${.ALLSRC} > ${.TARGET}
76
77 ipf_y.c: ipf_y.y
78         ${YACC} -b ipf -d ${.ALLSRC}
79         sed -e 's/yy/ipf_yy/g' \
80             -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
81                 ipf.tab.c > ${.TARGET}
82         sed -e 's/yy/ipf_yy/g' \
83                 ipf.tab.h > ${.TARGET:.c=.h}
84
85 ipf_y.h: ipf_y.c
86
87 ipf_l.c: lexer.c
88         sed -e 's/yy/ipf_yy/g' \
89              -e 's/y.tab.h/ipf_y.h/' \
90              -e 's/lexer.h/ipf_l.h/' \
91             ${.ALLSRC} > ${.TARGET}
92
93 ipf_l.h: lexer.h
94         sed -e 's/yy/ipf_yy/g' \
95             ${.ALLSRC} > ${.TARGET}
96
97 .include <bsd.prog.mk>