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