xref: /freebsd-13.1/contrib/ipfilter/lib/Makefile (revision 4e39c44e)
1INCDEP=$(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ipf.h
2
3LIBOBJS=$(DEST)/addicmp.o \
4     $(DEST)/addipopt.o \
5     $(DEST)/bcopywrap.o \
6     $(DEST)/binprint.o \
7     $(DEST)/buildopts.o \
8     $(DEST)/checkrev.o \
9     $(DEST)/count6bits.o \
10     $(DEST)/count4bits.o \
11     $(DEST)/debug.o \
12     $(DEST)/extras.o \
13     $(DEST)/facpri.o \
14     $(DEST)/flags.o \
15     $(DEST)/fill6bits.o \
16     $(DEST)/genmask.o \
17     $(DEST)/gethost.o \
18     $(DEST)/getifname.o \
19     $(DEST)/getline.o \
20     $(DEST)/getnattype.o \
21     $(DEST)/getport.o \
22     $(DEST)/getportproto.o \
23     $(DEST)/getproto.o \
24     $(DEST)/getsumd.o \
25     $(DEST)/hexdump.o \
26     $(DEST)/hostmask.o \
27     $(DEST)/hostname.o \
28     $(DEST)/hostnum.o \
29     $(DEST)/icmpcode.o \
30     $(DEST)/inet_addr.o \
31     $(DEST)/initparse.o \
32     $(DEST)/ionames.o \
33     $(DEST)/ipoptsec.o \
34     $(DEST)/ipf_dotuning.o \
35     $(DEST)/ipft_ef.o \
36     $(DEST)/ipft_hx.o \
37     $(DEST)/ipft_pc.o \
38     $(DEST)/ipft_sn.o \
39     $(DEST)/ipft_td.o \
40     $(DEST)/ipft_tx.o \
41     $(DEST)/kmem.o \
42     $(DEST)/kmemcpywrap.o \
43     $(DEST)/kvatoname.o \
44     $(DEST)/load_hash.o \
45     $(DEST)/load_hashnode.o \
46     $(DEST)/load_pool.o \
47     $(DEST)/load_poolnode.o \
48     $(DEST)/loglevel.o \
49     $(DEST)/mutex_emul.o \
50     $(DEST)/nametokva.o \
51     $(DEST)/nat_setgroupmap.o \
52     $(DEST)/ntomask.o \
53     $(DEST)/optname.o \
54     $(DEST)/optprint.o \
55     $(DEST)/optprintv6.o \
56     $(DEST)/optvalue.o \
57     $(DEST)/portname.o \
58     $(DEST)/portnum.o \
59     $(DEST)/ports.o \
60     $(DEST)/print_toif.o \
61     $(DEST)/printactivenat.o \
62     $(DEST)/printaps.o \
63     $(DEST)/printbuf.o \
64     $(DEST)/printhash.o \
65     $(DEST)/printhashnode.o \
66     $(DEST)/printip.o \
67     $(DEST)/printpool.o \
68     $(DEST)/printpoolnode.o \
69     $(DEST)/printproto.o \
70     $(DEST)/printfr.o \
71     $(DEST)/printfraginfo.o \
72     $(DEST)/printhostmap.o \
73     $(DEST)/printifname.o \
74     $(DEST)/printhostmask.o \
75     $(DEST)/printlog.o \
76     $(DEST)/printmask.o \
77     $(DEST)/printnat.o \
78     $(DEST)/printportcmp.o \
79     $(DEST)/printpacket.o \
80     $(DEST)/printpacket6.o \
81     $(DEST)/printsbuf.o \
82     $(DEST)/printstate.o \
83     $(DEST)/printtunable.o \
84     $(DEST)/ratoi.o \
85     $(DEST)/ratoui.o \
86     $(DEST)/remove_hash.o \
87     $(DEST)/remove_hashnode.o \
88     $(DEST)/remove_pool.o \
89     $(DEST)/remove_poolnode.o \
90     $(DEST)/resetlexer.o \
91     $(DEST)/rwlock_emul.o \
92     $(DEST)/tcpflags.o \
93     $(DEST)/tcp_flags.o \
94     $(DEST)/to_interface.o \
95     $(DEST)/var.o \
96     $(DEST)/verbose.o \
97     $(DEST)/v6ionames.o \
98     $(DEST)/v6optvalue.o
99
100$(DEST)/libipf.a: $(LIBOBJS)
101	/bin/rm -f $@
102	ar $(AROPTS) $@ $(LIBOBJS)
103	$(RANLIB) $@
104
105$(DEST)/addicmp.o: $(LIBSRC)/addicmp.c $(INCDEP)
106	$(CC) $(CCARGS) -c $(LIBSRC)/addicmp.c -o $@
107$(DEST)/addipopt.o: $(LIBSRC)/addipopt.c $(INCDEP)
108	$(CC) $(CCARGS) -c $(LIBSRC)/addipopt.c -o $@
109$(DEST)/bcopywrap.o: $(LIBSRC)/bcopywrap.c $(INCDEP)
110	$(CC) $(CCARGS) -c $(LIBSRC)/bcopywrap.c -o $@
111$(DEST)/binprint.o: $(LIBSRC)/binprint.c $(INCDEP)
112	$(CC) $(CCARGS) -c $(LIBSRC)/binprint.c -o $@
113$(DEST)/buildopts.o: $(LIBSRC)/buildopts.c $(INCDEP)
114	$(CC) $(CCARGS) -c $(LIBSRC)/buildopts.c -o $@
115$(DEST)/count6bits.o: $(LIBSRC)/count6bits.c $(INCDEP)
116	$(CC) $(CCARGS) -c $(LIBSRC)/count6bits.c -o $@
117$(DEST)/checkrev.o: $(LIBSRC)/checkrev.c $(INCDEP) $(TOP)/ipl.h
118	$(CC) $(CCARGS) -c $(LIBSRC)/checkrev.c -o $@
119$(DEST)/count4bits.o: $(LIBSRC)/count4bits.c $(INCDEP)
120	$(CC) $(CCARGS) -c $(LIBSRC)/count4bits.c -o $@
121$(DEST)/debug.o: $(LIBSRC)/debug.c $(INCDEP)
122	$(CC) $(CCARGS) -c $(LIBSRC)/debug.c -o $@
123$(DEST)/extras.o: $(LIBSRC)/extras.c $(INCDEP)
124	$(CC) $(CCARGS) -c $(LIBSRC)/extras.c -o $@
125$(DEST)/facpri.o: $(LIBSRC)/facpri.c $(INCDEP)
126	$(CC) $(CCARGS) -c $(LIBSRC)/facpri.c -o $@
127$(DEST)/fill6bits.o: $(LIBSRC)/fill6bits.c $(INCDEP)
128	$(CC) $(CCARGS) -c $(LIBSRC)/fill6bits.c -o $@
129$(DEST)/flags.o: $(LIBSRC)/flags.c $(INCDEP)
130	$(CC) $(CCARGS) -c $(LIBSRC)/flags.c -o $@
131$(DEST)/genmask.o: $(LIBSRC)/genmask.c $(INCDEP)
132	$(CC) $(CCARGS) -c $(LIBSRC)/genmask.c -o $@
133$(DEST)/getline.o: $(LIBSRC)/getline.c $(INCDEP)
134	$(CC) $(CCARGS) -c $(LIBSRC)/getline.c -o $@
135$(DEST)/gethost.o: $(LIBSRC)/gethost.c $(INCDEP)
136	$(CC) $(CCARGS) -c $(LIBSRC)/gethost.c -o $@
137$(DEST)/getifname.o: $(LIBSRC)/getifname.c $(INCDEP)
138	$(CC) $(CCARGS) -c $(LIBSRC)/getifname.c -o $@
139$(DEST)/getnattype.o: $(LIBSRC)/getnattype.c $(INCDEP)
140	$(CC) $(CCARGS) -c $(LIBSRC)/getnattype.c -o $@
141$(DEST)/getport.o: $(LIBSRC)/getport.c $(INCDEP)
142	$(CC) $(CCARGS) -c $(LIBSRC)/getport.c -o $@
143$(DEST)/getportproto.o: $(LIBSRC)/getportproto.c $(INCDEP)
144	$(CC) $(CCARGS) -c $(LIBSRC)/getportproto.c -o $@
145$(DEST)/getproto.o: $(LIBSRC)/getproto.c $(INCDEP)
146	$(CC) $(CCARGS) -c $(LIBSRC)/getproto.c -o $@
147$(DEST)/getsumd.o: $(LIBSRC)/getsumd.c $(INCDEP)
148	$(CC) $(CCARGS) -c $(LIBSRC)/getsumd.c -o $@
149$(DEST)/hexdump.o: $(LIBSRC)/hexdump.c $(INCDEP)
150	$(CC) $(CCARGS) -c $(LIBSRC)/hexdump.c -o $@
151$(DEST)/hostmask.o: $(LIBSRC)/hostmask.c $(INCDEP)
152	$(CC) $(CCARGS) -c $(LIBSRC)/hostmask.c -o $@
153$(DEST)/hostname.o: $(LIBSRC)/hostname.c $(INCDEP)
154	$(CC) $(CCARGS) -c $(LIBSRC)/hostname.c -o $@
155$(DEST)/hostnum.o: $(LIBSRC)/hostnum.c $(INCDEP)
156	$(CC) $(CCARGS) -c $(LIBSRC)/hostnum.c -o $@
157$(DEST)/icmpcode.o: $(LIBSRC)/icmpcode.c $(INCDEP)
158	$(CC) $(CCARGS) -c $(LIBSRC)/icmpcode.c -o $@
159$(DEST)/ipoptsec.o: $(LIBSRC)/ipoptsec.c $(INCDEP)
160	$(CC) $(CCARGS) -c $(LIBSRC)/ipoptsec.c -o $@
161$(DEST)/inet_addr.o: $(LIBSRC)/inet_addr.c $(INCDEP)
162	$(CC) $(CCARGS) -c $(LIBSRC)/inet_addr.c -o $@
163$(DEST)/initparse.o: $(LIBSRC)/initparse.c $(INCDEP)
164	$(CC) $(CCARGS) -c $(LIBSRC)/initparse.c -o $@
165$(DEST)/ionames.o: $(LIBSRC)/ionames.c $(INCDEP)
166	$(CC) $(CCARGS) -c $(LIBSRC)/ionames.c -o $@
167$(DEST)/ipf_dotuning.o: $(LIBSRC)/ipf_dotuning.c $(INCDEP)
168	$(CC) $(CCARGS) -c $(LIBSRC)/ipf_dotuning.c -o $@
169$(DEST)/ipft_ef.o: $(LIBSRC)/ipft_ef.c $(INCDEP)
170	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_ef.c -o $@
171$(DEST)/ipft_hx.o: $(LIBSRC)/ipft_hx.c $(INCDEP)
172	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_hx.c -o $@
173$(DEST)/ipft_pc.o: $(LIBSRC)/ipft_pc.c $(INCDEP)
174	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_pc.c -o $@
175$(DEST)/ipft_sn.o: $(LIBSRC)/ipft_sn.c $(TOP)/snoop.h
176	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_sn.c -o $@
177$(DEST)/ipft_td.o: $(LIBSRC)/ipft_td.c $(INCDEP)
178	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_td.c -o $@
179$(DEST)/ipft_tx.o: $(LIBSRC)/ipft_tx.c $(INCDEP)
180	$(CC) $(CCARGS) -c $(LIBSRC)/ipft_tx.c -o $@
181$(DEST)/kmem.o: $(LIBSRC)/kmem.c $(INCDEP)
182	$(CC) $(CCARGS) -c $(LIBSRC)/kmem.c -o $@
183$(DEST)/kmemcpywrap.o: $(LIBSRC)/kmemcpywrap.c $(INCDEP)
184	$(CC) $(CCARGS) -c $(LIBSRC)/kmemcpywrap.c -o $@
185$(DEST)/kvatoname.o: $(LIBSRC)/kvatoname.c $(INCDEP)
186	$(CC) $(CCARGS) -c $(LIBSRC)/kvatoname.c -o $@
187$(DEST)/load_hash.o: $(LIBSRC)/load_hash.c $(INCDEP) $(TOP)/ip_htable.h
188	$(CC) $(CCARGS) -c $(LIBSRC)/load_hash.c -o $@
189$(DEST)/load_hashnode.o: $(LIBSRC)/load_hashnode.c $(INCDEP) $(TOP)/ip_htable.h
190	$(CC) $(CCARGS) -c $(LIBSRC)/load_hashnode.c -o $@
191$(DEST)/load_pool.o: $(LIBSRC)/load_pool.c $(INCDEP) $(TOP)/ip_pool.h
192	$(CC) $(CCARGS) -c $(LIBSRC)/load_pool.c -o $@
193$(DEST)/load_poolnode.o: $(LIBSRC)/load_poolnode.c $(INCDEP) $(TOP)/ip_pool.h
194	$(CC) $(CCARGS) -c $(LIBSRC)/load_poolnode.c -o $@
195$(DEST)/make_range.o: $(LIBSRC)/make_range.c $(INCDEP)
196	$(CC) $(CCARGS) -c $(LIBSRC)/make_range.c -o $@
197$(DEST)/mutex_emul.o: $(LIBSRC)/mutex_emul.c $(INCDEP)
198	$(CC) $(CCARGS) -c $(LIBSRC)/mutex_emul.c -o $@
199$(DEST)/nametokva.o: $(LIBSRC)/nametokva.c $(INCDEP)
200	$(CC) $(CCARGS) -c $(LIBSRC)/nametokva.c -o $@
201$(DEST)/nat_setgroupmap.o: $(LIBSRC)/nat_setgroupmap.c $(TOP)/ip_compat.h \
202    $(TOP)/ipf.h $(TOP)/ip_nat.h
203	$(CC) $(CCARGS) -c $(LIBSRC)/nat_setgroupmap.c -o $@
204$(DEST)/ntomask.o: $(LIBSRC)/ntomask.c $(TOP)/ip_compat.h
205	$(CC) $(CCARGS) -c $(LIBSRC)/ntomask.c -o $@
206$(DEST)/loglevel.o: $(LIBSRC)/loglevel.c $(INCDEP)
207	$(CC) $(CCARGS) -c $(LIBSRC)/loglevel.c -o $@
208$(DEST)/optname.o: $(LIBSRC)/optname.c $(INCDEP)
209	$(CC) $(CCARGS) -c $(LIBSRC)/optname.c -o $@
210$(DEST)/optprint.o: $(LIBSRC)/optprint.c $(INCDEP)
211	$(CC) $(CCARGS) -c $(LIBSRC)/optprint.c -o $@
212$(DEST)/optprintv6.o: $(LIBSRC)/optprintv6.c $(INCDEP)
213	$(CC) $(CCARGS) -c $(LIBSRC)/optprintv6.c -o $@
214$(DEST)/optvalue.o: $(LIBSRC)/optvalue.c $(INCDEP)
215	$(CC) $(CCARGS) -c $(LIBSRC)/optvalue.c -o $@
216$(DEST)/portname.o: $(LIBSRC)/portname.c $(INCDEP)
217	$(CC) $(CCARGS) -c $(LIBSRC)/portname.c -o $@
218$(DEST)/portnum.o: $(LIBSRC)/portnum.c $(INCDEP)
219	$(CC) $(CCARGS) -c $(LIBSRC)/portnum.c -o $@
220$(DEST)/ports.o: $(LIBSRC)/ports.c $(INCDEP)
221	$(CC) $(CCARGS) -c $(LIBSRC)/ports.c -o $@
222$(DEST)/print_toif.o: $(LIBSRC)/print_toif.c $(INCDEP)
223	$(CC) $(CCARGS) -c $(LIBSRC)/print_toif.c -o $@
224$(DEST)/printactivenat.o: $(LIBSRC)/printactivenat.c $(INCDEP)
225	$(CC) $(CCARGS) -c $(LIBSRC)/printactivenat.c -o $@
226$(DEST)/printaps.o: $(LIBSRC)/printaps.c $(INCDEP)
227	$(CC) $(CCARGS) -c $(LIBSRC)/printaps.c -o $@
228$(DEST)/printbuf.o: $(LIBSRC)/printbuf.c $(INCDEP)
229	$(CC) $(CCARGS) -c $(LIBSRC)/printbuf.c -o $@
230$(DEST)/printfr.o: $(LIBSRC)/printfr.c $(TOP)/ip_fil.h
231	$(CC) $(CCARGS) -c $(LIBSRC)/printfr.c -o $@
232$(DEST)/printfraginfo.o: $(LIBSRC)/printfraginfo.c $(TOP)/ip_fil.h
233	$(CC) $(CCARGS) -c $(LIBSRC)/printfraginfo.c -o $@
234$(DEST)/printhash.o: $(LIBSRC)/printhash.c $(TOP)/ip_fil.h $(TOP)/ip_htable.h
235	$(CC) $(CCARGS) -c $(LIBSRC)/printhash.c -o $@
236$(DEST)/printhashnode.o: $(LIBSRC)/printhashnode.c $(TOP)/ip_fil.h \
237    $(TOP)/ip_htable.h $(TOP)/ip_lookup.h
238	$(CC) $(CCARGS) -c $(LIBSRC)/printhashnode.c -o $@
239$(DEST)/printip.o: $(LIBSRC)/printip.c $(TOP)/ip_fil.h
240	$(CC) $(CCARGS) -c $(LIBSRC)/printip.c -o $@
241$(DEST)/printpool.o: $(LIBSRC)/printpool.c $(TOP)/ip_fil.h $(TOP)/ip_pool.h
242	$(CC) $(CCARGS) -c $(LIBSRC)/printpool.c -o $@
243$(DEST)/printpoolnode.o: $(LIBSRC)/printpoolnode.c $(TOP)/ip_fil.h \
244    $(TOP)/ip_pool.h $(TOP)/ip_lookup.h
245	$(CC) $(CCARGS) -c $(LIBSRC)/printpoolnode.c -o $@
246$(DEST)/printproto.o: $(LIBSRC)/printproto.c $(TOP)/ip_fil.h
247	$(CC) $(CCARGS) -c $(LIBSRC)/printproto.c -o $@
248$(DEST)/printhostmap.o: $(LIBSRC)/printhostmap.c $(TOP)/ip_fil.h
249	$(CC) $(CCARGS) -c $(LIBSRC)/printhostmap.c -o $@
250$(DEST)/printifname.o: $(LIBSRC)/printifname.c $(INCDEP)
251	$(CC) $(CCARGS) -c $(LIBSRC)/printifname.c -o $@
252$(DEST)/printmask.o: $(LIBSRC)/printmask.c $(INCDEP)
253	$(CC) $(CCARGS) -c $(LIBSRC)/printmask.c -o $@
254$(DEST)/printnat.o: $(LIBSRC)/printnat.c $(INCDEP)
255	$(CC) $(CCARGS) -c $(LIBSRC)/printnat.c -o $@
256$(DEST)/printhostmask.o: $(LIBSRC)/printhostmask.c $(INCDEP)
257	$(CC) $(CCARGS) -c $(LIBSRC)/printhostmask.c -o $@
258$(DEST)/printlog.o: $(LIBSRC)/printlog.c $(INCDEP)
259	$(CC) $(CCARGS) -c $(LIBSRC)/printlog.c -o $@
260$(DEST)/printpacket.o: $(LIBSRC)/printpacket.c $(INCDEP)
261	$(CC) $(CCARGS) -c $(LIBSRC)/printpacket.c -o $@
262$(DEST)/printpacket6.o: $(LIBSRC)/printpacket6.c $(INCDEP)
263	$(CC) $(CCARGS) -c $(LIBSRC)/printpacket6.c -o $@
264$(DEST)/printportcmp.o: $(LIBSRC)/printportcmp.c $(INCDEP)
265	$(CC) $(CCARGS) -c $(LIBSRC)/printportcmp.c -o $@
266$(DEST)/printsbuf.o: $(LIBSRC)/printsbuf.c $(INCDEP)
267	$(CC) $(CCARGS) -c $(LIBSRC)/printsbuf.c -o $@
268$(DEST)/printstate.o: $(LIBSRC)/printstate.c $(INCDEP) $(TOP)/ip_state.h
269	$(CC) $(CCARGS) -c $(LIBSRC)/printstate.c -o $@
270$(DEST)/printtunable.o: $(LIBSRC)/printtunable.c $(INCDEP)
271	$(CC) $(CCARGS) -c $(LIBSRC)/printtunable.c -o $@
272$(DEST)/ratoi.o: $(LIBSRC)/ratoi.c $(INCDEP)
273	$(CC) $(CCARGS) -c $(LIBSRC)/ratoi.c -o $@
274$(DEST)/ratoui.o: $(LIBSRC)/ratoui.c $(INCDEP)
275	$(CC) $(CCARGS) -c $(LIBSRC)/ratoui.c -o $@
276$(DEST)/remove_hash.o: $(LIBSRC)/remove_hash.c $(INCDEP) \
277    $(TOP)/ip_htable.h
278	$(CC) $(CCARGS) -c $(LIBSRC)/remove_hash.c -o $@
279$(DEST)/remove_hashnode.o: $(LIBSRC)/remove_hashnode.c $(INCDEP) \
280    $(TOP)/ip_htable.h
281	$(CC) $(CCARGS) -c $(LIBSRC)/remove_hashnode.c -o $@
282$(DEST)/remove_pool.o: $(LIBSRC)/remove_pool.c $(INCDEP) \
283    $(TOP)/ip_htable.h
284	$(CC) $(CCARGS) -c $(LIBSRC)/remove_pool.c -o $@
285$(DEST)/remove_poolnode.o: $(LIBSRC)/remove_poolnode.c $(INCDEP) \
286    $(TOP)/ip_htable.h
287	$(CC) $(CCARGS) -c $(LIBSRC)/remove_poolnode.c -o $@
288$(DEST)/resetlexer.o: $(LIBSRC)/resetlexer.c $(INCDEP)
289	$(CC) $(CCARGS) -c $(LIBSRC)/resetlexer.c -o $@
290$(DEST)/rwlock_emul.o: $(LIBSRC)/rwlock_emul.c $(INCDEP)
291	$(CC) $(CCARGS) -c $(LIBSRC)/rwlock_emul.c -o $@
292$(DEST)/to_interface.o: $(LIBSRC)/to_interface.c $(INCDEP)
293	$(CC) $(CCARGS) -c $(LIBSRC)/to_interface.c -o $@
294$(DEST)/tcpflags.o: $(LIBSRC)/tcpflags.c $(INCDEP)
295	$(CC) $(CCARGS) -c $(LIBSRC)/tcpflags.c -o $@
296$(DEST)/tcp_flags.o: $(LIBSRC)/tcp_flags.c $(INCDEP)
297	$(CC) $(CCARGS) -c $(LIBSRC)/tcp_flags.c -o $@
298$(DEST)/var.o: $(LIBSRC)/var.c $(INCDEP)
299	$(CC) $(CCARGS) -c $(LIBSRC)/var.c -o $@
300$(DEST)/verbose.o: $(LIBSRC)/verbose.c $(INCDEP)
301	$(CC) $(CCARGS) -c $(LIBSRC)/verbose.c -o $@
302$(DEST)/v6ionames.o: $(LIBSRC)/v6ionames.c $(INCDEP)
303	$(CC) $(CCARGS) -c $(LIBSRC)/v6ionames.c -o $@
304$(DEST)/v6optvalue.o: $(LIBSRC)/v6optvalue.c $(INCDEP)
305	$(CC) $(CCARGS) -c $(LIBSRC)/v6optvalue.c -o $@
306
307clean-lib:
308	/bin/rm -f ${LIBOBJS} ${LIB}
309