blob: f0a735f599a946adaeb1d50955480aadf03f075e [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#! /usr/bin/make
2
3# WARNING:
4# only add extensions here that are either present in the kernel, or whose
5# header files are present in the include/linux directory of this iptables
6# package (HW)
7#
8PF_EXT_SLIB:=addrtype ah CLUSTERIP DNAT ecn ECN icmp LOG MASQUERADE MIRROR NETMAP realm REDIRECT REJECT SAME set SET SNAT ttl TTL ULOG unclean priority
9PF6_EXT_SLIB:=ah dst eui64 frag hbh hl HL icmp6 ipv6header LOG mh REJECT rt
10PFX_EXT_SLIB:=CLASSIFY cluster comment connbytes connlimit connmark CONNMARK CONNSECMARK conntrack dccp dscp DSCP esp hashlimit helper iprange length limit mac mark MARK multiport NFLOG NFQUEUE NOTRACK owner physdev pkttype policy quota rateest recent sctp SECMARK socket standard state statistic string tcp tcpmss TCPMSS TCPOPTSTRIP time tos TOS TPROXY TRACE u32 udp IMQ webstr NATTYPE
11
12PF_EXT_SELINUX_SLIB:=
13PF6_EXT_SELINUX_SLIB:=
14PFX_EXT_SELINUX_SLIB:=CONNSECMARK SECMARK
15
16ifeq ($(DO_SELINUX), 1)
17PF_EXT_SE_SLIB:=$(PF_EXT_SELINUX_SLIB)
18PF6_EXT_SE_SLIB:=$(PF6_EXT_SELINUX_SLIB)
19PFX_EXT_SE_SLIB:=$(PFX_EXT_SELINUX_SLIB)
20endif
21
22# Optionals
23PF_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T)))
24PF6_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-test6),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T)))
25PFX_EXT_SLIB_OPTS:=$(foreach T,$(wildcard extensions/.*-testx),$(shell KERNEL_DIR=$(KERNEL_DIR) $(T)))
26
27PF_EXT_ALL_SLIB:=$(PF_EXT_SLIB) $(PF_EXT_SE_SLIB) $(PF_EXT_SLIB_OPTS)
28PF6_EXT_ALL_SLIB:=$(PF6_EXT_SLIB) $(PF6_EXT_SE_SLIB) $(PF6_EXT_SLIB_OPTS)
29PFX_EXT_ALL_SLIB:=$(PFX_EXT_SLIB) $(PFX_EXT_SE_SLIB) $(PFX_EXT_SLIB_OPTS)
30
31# libipt*.c with libipt*.man
32PF_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_match extensions/libipt_$(T).c && echo $(T)))
33PF_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q register_target extensions/libipt_$(T).c && echo $(T)))
34PF6_EXT_MAN_ALL_MATCHES:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_match6 extensions/libip6t_$(T).c && echo $(T)))
35PF6_EXT_MAN_ALL_TARGETS:=$(foreach T,$(PF6_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q register_target6 extensions/libip6t_$(T).c && echo $(T)))
36
37# libxt*.c with libipt*.man
38PF_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q xtables_register_match extensions/libxt_$(T).c && echo $(T)))
39PF_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libipt_$(T).man && grep -q xtables_register_target extensions/libxt_$(T).c && echo $(T)))
40PF6_EXT_MAN_ALL_MATCHES+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q xtables_register_match extensions/libxt_$(T).c && echo $(T)))
41PF6_EXT_MAN_ALL_TARGETS+=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libip6t_$(T).man && grep -q xtables_register_target extensions/libxt_$(T).c && echo $(T)))
42
43# libxt*.c with libxt*.man
44PFX_EXT_MAN_ALL_MATCHES=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libxt_$(T).man && grep -q xtables_register_match extensions/libxt_$(T).c && echo $(T)))
45PFX_EXT_MAN_ALL_TARGETS=$(foreach T,$(PFX_EXT_ALL_SLIB),$(shell test -f extensions/libxt_$(T).man && grep -q xtables_register_target extensions/libxt_$(T).c && echo $(T)))
46
47# libipt*.man
48PF_EXT_MAN_MATCHES:=$(filter $(PF_EXT_SLIB), $(PF_EXT_MAN_ALL_MATCHES))
49PF_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SLIB), $(PF_EXT_MAN_ALL_MATCHES))
50PF_EXT_MAN_MATCHES+=$(filter $(PF_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_MATCHES))
51PF_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_MATCHES))
52
53# libipt*.man
54PF_EXT_MAN_TARGETS:=$(filter $(PF_EXT_SLIB), $(PF_EXT_MAN_ALL_TARGETS))
55PF_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SLIB), $(PF_EXT_MAN_ALL_TARGETS))
56PF_EXT_MAN_TARGETS+=$(filter $(PF_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_TARGETS))
57PF_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SE_SLIB), $(PF_EXT_MAN_ALL_TARGETS))
58
59# libipt*.man
60PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF_EXT_MAN_MATCHES), $(PF_EXT_MAN_ALL_MATCHES))
61PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF_EXT_MAN_TARGETS), $(PF_EXT_MAN_ALL_TARGETS))
62
63# libip6t*.man
64PF6_EXT_MAN_MATCHES:=$(filter $(PF6_EXT_SLIB), $(PF6_EXT_MAN_ALL_MATCHES))
65PF6_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SLIB), $(PF6_EXT_MAN_ALL_MATCHES))
66PF6_EXT_MAN_MATCHES+=$(filter $(PF6_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_MATCHES))
67PF6_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_MATCHES))
68
69# libip6t*.man
70PF6_EXT_MAN_TARGETS:=$(filter $(PF6_EXT_SLIB), $(PF6_EXT_MAN_ALL_TARGETS))
71PF6_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SLIB), $(PF6_EXT_MAN_ALL_TARGETS))
72PF6_EXT_MAN_TARGETS+=$(filter $(PF6_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_TARGETS))
73PF6_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SE_SLIB), $(PF6_EXT_MAN_ALL_TARGETS))
74
75# libip6t*.man
76PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF6_EXT_MAN_MATCHES), $(PF6_EXT_MAN_ALL_MATCHES))
77PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF6_EXT_MAN_TARGETS), $(PF6_EXT_MAN_ALL_TARGETS))
78
79# libxt*.man
80PFX_EXT_MAN_MATCHES:=$(filter $(PFX_EXT_SLIB), $(PFX_EXT_MAN_ALL_MATCHES))
81PFX_EXT_MAN_MATCHES+=$(filter $(PFX_EXT_SE_SLIB), $(PFX_EXT_MAN_ALL_MATCHES))
82PFX_EXT_MAN_TARGETS:=$(filter $(PFX_EXT_SLIB), $(PFX_EXT_MAN_ALL_TARGETS))
83PFX_EXT_MAN_TARGETS+=$(filter $(PFX_EXT_SE_SLIB), $(PFX_EXT_MAN_ALL_TARGETS))
84
85# libxt*.man
86PFX_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_MAN_MATCHES), $(PFX_EXT_MAN_ALL_MATCHES))
87PFX_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_MAN_TARGETS), $(PFX_EXT_MAN_ALL_TARGETS))
88
89ifneq ($(DO_SELINUX), 1)
90PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_MATCHES))
91PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_TARGETS))
92PF_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_MATCHES))
93PF_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF_EXT_MAN_EXTRA_TARGETS))
94
95PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PF6_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_MATCHES))
96PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PF6_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_TARGETS))
97PF6_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_MATCHES))
98PF6_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PF6_EXT_MAN_EXTRA_TARGETS))
99
100PFX_EXT_MAN_EXTRA_MATCHES:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PFX_EXT_MAN_EXTRA_MATCHES))
101PFX_EXT_MAN_EXTRA_TARGETS:=$(filter-out $(PFX_EXT_SELINUX_SLIB), $(PFX_EXT_MAN_EXTRA_TARGETS))
102endif
103
104# extra man pages requires this (really _A_ll)
105PFA4_EXT_MAN_EXTRA_MATCHES:=$(PF_EXT_MAN_EXTRA_MATCHES) $(PFX_EXT_MAN_EXTRA_MATCHES)
106PFA4_EXT_MAN_EXTRA_TARGETS:=$(PF_EXT_MAN_EXTRA_TARGETS) $(PFX_EXT_MAN_EXTRA_TARGETS)
107PFA6_EXT_MAN_EXTRA_MATCHES:=$(PF6_EXT_MAN_EXTRA_MATCHES) $(PFX_EXT_MAN_EXTRA_MATCHES)
108PFA6_EXT_MAN_EXTRA_TARGETS:=$(PF6_EXT_MAN_EXTRA_TARGETS) $(PFX_EXT_MAN_EXTRA_TARGETS)
109
110
111allman:
112 @echo 'ALL_SLIB (IPv4):' $(PF_EXT_ALL_SLIB)
113 @echo 'ALL_SLIB (IPv6):' $(PF6_EXT_ALL_SLIB)
114 @echo 'ALL_SLIB (both):' $(PFX_EXT_ALL_SLIB)
115 @echo 'ALL_MATCH (IPv4):' $(PF_EXT_MAN_ALL_MATCHES)
116 @echo 'ALL_MATCH (IPv6):' $(PF6_EXT_MAN_ALL_MATCHES)
117 @echo 'ALL_MATCH (both):' $(PFX_EXT_MAN_ALL_MATCHES)
118 @echo 'ALL_TARGET (IPv4):' $(PF_EXT_MAN_ALL_TARGETS)
119 @echo 'ALL_TARGET (IPv6):' $(PF6_EXT_MAN_ALL_TARGETS)
120 @echo 'ALL_TARGET (both):' $(PFX_EXT_MAN_ALL_TARGETS)
121
122PF_EXT_SLIB+=$(PF_EXT_SLIB_OPTS)
123PF6_EXT_SLIB+=$(PF6_EXT_SLIB_OPTS)
124PFX_EXT_SLIB+=$(PFX_EXT_SLIB_OPTS)
125
126OPTIONALS+=$(patsubst %,XT:%,$(PFX_EXT_SLIB_OPTS))
127OPTIONALS+=$(patsubst %,IPv4:%,$(PF_EXT_SLIB_OPTS))
128OPTIONALS+=$(patsubst %,IPv6:%,$(PF6_EXT_SLIB_OPTS))
129
130ifndef NO_SHARED_LIBS
131SHARED_LIBS+=$(foreach T,$(PF_EXT_SLIB),extensions/libipt_$(T).so)
132SHARED_SE_LIBS+=$(foreach T,$(PF_EXT_SE_SLIB),extensions/libipt_$(T).so)
133EXTRA_INSTALLS+=$(foreach T, $(PF_EXT_SLIB), $(DEST_IPT_LIBDIR)/libipt_$(T).so)
134EXTRA_INSTALLS+=$(foreach T, $(PF_EXT_SE_SLIB), $(DEST_IPT_LIBDIR)/libipt_$(T).so)
135
136ifeq ($(DO_IPV6), 1)
137SHARED_LIBS+=$(foreach T,$(PF6_EXT_SLIB),extensions/libip6t_$(T).so)
138SHARED_SE_LIBS+=$(foreach T,$(PF6_EXT_SE_SLIB),extensions/libip6t_$(T).so)
139EXTRA_INSTALLS+=$(foreach T, $(PF6_EXT_SLIB), $(DEST_IPT_LIBDIR)/libip6t_$(T).so)
140EXTRA_INSTALLS+=$(foreach T, $(PF6_EXT_SE_SLIB), $(DEST_IPT_LIBDIR)/libip6t_$(T).so)
141endif
142
143SHARED_LIBS+=$(foreach T,$(PFX_EXT_SLIB),extensions/libxt_$(T).so)
144SHARED_SE_LIBS+=$(foreach T,$(PFX_EXT_SE_SLIB),extensions/libxt_$(T).so)
145EXTRA_INSTALLS+=$(foreach T, $(PFX_EXT_SLIB), $(DEST_IPT_LIBDIR)/libxt_$(T).so)
146EXTRA_INSTALLS+=$(foreach T, $(PFX_EXT_SE_SLIB), $(DEST_IPT_LIBDIR)/libxt_$(T).so)
147
148else # NO_SHARED_LIBS
149EXT_OBJS+=$(foreach T,$(PF_EXT_SLIB),extensions/libipt_$(T).o)
150EXT_OBJS+=$(foreach T,$(PF_EXT_SE_SLIB),extensions/libipt_$(T).o)
151EXT_OBJS+=$(foreach T,$(PFX_EXT_SLIB),extensions/libxt_$(T).o)
152EXT_OBJS+=$(foreach T,$(PFX_EXT_SE_SLIB),extensions/libxt_$(T).o)
153EXT_FUNC+=$(foreach T,$(PF_EXT_SLIB),ipt_$(T))
154EXT_FUNC+=$(foreach T,$(PF_EXT_SE_SLIB),ipt_$(T))
155EXT_FUNC+=$(foreach T,$(PFX_EXT_SLIB),xt_$(T))
156EXT_FUNC+=$(foreach T,$(PFX_EXT_SE_SLIB),xt_$(T))
157EXT_OBJS+= extensions/initext.o
158ifeq ($(DO_IPV6), 1)
159EXT6_OBJS+=$(foreach T,$(PF6_EXT_SLIB),extensions/libip6t_$(T).o)
160EXT6_OBJS+=$(foreach T,$(PF6_EXT_SE_SLIB),extensions/libip6t_$(T).o)
161EXT6_OBJS+=$(foreach T,$(PFX_EXT_SLIB),extensions/libxt_$(T).o)
162EXT6_FUNC+=$(foreach T,$(PF6_EXT_SLIB),ip6t_$(T))
163EXT6_FUNC+=$(foreach T,$(PF6_EXT_SE_SLIB),ip6t_$(T))
164EXT6_FUNC+=$(foreach T,$(PFX_EXT_SLIB),xt_$(T))
165EXT6_OBJS+=$(foreach T,$(PFX_EXT_SE_SLIB),extensions/libxt_$(T).o)
166EXT6_FUNC+=$(foreach T,$(PFX_EXT_SE_SLIB),xt_$(T))
167EXT6_OBJS+= extensions/initext6.o
168endif # DO_IPV6
169endif # NO_SHARED_LIBS
170
171ifndef TOPLEVEL_INCLUDED
172local:
173 cd .. && $(MAKE) $(SHARED_LIBS) $(SHARED_SE_LIBS)
174endif
175
176ifdef NO_SHARED_LIBS
177extensions/libext.a: $(EXT_OBJS)
178 rm -f $@; $(AR) crv $@ $(EXT_OBJS)
179
180extensions/libext6.a: $(EXT6_OBJS)
181 rm -f $@; $(AR) crv $@ $(EXT6_OBJS)
182
183extensions/initext.o: extensions/initext.c
184extensions/initext6.o: extensions/initext6.c
185
186extensions/initext.c: extensions/Makefile
187 echo "" > $@
188 for i in $(EXT_FUNC); do \
189 echo "extern void $${i}_init(void);" >> $@; \
190 done
191 echo "void init_extensions(void) {" >> $@
192 for i in $(EXT_FUNC); do \
193 echo " $${i}_init();" >> $@; \
194 done
195 echo "}" >> $@
196
197extensions/initext6.c: extensions/Makefile
198 echo "" > $@
199 for i in $(EXT6_FUNC); do \
200 echo "extern void $${i}_init(void);" >> $@; \
201 done
202 echo "void init_extensions(void) {" >> $@
203 for i in $(EXT6_FUNC); do \
204 echo " $${i}_init();" >> $@; \
205 done
206 echo "}" >> $@
207
208extensions/lib%.o: extensions/lib%.c
209 $(CC) $(CFLAGS) -D_INIT=$*_init -c -o $@ $<
210
211endif
212
213EXTRAS += extensions/libipt_targets.man
214extensions/libipt_targets.man: $(patsubst %,extensions/libipt_%.man,$(PF_EXT_MAN_ALL_TARGETS)) $(patsubst %,extensions/libxt_%.man,$(PFX_EXT_MAN_ALL_TARGETS))
215 @for ext in `echo $(PF_EXT_MAN_TARGETS) $(PFX_EXT_MAN_TARGETS) | sed 's/ /\n/g' | sort`; do \
216 echo ".SS $$ext" ;\
217 if test -f extensions/libipt_$$ext.man; then \
218 cat extensions/libipt_$$ext.man ;\
219 else \
220 cat extensions/libxt_$$ext.man ;\
221 fi; \
222 done >extensions/libipt_targets.man
223 @if [ -n "$(PFA4_EXT_MAN_EXTRA_TARGETS)" ]; then \
224 extra="$(PFA4_EXT_MAN_EXTRA_TARGETS)" ;\
225 for ext in `echo $${extra:-""} | sed 's/ /\n/g' | sort`; do \
226 echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
227 if test -f extensions/libipt_$$ext.man; then \
228 cat extensions/libipt_$$ext.man ;\
229 else \
230 cat extensions/libxt_$$ext.man ;\
231 fi; \
232 done ;\
233 fi >>extensions/libipt_targets.man
234
235EXTRAS += extensions/libipt_matches.man
236extensions/libipt_matches.man: $(patsubst %,extensions/libipt_%.man,$(PF_EXT_MAN_ALL_MATCHES)) $(patsubst %,extensions/libxt_%.man,$(PFX_EXT_MAN_ALL_MATCHES))
237 @for ext in `echo $(PF_EXT_MAN_MATCHES) $(PFX_EXT_MAN_MATCHES) | sed 's/ /\n/g' | sort`; do \
238 echo ".SS $$ext" ;\
239 if test -f extensions/libipt_$$ext.man; then \
240 cat extensions/libipt_$$ext.man ;\
241 else \
242 cat extensions/libxt_$$ext.man ;\
243 fi; \
244 done >extensions/libipt_matches.man
245 @if [ -n "$(PFA4_EXT_MAN_EXTRA_MATCHES)" ]; then \
246 extra="$(PFA4_EXT_MAN_EXTRA_MATCHES)" ;\
247 for ext in `echo $${extra:-""} | sed 's/ /\n/g' | sort`; do \
248 echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
249 if test -f extensions/libipt_$$ext.man; then \
250 cat extensions/libipt_$$ext.man ;\
251 else \
252 cat extensions/libxt_$$ext.man ;\
253 fi; \
254 done ;\
255 fi >>extensions/libipt_matches.man
256
257EXTRAS += extensions/libip6t_targets.man
258extensions/libip6t_targets.man: $(patsubst %, extensions/libip6t_%.man, $(PF6_EXT_MAN_ALL_TARGETS)) $(patsubst %,extensions/libxt_%.man,$(PFX_EXT_MAN_ALL_TARGETS))
259 @for ext in `echo $(PF6_EXT_MAN_TARGETS) $(PFX_EXT_MAN_TARGETS) | sed 's/ /\n/g' | sort`; do \
260 echo ".SS $$ext" ;\
261 if test -f extensions/libip6t_$$ext.man; then \
262 cat extensions/libip6t_$$ext.man ;\
263 else \
264 cat extensions/libxt_$$ext.man ;\
265 fi; \
266 done >extensions/libip6t_targets.man
267 @if [ -n "$(PFA6_EXT_MAN_EXTRA_TARGETS)" ]; then \
268 extra="$(PFA6_EXT_MAN_EXTRA_TARGETS)" ;\
269 for ext in `echo $${extra:-""} | sed 's/ /\n/g' | sort`; do \
270 echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
271 if test -f extensions/libip6t_$$ext.man; then \
272 cat extensions/libip6t_$$ext.man ;\
273 else \
274 cat extensions/libxt_$$ext.man ;\
275 fi; \
276 done ;\
277 fi >>extensions/libip6t_targets.man
278
279EXTRAS += extensions/libip6t_matches.man
280extensions/libip6t_matches.man: $(patsubst %, extensions/libip6t_%.man, $(PF6_EXT_MAN_ALL_MATCHES)) $(patsubst %,extensions/libxt_%.man,$(PFX_EXT_MAN_ALL_MATCHES))
281 @for ext in `echo $(PF6_EXT_MAN_MATCHES) $(PFX_EXT_MAN_MATCHES) | sed 's/ /\n/g' | sort`; do \
282 echo ".SS $$ext" ;\
283 if test -f extensions/libip6t_$$ext.man; then \
284 cat extensions/libip6t_$$ext.man ;\
285 else \
286 cat extensions/libxt_$$ext.man ;\
287 fi; \
288 done >extensions/libip6t_matches.man
289 @if [ -n "$(PFA6_EXT_MAN_EXTRA_MATCHES)" ]; then \
290 extra="$(PFA6_EXT_MAN_EXTRA_MATCHES)" ;\
291 for ext in `echo $${extra:-""} | sed 's/ /\n/g' | sort`; do \
292 echo ".SS $$ext (not supported, see Patch-O-Matic)" ;\
293 if test -f extensions/libip6t_$$ext.man; then \
294 cat extensions/libip6t_$$ext.man ;\
295 else \
296 cat extensions/libxt_$$ext.man ;\
297 fi; \
298 done ;\
299 fi >>extensions/libip6t_matches.man
300
301$(DEST_IPT_LIBDIR)/libipt_%.so: extensions/libipt_%.so
302 @[ -d $(DEST_IPT_LIBDIR)/ ] || mkdir -p $(DEST_IPT_LIBDIR)/
303 cp $< $@
304
305$(DEST_IPT_LIBDIR)/libip6t_%.so: extensions/libip6t_%.so
306 @[ -d $(DEST_IPT_LIBDIR)/ ] || mkdir -p $(DEST_IPT_LIBDIR)/
307 cp $< $@
308
309$(DEST_IPT_LIBDIR)/libxt_%.so: extensions/libxt_%.so
310 @[ -d $(DEST_IPT_LIBDIR)/ ] || mkdir -p $(DEST_IPT_LIBDIR)/
311 cp $< $@