]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ipfilter/tools/Makefile
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ipfilter / tools / Makefile
1 YACC=yacc -v
2
3 DEST=.
4
5 all: $(DEST)/ipf_y.c $(DEST)/ipf_y.h $(DEST)/ipf_l.c \
6         $(DEST)/ipmon_y.c $(DEST)/ipmon_y.h $(DEST)/ipmon_l.c \
7         $(DEST)/ipnat_y.c $(DEST)/ipnat_y.h $(DEST)/ipnat_l.c \
8         $(DEST)/ipscan_y.c $(DEST)/ipscan_y.h $(DEST)/ipscan_l.c \
9         $(DEST)/ippool_y.c $(DEST)/ippool_y.h $(DEST)/ippool_l.c \
10         $(DEST)/ipf_l.h $(DEST)/ipnat_l.h $(DEST)/ipscan_l.h \
11         $(DEST)/ippool_l.h $(DEST)/ipmon_l.h
12
13 $(DEST)/ipf_y.h: $(DEST)/ipf_y.c
14
15 $(DEST)/ipf_y.c: ipf_y.y
16         $(YACC) -d ipf_y.y
17         sed -e 's/yy/ipf_yy/g' -e 's/y.tab.h/ipf_y.c/' \
18             -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
19             y.tab.c > $(DEST)/ipf_y.c
20         sed -e 's/yy/ipf_yy/g' -e 's/y.tab.h/ipf_y.h/' y.tab.h > $(DEST)/ipf_y.h
21         /bin/rm -f y.tab.c y.tab.h
22
23 $(DEST)/ipf_l.c: lexer.c
24         sed -e 's/yy/ipf_yy/g' -e 's/y.tab.h/ipf_y.h/' \
25             -e 's/lexer.h/ipf_l.h/' lexer.c > $@
26
27 $(DEST)/ipmon_y.n: $(DEST)/ipmon_y.c
28
29 $(DEST)/ipmon_y.c $(DEST)/ipmon_y.h: ipmon_y.y
30         $(YACC) -d ipmon_y.y
31         sed -e 's/yy/ipmon_yy/g' -e 's/"ipmon_y.y"/"..\/tools\/ipmon_y.y"/' \
32             y.tab.c > $(DEST)/ipmon_y.c
33         sed -e 's/yy/ipmon_yy/g' y.tab.h > $(DEST)/ipmon_y.h
34         /bin/rm -f y.tab.c y.tab.h
35
36 $(DEST)/ipmon_l.c: lexer.c
37         sed -e 's/yy/ipmon_yy/g' -e 's/y.tab.h/ipmon_y.h/' \
38             -e 's/lexer.h/ipmon_l.h/' lexer.c > $@
39
40 $(DEST)/ipscan_y.h: $(DEST)/ipscan_y.c
41
42 $(DEST)/ipscan_y.c $(DEST)/ipscan_y.h: ipscan_y.y
43         $(YACC) -d ipscan_y.y
44         sed -e 's/yy/ipscan_yy/g' \
45             -e 's/"ipscan_y.y"/"..\/tools\/ipscan_y.y"/' \
46             y.tab.c > $(DEST)/ipscan_y.c
47         sed -e 's/yy/ipscan_yy/g' y.tab.h > $(DEST)/ipscan_y.h
48         /bin/rm -f y.tab.c y.tab.h
49
50 $(DEST)/ipscan_l.c: lexer.c
51         sed -e 's/yy/ipscan_yy/g' -e 's/y.tab.h/ipscan_y.h/' \
52             -e 's/lexer.h/ipscan_l.h/' lexer.c > $@
53
54 $(DEST)/ippool_y.h: $(DEST)/ippool_y.c
55
56 $(DEST)/ippool_y.c $(DEST)/ippool_y.h: ippool_y.y
57         $(YACC) -d ippool_y.y
58         sed -e 's/yy/ippool_yy/g' -e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
59             y.tab.c > $(DEST)/ippool_y.c
60         sed -e 's/yy/ippool_yy/g' y.tab.h > $(DEST)/ippool_y.h
61         /bin/rm -f y.tab.c y.tab.h
62
63 $(DEST)/ippool_l.c: lexer.c
64         sed -e 's/yy/ippool_yy/g' -e 's/y.tab.h/ippool_y.h/' \
65             -e 's/lexer.h/ippool_l.h/' lexer.c > $@
66
67 $(DEST)/ipnat_y.h: $(DEST)/ipnat_y.c
68
69 $(DEST)/ipnat_y.c $(DEST)/ipnat_y.h: ipnat_y.y
70         $(YACC) -d ipnat_y.y
71         sed -e 's/yy/ipnat_yy/g' -e 's/y.tab.c/ipnat_y.c/' \
72             -e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
73             y.tab.c > $(DEST)/ipnat_y.c
74         sed -e 's/yy/ipnat_yy/g' -e 's/y.tab.h/ipnat_y.h/' \
75             y.tab.h > $(DEST)/ipnat_y.h
76         /bin/rm -f y.tab.c y.tab.h
77
78 $(DEST)/ipnat_l.c: lexer.c
79         sed -e 's/yy/ipnat_yy/g' -e 's/y.tab.h/ipnat_y.h/' \
80             -e 's/lexer.h/ipnat_l.h/' lexer.c > $@
81
82 $(DEST)/ipf_l.h: lexer.h
83         sed -e 's/yy/ipf_yy/g' lexer.h > $@
84
85 $(DEST)/ipmon_l.h: lexer.h
86         sed -e 's/yy/ipmon_yy/g' lexer.h > $@
87
88 $(DEST)/ipscan_l.h: lexer.h
89         sed -e 's/yy/ipscan_yy/g' lexer.h > $@
90
91 $(DEST)/ippool_l.h: lexer.h
92         sed -e 's/yy/ippool_yy/g' lexer.h > $@
93
94 $(DEST)/ipnat_l.h: lexer.h
95         sed -e 's/yy/ipnat_yy/g' lexer.h > $@
96
97 clean:
98         /bin/rm -f $(DEST)/ipf_y.c $(DEST)/ipf_y.h $(DEST)/ipf_l.c
99         /bin/rm -f $(DEST)/ipmon_y.c $(DEST)/ipmon_y.h $(DEST)/ipmon_l.c
100         /bin/rm -f $(DEST)/ipscan_y.c $(DEST)/ipscan_y.h $(DEST)/ipscan_l.c
101         /bin/rm -f $(DEST)/ippool_y.c $(DEST)/ippool_y.h $(DEST)/ippool_l.c
102         /bin/rm -f $(DEST)/ipnat_y.c $(DEST)/ipnat_y.h $(DEST)/ipnat_l.c
103         /bin/rm -f $(DEST)/ipf_l.h $(DEST)/ipmon_l.h $(DEST)/ippool_l.h
104         /bin/rm -f $(DEST)/ipscan_l.h $(DEST)/ipnat_l.h