]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - SunOS4/Makefile
Import IP-Filter 5.1.2 into vendor branches using the existing license that
[FreeBSD/FreeBSD.git] / SunOS4 / Makefile
1 #
2 # Copyright (C) 2012 by Darren Reed.
3 #
4 # See the IPFILTER.LICENCE file for details on licencing.
5 #
6 BINDEST=/usr/local/bin
7 SBINDEST=/sbin
8 MANDIR=/usr/share/man
9 CC=/usr/5bin/cc
10 CFLAGS=-I..
11 TOP=..
12 #
13 # For SunOS 4.1.x
14 #
15 DCPU=$(shell uname -m)
16 DCPU:sh=uname -m
17 DEF=-D$(DCPU) -D__$(DCPU)__ -DINET -DKERNEL -D_KERNEL -Dsun $(CPU)
18 IPDEF=$(DEF) -DGATEWAY -DDIRECTED_BROADCAST
19 ATON=-DNEED_INET_ATON
20 DEBUG=-g
21 # For the LKM:
22 LKM=if_ipl.o
23 LOGFAC=-DLOGFAC=LOG_LOCAL0
24 OBJ=.
25 DEST=.
26 TOP=..
27 #
28 MFLAGS="BINDEST=$(BINDEST)" "SBINDEST=$(SBINDEST)" "MANDIR=$(MANDIR)" \
29         'CFLAGS=$(CFLAGS) $(SOLARIS2)' "IPFLKM=$(IPFLKM)" "IPFLOG=$(IPFLOG)" \
30         "LOGFAC=$(LOGFAC)" "POLICY=$(POLICY)" "SOLARIS2=$(SOLARIS2)" \
31         "DEBUG=$(DEBUG)" "DCPU=$(CPU)" "CPUDIR=$(CPUDIR)" \
32         "LOOKUP=$(LOOKUP)" "XID=$(XID)" "SYNC=$(SYNC)" "ALLOPTS=$(ALLOPTS)"
33 LIBS=-L. -lipf
34 #
35 ########## ########## ########## ########## ########## ########## ##########
36 #
37 CP=/bin/cp
38 RM=/bin/rm
39 CHMOD=/bin/chmod
40 INSTALL=install
41 #
42 MODOBJS=ip_fil.o fil.o mls_ipl.o ip_nat.o ip_state.o ip_frag.o ip_proxy.o \
43         ip_auth.o ip_log.o ip_pool.o ip_htable.o ip_lookup.o ip_scan.o \
44         ip_sync.o ip_rules.o \
45         radix_ipf.o md5.o
46 #       ip_trafcon.o
47 DFLAGS=$(IPFLKM) $(IPFLOG) $(DEF) $(LOOKUP) $(XID) $(SYNC)
48 IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o
49 IPFTEST=ipftest.o fil_u.o ip_nat_u.o ip_frag_u.o ip_state_u.o ip_fil_u.o \
50         ip_proxy_u.o ip_auth_u.o ip_pool_u.o ip_htable_u.o ip_lookup_u.o \
51         ip_scan_u.o ip_sync_u.o ip_rules_u.o ip_log_u.o \
52         ippool_y.o ippool_l.o ipf_y.o ipf_l.o ipnat_y.o ipnat_l.o \
53         md5_u.o radix_ipf_u.o
54 #       ip_trafcon_u.o
55 IPNAT=ipnat.o ipnat_y.o ipnat_l.o
56 IPMON=ipmon.o ipmon_y.o ipmon_l.o
57 IPPOOL=ippool_y.o ippool_l.o kmem.o ippool.o
58 IPTRAFCON=iptrafcon.o
59 IPFSTAT=ipfstat.o
60 LIBSRC=$(TOP)/lib
61 TOOL=$(TOP)/tools
62 RANLIB=ranlib
63 AROPTS=cq
64 HERE=SunOS4
65 CCARGS=-I. $(DEBUG) $(CFLAGS)
66 EXTRA=-DIPFILTER_LOG -DIPFILTER_LOOKUP
67
68 include $(TOP)/lib/Makefile
69
70 build all: libipf.a ipf ipfstat ipftest ipmon ipnat ipfs ippool ipscan \
71         ipsyncm ipsyncs if_ipl.o
72         -sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done'
73
74 ipfstat: $(IPFSTAT) libipf.a
75         $(CC) $(CCARGS) $(STATETOP_CFLAGS) $(STATETOP_INC) $(IPFSTAT) \
76         -o $@ $(LIBS) $(STATETOP_LIB) -lkvm
77
78 ipf: $(IPF) libipf.a
79         $(CC) $(CCARGS) $(IPF) -o $@ $(LIBS) -ll -lkvm $(LIBBPF)
80
81 ipfs: ipfs.o
82         $(CC) $(CCARGS) ipfs.o -o $@
83
84 ipsyncm: ipsyncm.o libipf.a
85         $(CC) $(CCARGS) ipsyncm.o -o $@ $(LIBS)
86
87 ipsyncs: ipsyncs.o libipf.a
88         $(CC) $(CCARGS) ipsyncs.o -o $@ $(LIBS)
89
90 ipsyncm.o: $(TOOL)/ipsyncm.c $(TOP)/ip_sync.h
91         $(CC) -DIPFILTER_SYNC $(CCARGS) -c $(TOOL)/ipsyncm.c -o $@
92
93 ipsyncs.o: $(TOOL)/ipsyncs.c $(TOP)/ip_sync.h
94         $(CC) -DIPFILTER_SYNC $(CCARGS) -c $(TOOL)/ipsyncs.c -o $@
95
96 ipftest: $(IPFTEST) libipf.a
97         $(CC) $(CCARGS) $(IPFTEST) -o $@ $(LIBS) -ll -L. $(LIBBPF)
98
99 ipnat: $(IPNAT) libipf.a
100         $(CC) $(CCARGS) $(IPNAT) -o $@ $(LIBS) -lkvm -ll
101
102 tests:
103         (cd test; make )
104
105 ipfs.o: $(TOOL)/ipfs.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_state.h $(TOP)/ip_nat.h
106         $(CC) $(CCARGS) -c $(TOOL)/ipfs.c -o $@
107
108 ipfstat.o: $(TOOL)/ipfstat.c $(TOP)/ip_fil.h $(TOP)/ipf.h
109         $(CC) $(CCARGS) $(STATETOP_CFLAGS) $(STATETOP_INC) \
110         -c $(TOOL)/ipfstat.c -o $@
111
112 fil_u.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h
113         $(CC) $(CCARGS) $(EXTRA) $(IPFBPF) -c $(TOP)/fil.c -o $@
114
115 fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ipl.h
116         $(CC) $(CCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) -c $(TOP)/fil.c -o $@
117
118 ipf.o: $(TOOL)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h
119         $(CC) $(CCARGS) -c $(TOOL)/ipf.c -o $@
120
121 md5.o: $(TOP)/md5.c $(TOP)/md5.h
122         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/md5.c -o $@
123
124 radix_ipf.o: $(TOP)/radix_ipf.c $(TOP)/radix_ipf.h
125         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/radix_ipf.c -o $@
126
127 bpf_filter_u.o: $(TOP)/bpf_filter.c
128         $(CC) $(CCARGS) -c $(TOP)/bpf_filter.c -o $@
129
130 md5_u.o: $(TOP)/md5.c $(TOP)/md5.h
131         $(CC) $(CCARGS) -c $(TOP)/md5.c -o $@
132
133 radix_ipf_u.o: $(TOP)/radix_ipf.c $(TOP)/radix_ipf.h
134         $(CC) $(CCARGS) -c $(TOP)/radix_ipf.c -o $@
135
136 ipfcomp.o: $(TOOL)/ipfcomp.c $(TOP)/ip_fil.h $(TOP)/ipf.h
137         $(CC) $(CCARGS) -c $(TOOL)/ipfcomp.c -o $@
138
139 ipftest.o: $(TOOL)/ipftest.c $(TOP)/ip_fil.h $(TOP)/ipt.h $(TOP)/ipf.h \
140         $(TOP)/ip_lookup.h $(TOP)/ip_pool.h $(TOP)/ip_htable.h
141         $(CC) $(CCARGS) -c $(TOOL)/ipftest.c -o $@
142
143 ipnat.o: $(TOOL)/ipnat.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_nat.h
144         $(CC) $(CCARGS) -c $(TOOL)/ipnat.c -o $@
145
146 if_ipl.o: $(MODOBJS)
147         ld -r $(MODOBJS) -o $(LKM)
148         ${RM} -f if_ipl
149
150 ip_nat.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h
151         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@
152
153 ip_frag.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h
154         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@
155
156 ip_state.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h
157         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@
158
159 ip_scan.o: $(TOP)/ip_scan.c $(TOP)/ip_scan.h $(TOP)/ip_compat.h
160         $(CC) -DIPFILTER_SCAN $(CCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@
161
162 ip_sync.o: $(TOP)/ip_sync.c $(TOP)/ip_sync.h $(TOP)/ip_compat.h
163         $(CC) -DIPFILTER_SYNC $(CCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@
164
165 ip_pool.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_pool.h
166         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@
167
168 ip_htable.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
169         $(TOP)/ip_htable.h
170         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@
171
172 ip_lookup.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
173         $(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h
174         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@
175
176 ip_trafcon.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
177         $(TOP)/ip_trafcon.h
178         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@
179
180 ip_rules.c: ipf $(TOP)/tools/ipfcomp.c $(TOP)/rules/ip_rules
181         ./ipf -cc -nf $(TOP)/rules/ip_rules
182
183 $(TOP)/ip_rules.h: ip_rules.c
184         if [ ! -f $(TOP)/ip_rules.h ] ; then \
185                 /bin/mv -f ip_rules.h $(TOP); \
186         else \
187                 touch $(TOP)/ip_rules.h; \
188         fi
189
190 ip_rules.o: ip_rules.c $(TOP)/ip_rules.h
191         $(CC) -I. $(CFLAGS) $(DFLAGS) -c ip_rules.c -o $@
192
193 ip_proxy.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \
194         $(TOP)/ip_ftp_pxy.c $(TOP)/ip_rcmd_pxy.c $(TOP)/ip_raudio_pxy.c \
195         $(TOP)/ip_rpcb_pxy.c $(TOP)/ip_nat.h
196         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@
197
198 ip_auth.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h
199         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@
200
201 ip_nat_u.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h
202         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_nat.c -o $@
203
204 ip_frag_u.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h
205         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_frag.c -o $@
206
207 ip_rules_u.o: ip_rules.c $(TOP)/ip_rules.h $(TOP)/ip_compat.h
208         $(CC) -DIPFILTER_SCAN $(CCARGS) $(EXTRA) -c ip_rules.c -o $@
209
210 ip_state_u.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h
211         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_state.c -o $@
212
213 ip_scan_u.o: $(TOP)/ip_scan.c $(TOP)/ip_scan.h $(TOP)/ip_compat.h
214         $(CC) -DIPFILTER_SCAN $(CCARGS) $(EXTRA) -c $(TOP)/ip_scan.c -o $@
215
216 ip_sync_u.o: $(TOP)/ip_sync.c $(TOP)/ip_sync.h $(TOP)/ip_compat.h
217         $(CC) -DIPFILTER_SYNC $(CCARGS) $(EXTRA) -c $(TOP)/ip_sync.c -o $@
218
219 ip_pool_u.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
220         $(TOP)/ip_pool.h
221         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_pool.c -o $@
222
223 ip_htable_u.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
224         $(TOP)/ip_htable.h
225         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_htable.c -o $@
226
227 ip_lookup_u.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
228         $(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h
229         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_lookup.c -o $@
230
231 ip_trafcon_u.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
232         $(TOP)/ip_trafcon.h
233         $(CC) $(CCARGS) -c $(TOP)/ip_trafcon.c -o $@
234
235
236 ip_proxy_u.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \
237         $(TOP)/ip_ftp_pxy.c $(TOP)/ip_rcmd_pxy.c $(TOP)/ip_raudio_pxy.c \
238         $(TOP)/ip_rpcb_pxy.c $(TOP)/ip_ipsec_pxy.c $(TOP)/ip_nat.h
239         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_proxy.c -o $@
240
241 ip_auth_u.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h
242         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_auth.c -o $@
243
244 ip_log_u.o: $(TOP)/ip_log.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h
245         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_log.c -o $@
246
247 ip_fil.o: $(TOP)/ip_fil_sunos4.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h \
248                 $(TOP)/ip_nat.h
249         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_fil_sunos4.c -o $@
250
251 ip_log.o: $(TOP)/ip_log.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h
252         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@
253
254 ip_fil_u.o: $(TOP)/ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h
255         $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_fil.c -o $@
256
257 ip_input.o: $(TOP)/ip_input.c $(TOP)/ip_fil.h
258         $(CC) $(CCARGS) $(IPDEF) -c $(TOP)/ip_input.c -o $@
259
260 ip_output.o: $(TOP)/ip_output.c $(TOP)/ip_fil.h
261         $(CC) $(CCARGS) $(IPDEF) -c $(TOP)/ip_output.c -o $@
262
263 mls_ipl.o: $(TOP)/mls_ipl.c $(TOP)/ipl.h
264         -/bin/rm -f $(TOP)/vnode_if.c
265         $(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/mls_ipl.c -o $@
266
267 ipf_y.o: ipf_y.c ipf_y.h $(TOP)/ipf.h ipf_l.h
268         $(CC) $(CCARGS) $(IPFBPF) -c ipf_y.c -o $@
269
270 ipf_l.o: ipf_l.c ipf_y.h $(TOP)/ipf.h
271         $(CC) $(CCARGS) -I. -I$(TOP)/tools -c ipf_l.c -o $@
272
273 ipf_y.h ipf_y.c: $(TOOL)/ipf_y.y $(TOP)/ipf.h
274         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
275
276 ipf_l.c: $(TOOL)/lexer.c $(TOP)/ipf.h
277         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
278
279 ipf_l.h: $(TOOL)/lexer.h
280         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@);
281
282 ipmon: $(IPMON) libipf.a
283         $(CC) $(CCARGS) $(IPMON) -o $@ $(LIBS) -ll
284
285 ipmon.o: $(TOOL)/ipmon.c $(TOP)/ipmon.h $(TOP)/ip_fil.h
286         $(CC) $(CCARGS) $(LOGFAC) -c $(TOOL)/ipmon.c -o $@
287
288 ipmon_y.o: ipmon_y.c ipmon_y.h $(TOP)/ipmon.h ipmon_l.h
289         $(CC) $(CCARGS) -c ipmon_y.c -o $@
290
291 ipmon_l.o: ipmon_l.c ipmon_y.h $(TOP)/ipmon.h ipmon_l.h
292         $(CC) $(CCARGS) -I. -I$(TOP)/tools -c ipmon_l.c -o $@
293
294 ipmon_y.h ipmon_y.c: $(TOOL)/ipmon_y.y $(TOP)/ipmon.h
295         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
296
297 ipmon_l.c: $(TOOL)/lexer.c $(TOP)/ipmon.h
298         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
299
300 ipmon_l.h: $(TOOL)/lexer.h
301         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
302
303 ipscan: ipscan_y.o ipscan_l.o
304         $(CC) $(DEBUG) ipscan_y.o ipscan_l.o -o $@ -ll $(LIBS) -lkvm
305
306 ipscan_y.o: ipscan_y.c ipscan_y.h $(TOP)/ip_scan.h ipscan_l.h
307         $(CC) -DIPFILTER_SCAN $(CCARGS) -c ipscan_y.c -o $@
308
309 ipscan_l.o: ipscan_l.c ipscan_y.h $(TOP)/ip_scan.h ipscan_l.h
310         $(CC) -DIPFILTER_SCAN $(CCARGS) -I. -I$(TOP)/tools -c ipscan_l.c -o $@
311
312 ipscan_y.h ipscan_y.c: $(TOOL)/ipscan_y.y $(TOP)/ip_scan.h
313         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" )
314
315 ipscan_l.c: $(TOOL)/lexer.c $(TOP)/ip_scan.h
316         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
317
318 ipscan_l.h: $(TOOL)/lexer.h
319         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
320
321 ippool: $(IPPOOL) libipf.a
322         $(CC) $(DEBUG) -I. $(CFLAGS) $(IPPOOL) -o $@ -ll -lkvm $(LIBS)
323
324 ippool.o: $(TOOL)/ippool.c $(TOP)/ip_pool.h
325         $(CC) $(CCARGS) -c $(TOOL)/ippool.c -o $@
326
327 ippool_y.o: ippool_y.c ippool_y.h $(TOP)/ip_pool.h ippool_l.h
328         $(CC) $(CCARGS) -c ippool_y.c -o $@
329
330 ippool_l.o: ippool_l.c ippool_y.h $(TOP)/ip_pool.h
331         $(CC) $(CCARGS) -I. -I$(TOP)/tools -c ippool_l.c -o $@
332
333 ippool_y.h ippool_y.c: $(TOOL)/ippool_y.y $(TOP)/ip_pool.h
334         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
335
336 ippool_l.c: $(TOOL)/lexer.c $(TOP)/ip_pool.h
337         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
338
339 ippool_l.h: $(TOOL)/lexer.h
340         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
341
342 ipnat_y.o: ipnat_y.c ipnat_y.h $(TOP)/ip_nat.h ipnat_l.h
343         $(CC) $(CCARGS) -c ipnat_y.c -o $@
344
345 ipnat_l.o: ipnat_l.c ipnat_y.h $(TOP)/ip_nat.h ipnat_l.h
346         $(CC) $(CCARGS) -I. -I$(TOP)/tools -c ipnat_l.c -o $@
347
348 ipnat_y.h ipnat_y.c: $(TOOL)/ipnat_y.y $(TOP)/ip_nat.h
349         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
350
351 ipnat_l.c: $(TOOL)/lexer.c $(TOP)/ip_nat.h
352         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@)
353
354 ipnat_l.h: $(TOOL)/lexer.h
355         (cd $(TOOL); make "DEST=$(TOP)/$(HERE)" $(TOP)/$(HERE)/$@);
356
357 iptrafcon.o: $(TOP)/iptrafcon.c
358         $(CC) $(CCARGS) -c $(TOP)/iptrafcon.c -o $@
359
360 iptrafcon: $(IPTRAFCON) $(OBJ)/libipf.a
361         $(CC) $(CCARGS) $(IPTRAFCON) -o $@ $(LIBS)
362
363 .y.c:
364
365 .l.c:
366
367 clean:
368         ${RM} -f ../ipf ../ipnat ../ipmon ../ippool ../ipftest
369         ${RM} -f ../ipscan ../ipsyncm ../ipsyncs
370         ${RM} -f core *.o *.a ipt ipfstat ipf ipfstat ipftest ipmon
371         ${RM} -f if_ipl ipnat $(LKM)
372         ${RM} -f ip_fil.c ipf_l.c ipf_y.c ipf_y.h ipf_l.h
373         ${RM} -f ipscan ipscan_y.c ipscan_y.h ipscan_l.c ipscan_l.h
374         ${RM} -f ippool ippool_y.c ippool_y.h ippool_l.c ippool_l.h
375         ${RM} -f ipnat_y.c ipnat_y.h ipnat_l.c ipnat_l.h
376         ${RM} -f ipmon_y.c ipmon_y.h ipmon_l.c ipmon_l.h
377         ${RM} -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h
378         ${MAKE} TOP=.. -f Makefile.ipsend clean
379
380
381 install: all $(TOP)/ip_fil.h
382         -$(CP) $(TOP)/ip_fil.h /usr/include/netinet/ip_fil.h
383         -$(CHMOD) 444 /usr/include/netinet/ip_fil.h
384         -$(INSTALL) -cs -g wheel -m 755 -o root ipf $(SBINDEST)
385         -$(INSTALL) -cs -g wheel -m 755 -o root ipfs $(SBINDEST)
386         -$(INSTALL) -cs -g wheel -m 755 -o root ipnat $(SBINDEST)
387         -$(INSTALL) -cs -g wheel -m 755 -o root ipftest $(BINDEST)
388         -$(INSTALL) -cs -g wheel -m 755 -o root ipfstat $(SBINDEST)
389         -$(INSTALL) -cs -g wheel -m 755 -o root ipmon $(BINDEST)
390         -$(INSTALL) -cs -g wheel -m 755 -o root ipscan $(BINDEST)
391         (cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd ..)