dnsmasq v2.68 release
[tomato.git] / release / src / router / Makefile
bloba95ae762f00791d2c0fc7453abf4b19ccf7278eb
2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
5 # All Rights Reserved.
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 include common.mak
16 #TOMATO_EXPERIMENTAL=0
21 SEP=echo "\033[41;1m $@ \033[0m"
24 # standard packages
26 obj-y += lzma-loader
27 obj-y += nvram
28 obj-y += shared
29 obj-y += prebuilt
30 obj-y += igmpproxy
31 obj-y += iptables
32 obj-y += rc
33 obj-y += iproute2
34 obj-y += rom
35 obj-y += others
36 obj-y += busybox
37 obj-y += httpd
38 obj-y += www
39 obj-y += bridge
40 obj-y += dnsmasq
41 obj-y += etc
42 # obj-y += vlan # use Busybox vconfig
43 obj-y += pppd
44 obj-y += rp-pppoe
45 obj-y += utils
46 obj-y += ntpc
47 obj-y += rstats
48 obj-$(TCONFIG_SNMP) += snmp
49 obj-y += cstats
50 obj-y += udpxy
52 # !!TB - updated Broadcom Wireless driver
53 obj-y += et
54 obj-y += libbcmcrypto
55 obj-y += wlconf
57 obj-y += cyassl
58 obj-y += mssl
59 obj-y += mdu
61 #Roadkill
62 obj-$(TCONFIG_NOCAT) += nocat
63 # !!TB
64 obj-$(TCONFIG_USB) += p910nd
66 ifeq ($(CONFIG_LINUX26),y)
67 obj-$(TCONFIG_USB) += sd-idle
68 else
69 obj-$(TCONFIG_USB) += scsi-idle
70 endif
72 obj-y += libusb10
73 #obj-y += libusb
74 obj-y += usbmodeswitch
75 obj-$(TCONFIG_FTP) += vsftpd
77 ifeq ($(CONFIG_LINUX26),y)
78 ifeq ($(TCONFIG_SAMBASRV),y)
79 NEED_EX_NLS = y
80 endif
81 ifeq ($(TCONFIG_USB_EXTRAS),y)
82 NEED_EX_USB = y
83 endif
84 endif
86 ifeq ($(TCONFIG_SAMBASRV),y)
87 ifeq ($(TCONFIG_SAMBA3),y)
88 NEED_SAMBA3 = y
89 else
90 NEED_SAMBA2 = y
91 endif
92 endif
94 ifeq ($(TCONFIG_IPV6),y)
95 export TCONFIG_IPV6 := y
96 else
97 TCONFIG_IPV6 :=
98 endif
100 obj-$(NEED_SAMBA2) += samba
101 obj-$(NEED_SAMBA3) += samba3
102 obj-$(TCONFIG_NTFS) += ntfs-3g
103 obj-$(TCONFIG_EBTABLES) += ebtables
104 #obj-$(TCONFIG_IPV6) += libdaemon
105 #obj-$(TCONFIG_IPV6) += radvd
106 obj-$(TCONFIG_IPV6) += dhcpv6
108 obj-$(TCONFIG_MEDIA_SERVER) += zlib
109 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
110 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
111 obj-$(TCONFIG_MEDIA_SERVER) += libogg
112 obj-$(TCONFIG_MEDIA_SERVER) += flac
113 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
114 obj-$(TCONFIG_MEDIA_SERVER) += libexif
115 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
116 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
117 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
118 MEDIA_SERVER_STATIC=y
120 obj-y += libnfnetlink
121 obj-y += miniupnpd
122 # obj-y += upnp
124 # configurable packages
126 obj-$(TCONFIG_L2TP) += xl2tpd
127 obj-$(TCONFIG_PPTP) += accel-pptp
128 obj-$(TCONFIG_PPTPD) += pptpd
129 obj-$(TCONFIG_HTTPS) += openssl
130 obj-$(TCONFIG_SSH) += dropbear
131 obj-$(TCONFIG_ZEBRA) += zebra
132 # obj-$(TCONFIG_IPP2P) += ipp2p
133 obj-$(TCONFIG_LZO) += lzo
134 obj-$(TCONFIG_OPENVPN) += openvpn
135 obj-$(TCONFIG_EMF) += emf
136 obj-$(TCONFIG_EMF) += igs
138 obj-$(CONFIG_LINUX26) += hotplug2
139 obj-$(CONFIG_LINUX26) += udevtrigger
141 ifeq ($(TCONFIG_OPENVPN),y)
142 export FULL_OPENSSL := y
143 else
144 ifeq ($(TCONFIG_FTP_SSL),y)
145 export FULL_OPENSSL := y
146 else
147 export FULL_OPENSSL := y
148 # FULL_OPENSSL :=
149 endif
150 endif
152 obj-y += wanuptime
154 obj-$(TCONFIG_TCPDUMP) += lpcap tcpdump
156 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
157 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
160 # Basic rules
163 all: clean-build libc $(obj-y) kernel
166 kernel: $(LINUXDIR)/.config
167 @$(SEP)
169 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
170 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
172 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
173 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
175 ifeq ($(CONFIG_LINUX26),y)
176 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
177 endif
180 lzma-loader:
181 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
183 lzma-loader-install: lzma-loader
184 @$(SEP)
187 kmod: dummy
188 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
190 testfind:
191 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
192 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
194 install package: $(obj-install) $(LINUXDIR)/.config
195 @$(SEP)
197 install -d $(TARGETDIR)
200 # kernel modules
201 $(MAKE) -C $(LINUXDIR) modules_install \
202 INSTALL_MOD_STRIP="--strip-debug -x -R .comment -R .note -R .pdr -R .mdebug.abi32 -R .note.gnu.build-id -R .gnu.attributes -R .reginfo" \
203 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
205 ifneq ($(CONFIG_LINUX26),y)
206 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
207 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
208 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
209 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
210 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
211 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
212 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
214 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
215 endif
217 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
219 # nice and clean
220 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
221 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
222 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
223 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
224 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
229 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
231 ##!!TB
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
285 cd $(TARGETDIR)/lib/modules && rm -f */source || true
287 # misc
288 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
289 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
290 done
292 ifneq ($(TCONFIG_L7),y)
293 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
294 endif
296 # uClibc
297 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
298 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
299 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
300 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
301 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
302 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
303 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
304 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
305 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
306 ifeq ($(TCONFIG_SSH),y)
307 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
308 endif
309 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
310 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
311 $(STRIP) $(TARGETDIR)/lib/*.so.0
312 endif
314 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
316 @echo ---
318 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
319 @$(SRCBASE)/btools/libfoo.pl
320 else
321 @$(SRCBASE)/btools/libfoo.pl --noopt
322 endif
323 @chmod 0555 $(TARGETDIR)/lib/*.so*
324 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
326 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
327 # separated/copied extra stuff
328 @rm -rf $(PLATFORMDIR)/extras
329 @mkdir $(PLATFORMDIR)/extras
330 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
332 $(if $(TCONFIG_OPENVPN),@cp -f,$(if $(TCONFIG_USB_EXTRAS),@cp -f,$(if $(TCONFIG_IPV6),@cp -f,@mv))) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/tun.*o $(PLATFORMDIR)/extras/ || true
333 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
335 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
336 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
337 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
338 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
339 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
340 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
341 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
342 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
343 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
352 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
353 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
354 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
355 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
356 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
357 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
358 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
359 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
360 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
361 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
362 $(if $(NEED_EX_USB),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
365 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
366 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
367 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
368 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
369 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
374 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
375 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
377 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
378 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
379 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
380 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
381 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
383 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
385 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
386 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
387 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
390 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
391 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
392 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
394 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
395 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
396 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
397 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
398 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
399 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
400 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
404 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
405 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
406 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
407 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
411 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
412 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
415 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
417 ifneq ($(TCONFIG_USB),y)
418 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
419 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
420 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
421 endif
423 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
424 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
425 ifneq ($(TCONFIG_USB_EXTRAS),y)
426 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
427 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
428 endif
429 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
430 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
432 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
433 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
434 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
437 @mkdir -p $(PLATFORMDIR)/extras/apps
438 @mkdir -p $(PLATFORMDIR)/extras/lib
440 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
441 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
442 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
444 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
445 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
446 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
447 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
448 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
449 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
450 ifneq ($(NEED_EX_USB),y)
451 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
452 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
453 endif
454 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
456 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
457 ifeq ($(TCONFIG_L7PAT),y)
458 @cd layer7 && ./squish.sh
459 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
460 endif
462 ifeq ($(TCONFIG_USERPPTP),y)
463 @mkdir -p $(TARGETDIR)/rom/etc/vpn
464 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
465 chmod +x $(TARGETDIR)/rom/etc/vpn/*
466 endif
468 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
469 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
470 @echo ---
472 @rm -f $(TARGETDIR)/lib/modules/*/build
474 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
475 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
477 # Package kernel and filesystem
478 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
479 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
480 # $(MAKE) -C $(LINUXDIR) zImage ; \
481 # else \
482 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
483 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
484 # fi
486 # Pad self-booting Linux to a 64 KB boundary
487 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
488 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
489 # Append filesystem to self-booting Linux
490 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
493 libc: $(LIBDIR)/ld-uClibc.so.0
494 # $(MAKE) -C ../../../tools-src/uClibc all
495 # $(MAKE) -C ../../../tools-src/uClibc install
499 # cleaners
502 clean: clean-build $(obj-clean)
503 rm -rf layer7/squished
504 rm -f .ipv6-y .ipv6-n
505 rm -f .fullssl-y .fullssl-n
506 make -C config clean
508 clean-build: dummy
509 rm -rf $(TARGETDIR)
510 rm -rf $(INSTALLDIR)
511 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
512 rm -rf $(PLATFORMDIR)/extras
514 distclean: clean
515 ifneq ($(INSIDE_MAK),1)
516 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
517 endif
518 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
521 # configuration
524 CONFIG_IN := config/config.in
526 config/conf config/mconf:
527 @$(MAKE) -C config
529 rconf: config/conf
530 @config/conf $(CONFIG_IN)
532 rmconf: config/mconf
533 @config/mconf $(CONFIG_IN)
535 roldconf: config/conf
536 @config/conf -o $(CONFIG_IN)
537 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
539 kconf:
540 @$(MAKE) -C $(LINUXDIR) config
542 kmconf:
543 @$(MAKE) -C $(LINUXDIR) menuconfig
545 koldconf:
546 @$(MAKE) -C $(LINUXDIR) oldconfig
547 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
549 bboldconf:
550 @$(MAKE) -C busybox oldconfig
552 config conf: rconf kconf
554 menuconfig mconf: rmconf kmconf
556 .ipv6-y .ipv6-n:
557 @rm -f .ipv6-y .ipv6-n
558 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
559 @touch $@
561 .fullssl-y .fullssl-n:
562 @rm -f .fullssl-y .fullssl-n
563 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
564 @touch $@
566 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
568 oldconfig oldconf: koldconf roldconf dependconf bboldconf
572 # overrides and extra dependencies
575 busybox: dummy
576 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
578 # V=1
580 busybox-install:
581 rm -rf $(INSTALLDIR)/busybox
582 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
584 busybox-clean:
585 -@$(MAKE) -C busybox distclean
587 busybox-config:
588 $(MAKE) -C busybox menuconfig
591 httpd: shared nvram mssl
592 @$(SEP)
593 @$(MAKE) -C httpd
595 www-install:
596 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
598 matrixssl:
599 @$(SEP)
600 @$(MAKE) -C matrixssl/src
602 matrixssl-install:
603 @true
605 matrixssl-clean:
606 -@$(MAKE) -C matrixssl/src clean
608 cyassl/stamp-h1:
609 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
610 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections \
611 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
612 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
613 PTHREAD_LIBS="-lpthread" \
614 $(CONFIGURE)
615 @touch cyassl/stamp-h1
617 cyassl: cyassl/stamp-h1
618 @$(SEP)
619 @$(MAKE) -C cyassl
621 cyassl-clean:
622 -@$(MAKE) -C cyassl clean
623 @rm -f cyassl/stamp-h1
625 cyassl-install:
626 @true
628 ifeq ($(FULL_OPENSSL),y)
629 OPENSSL_CIPHERS:=enable-rc5
630 else
631 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
632 endif
634 openssl/stamp-h1:
635 cd openssl && \
636 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
637 -ffunction-sections -fdata-sections -Wl,--gc-sections \
638 shared $(OPENSSL_CIPHERS) \
639 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
640 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
641 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
642 no-zlib no-engines no-sse2 \
643 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
645 @$(MAKE) -C openssl clean
646 @touch openssl/stamp-h1
648 openssl: openssl/stamp-h1
650 openssl-clean:
651 -@$(MAKE) -C openssl clean
652 @rm -f openssl/stamp-h1
654 openssl-install: openssl
655 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
656 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
657 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
659 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
660 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
661 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
663 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
665 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
666 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
668 ifeq ($(FULL_OPENSSL),y)
669 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
670 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
671 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
672 endif
674 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
676 mdu: shared mssl
678 rc: nvram shared
680 bridge/Makefile:
681 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
682 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
684 bridge: bridge/Makefile
685 @$(SEP)
686 @$(MAKE) -C bridge
688 bridge-clean:
689 -@$(MAKE) -C bridge clean
690 @rm -f bridge/Makefile
692 bridge-install:
693 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
694 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
696 dnsmasq:
697 @$(SEP)
698 @$(MAKE) -C dnsmasq \
699 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6 -DNO_IPSET) -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
700 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
702 dnsmasq-install:
703 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
704 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
706 iptables:
707 ifeq ($(CONFIG_LINUX26),y)
708 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
709 else
710 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
711 endif
712 @$(SEP)
713 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
715 iptables-install:
716 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
717 cd $(INSTALLDIR)/iptables/usr/sbin && \
718 ln -sf iptables iptables-restore && \
719 ln -sf iptables iptables-save
721 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
722 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
724 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
726 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
727 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
728 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
730 ifeq ($(TCONFIG_IPV6),y)
731 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
732 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
733 cd $(INSTALLDIR)/iptables/usr/sbin && \
734 ln -sf ip6tables ip6tables-restore && \
735 ln -sf ip6tables ip6tables-save
736 endif
738 iptables-clean:
739 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
741 ppp:
742 @$(SEP)
743 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
744 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
746 ppp-%:
747 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
749 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
750 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
751 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
752 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
753 @touch rp-pppoe/src/stamp-h1
755 rp-pppoe: pppd rp-pppoe/src/stamp-h1
756 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
758 rp-pppoe-clean:
759 -@$(MAKE) -C rp-pppoe/src clean
760 @rm -f rp-pppoe/src/pppoe-relay
761 @rm -f rp-pppoe/src/stamp-h1
763 rp-pppoe-install: rp-pppoe
764 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
765 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
766 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
767 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
770 upnp: nvram shared iptables
772 libnfnetlink/stamp-h1:
773 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
774 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
775 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
776 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
778 libnfnetlink: libnfnetlink/stamp-h1
780 libnfnetlink-install:
781 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
782 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
783 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
784 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
785 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
787 miniupnpd-config:
788 #ifeq ($(TCONFIG_IPV6),y)
789 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
790 #else
791 @cd miniupnpd && ./genconfig.sh --leasefile
792 #endif
794 miniupnpd: iptables miniupnpd-config libnfnetlink
795 @$(SEP)
796 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
797 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include -I$(TOP)/libnfnetlink/include" \
798 LDFLAGS="-L$(TOP)/iptables -liptc -L$(TOP)/libnfnetlink/src/.libs -lnfnetlink" LIBS=""
800 miniupnpd-clean:
801 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
802 @rm -f miniupnpd/config.h
804 miniupnpd-install:
805 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
806 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
808 # !!TB
809 shared: busybox
811 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
812 @$(SEP)
813 $(MAKE) -C vsftpd
815 vsftpd-install: vsftpd
816 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
817 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
819 ntfs-3g/Makefile:
820 cd ntfs-3g && \
821 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
822 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
823 $(CONFIGURE) --enable-shared=no --enable-static=no \
824 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
825 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
827 ntfs-3g: ntfs-3g/Makefile
828 @$(MAKE) -C ntfs-3g
830 ntfs-3g-clean:
831 -@$(MAKE) -C ntfs-3g clean
832 @rm -f ntfs-3g/Makefile
834 ntfs-3g-install: ntfs-3g
835 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
836 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
837 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
838 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
839 ln -sf ../bin/ntfs-3g mount.ntfs
841 libusb10/Makefile: libusb10/Makefile.in
842 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
843 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
845 libusb10: libusb10/Makefile
846 $(MAKE) -C $@
848 libusb10-install: libusb10
849 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
850 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
852 libusb10-clean:
853 -@$(MAKE) -C $@ clean
854 @rm -rf libusb10/Makefile
856 libusb/Makefile: libusb/Makefile.in
857 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
858 $(CONFIGURE) --prefix=/usr \
859 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
860 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
861 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
863 libusb: libusb10 libusb/Makefile
864 $(MAKE) -C $@
866 libusb-install: libusb
867 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
868 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
870 libusb-clean:
871 -@$(MAKE) -C $@ clean
872 @rm -rf libusb/Makefile
874 usbmodeswitch: libusb10
875 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
876 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
877 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
879 usbmodeswitchdb-install:
880 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
881 # compress whitespace
882 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
883 F=`basename $$D`; \
884 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
885 done
887 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
888 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
889 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
890 @mkdir -p $(TARGETDIR)/rom/etc
891 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
893 dhcpv6/stamp-h1:
894 @cd dhcpv6 && \
895 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
896 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
897 ac_cv_func_setpgrp_void=yes \
898 $(CONFIGURE) --prefix= --with-localdbdir=/var
899 @$(MAKE) -C dhcpv6 clean
900 @touch dhcpv6/stamp-h1
902 dhcpv6: dhcpv6/stamp-h1
903 @$(SEP)
904 @$(MAKE) -C dhcpv6 dhcp6c
906 dhcpv6-install: dhcpv6
907 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
908 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
910 dhcpv6-clean:
911 -@$(MAKE) -C dhcpv6 clean
912 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
915 p910nd:
916 samba:
917 samba3:
919 nvram: shared
921 prebuilt: shared libbcmcrypto
923 vlan:
924 @$(SEP)
925 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
927 vlan-install:
928 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
929 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
932 pptp-client-install:
933 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
934 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
937 accel-pptp: pppd accel-pptp/Makefile
938 @$(MAKE) -C accel-pptp
940 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
941 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
942 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
944 accel-pptp-clean:
945 -@$(MAKE) -C accel-pptp clean
946 @rm -f accel-pptp/Makefile
948 accel-pptp-install: accel-pptp
949 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
950 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
953 pptpd/stamp-h1:
954 cd $(TOP)/pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
955 touch pptpd/stamp-h1
957 pptpd: pptpd/stamp-h1
959 pptpd-install: pptpd
960 @echo pptpd
961 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
962 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
963 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
964 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
965 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
966 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
968 pptpd-clean:
969 -@$(MAKE) -C pptpd clean
970 rm -rf pptpd/.deps pptpd/stamp-h1
973 pppd/Makefile: pppd/linux/Makefile.top
974 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
976 pppd: pppd/Makefile
977 @$(SEP)
978 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
980 pppd-clean:
981 -@$(MAKE) -C pppd clean
982 @rm -f pppd/Makefile
984 pppd-install: pppd
985 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
986 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
987 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
988 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
989 ifeq ($(TCONFIG_L2TP),y)
990 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
991 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
992 endif
994 # ipupdate-install:
995 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
996 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
998 zebra/stamp-h1:
999 @cd zebra && rm -f config.cache && \
1000 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1001 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1002 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1003 $(CONFIGURE) --sysconfdir=/etc \
1004 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1005 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1006 @touch zebra/stamp-h1
1008 zebra: zebra/stamp-h1
1009 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1011 zebra-clean:
1012 -@$(MAKE) -C zebra clean
1013 @rm -f zebra/stamp-h1
1015 zebra-install: zebra
1016 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1017 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1018 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1019 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1020 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1021 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1024 rp-l2tp-install:
1025 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1026 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1027 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1028 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1029 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1030 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1031 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1033 xl2tpd: pppd
1034 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1036 xl2tpd-install: xl2tpd
1037 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1038 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1041 bpalogin-install:
1042 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1043 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1046 # libnet:
1047 # @$(SEP)
1048 # @-mkdir -p libnet/lib
1049 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1051 libbcm:
1052 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1054 libbcm-install:
1055 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1056 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1059 iproute2:
1060 @$(SEP)
1061 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1063 iproute2-install: iproute2
1064 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1065 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1066 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1067 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1070 ntpc: nvram shared
1073 dropbear: dropbear/config.h
1074 @$(SEP)
1075 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1077 dropbear-install:
1078 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1079 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1080 cd $(INSTALLDIR)/dropbear/usr/bin && \
1081 ln -sf dropbearmulti dropbear && \
1082 ln -sf dropbearmulti dropbearconvert && \
1083 ln -sf dropbearmulti dropbearkey && \
1084 ln -sf dropbearmulti dbclient && \
1085 ln -sf dropbearmulti ssh && \
1086 ln -sf dropbearmulti scp
1088 dropbear-clean:
1089 -@$(MAKE) -C dropbear clean
1090 @rm -f dropbear/config.h
1092 dropbear/config.h:
1093 cd dropbear && \
1094 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1095 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1096 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1097 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1098 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1099 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1100 @$(MAKE) -C dropbear clean
1102 # Media libraries
1104 sqlite/stamp-h1:
1105 cd sqlite && \
1106 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1107 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1108 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1109 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1110 touch sqlite/stamp-h1
1112 sqlite: sqlite/stamp-h1
1113 @$(MAKE) -C sqlite all
1115 sqlite-clean:
1116 -@$(MAKE) -C sqlite clean
1117 @rm -f sqlite/stamp-h1
1119 sqlite-install: sqlite
1120 @$(SEP)
1121 ifneq ($(MEDIA_SERVER_STATIC),y)
1122 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1123 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1124 endif
1126 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1128 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1129 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1131 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1132 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1134 FFMPEG_PROTOCOLS:=file
1135 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1137 FFMPEG_DISABLED_DEMUXERS:=amr apc ape ass bethsoftvid bfi c93 daud dnxhd dsicin dxa ffm gsm gxf idcin iff image2 image2pipe ingenient ipmovie lmlm4 mm mmf msnwc_tcp mtv mxf nsv nut oma pva rawvideo rl2 roq rpl segafilm shorten siff smacker sol str thp tiertexseq tta txd vmd voc wc3 wsaud wsvqa xa yuv4mpegpipe
1138 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1140 ffmpeg/stamp-h1: zlib
1141 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1142 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1143 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1144 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1145 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1146 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1147 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1148 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1149 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1150 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1151 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1152 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1153 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1154 --extra-libs="-L$(TOP)/zlib -lz" \
1155 --enable-zlib --disable-debug --prefix=''
1156 touch ffmpeg/stamp-h1
1158 ffmpeg: ffmpeg/stamp-h1 zlib
1159 @$(MAKE) -C ffmpeg all
1161 ffmpeg-clean:
1162 -@$(MAKE) -C ffmpeg clean
1163 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1165 ffmpeg-install: ffmpeg
1166 @$(SEP)
1167 ifneq ($(MEDIA_SERVER_STATIC),y)
1168 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1169 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1170 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1171 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1172 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1173 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1174 endif
1176 libogg/stamp-h1:
1177 cd libogg && \
1178 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1179 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1180 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1181 touch libogg/stamp-h1
1183 libogg: libogg/stamp-h1
1184 @$(MAKE) -C libogg all
1186 libogg-clean:
1187 -@$(MAKE) -C libogg clean
1188 @rm -f libogg/stamp-h1
1190 libogg-install: libogg
1191 @$(SEP)
1192 ifneq ($(MEDIA_SERVER_STATIC),y)
1193 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1194 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1195 endif
1197 flac/stamp-h1: libogg
1198 cd flac && \
1199 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1200 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1201 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1202 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1203 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1204 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1205 touch flac/stamp-h1
1207 flac: flac/stamp-h1 libogg
1208 @$(MAKE) -C flac/src/libFLAC all
1210 flac-clean:
1211 -@$(MAKE) -C flac clean
1212 @rm -f flac/stamp-h1
1214 flac-install: flac
1215 @$(SEP)
1216 ifneq ($(MEDIA_SERVER_STATIC),y)
1217 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1218 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1219 endif
1221 jpeg/stamp-h1:
1222 cd jpeg && \
1223 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1224 touch jpeg/stamp-h1
1226 jpeg: jpeg/stamp-h1
1227 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1229 jpeg-clean:
1230 -@$(MAKE) -C jpeg clean
1231 @rm -f jpeg/stamp-h1 jpeg/Makefile
1233 jpeg-install: jpeg
1234 @$(SEP)
1235 ifneq ($(MEDIA_SERVER_STATIC),y)
1236 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1237 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1238 endif
1240 libexif/stamp-h1:
1241 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1242 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1243 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1244 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1245 touch libexif/stamp-h1
1247 libexif: libexif/stamp-h1
1248 @$(MAKE) -C libexif all
1250 libexif-clean:
1251 -@$(MAKE) -C libexif clean
1252 @rm -f libexif/stamp-h1
1254 libexif-install: libexif
1255 @$(SEP)
1256 ifneq ($(MEDIA_SERVER_STATIC),y)
1257 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1258 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1259 endif
1261 zlib/stamp-h1:
1262 cd zlib && \
1263 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1264 ./configure --shared --prefix=''
1265 touch zlib/stamp-h1
1267 zlib: zlib/stamp-h1
1268 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1270 zlib-clean:
1271 -@$(MAKE) -C zlib clean
1272 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1274 zlib-install: zlib
1275 @$(SEP)
1276 ifneq ($(MEDIA_SERVER_STATIC),y)
1277 install -d $(INSTALLDIR)/zlib/usr/lib
1278 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1279 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1280 endif
1282 libid3tag/stamp-h1: zlib
1283 cd libid3tag && \
1284 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1285 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1286 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1287 --disable-debugging --disable-profiling
1288 touch libid3tag/stamp-h1
1290 libid3tag: libid3tag/stamp-h1 zlib
1291 @$(MAKE) -C libid3tag all
1293 libid3tag-clean:
1294 -@$(MAKE) -C libid3tag clean
1295 @rm -f libid3tag/stamp-h1
1297 libid3tag-install: libid3tag
1298 @$(SEP)
1299 ifneq ($(MEDIA_SERVER_STATIC),y)
1300 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1301 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1302 endif
1304 libvorbis/stamp-h1: libogg
1305 cd libvorbis && \
1306 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1307 CPPFLAGS="-I$(TOP)/libogg/include" \
1308 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1309 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1310 --with-ogg-includes="$(TOP)/libogg/include" \
1311 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1312 touch libvorbis/stamp-h1
1314 libvorbis: libvorbis/stamp-h1
1315 @$(MAKE) -C libvorbis/lib all
1317 libvorbis-clean:
1318 -@$(MAKE) -C libvorbis clean
1319 @rm -f libvorbis/stamp-h1
1321 libvorbis-install: libvorbis
1322 @$(SEP)
1323 ifneq ($(MEDIA_SERVER_STATIC),y)
1324 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1325 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1326 endif
1328 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1329 @$(SEP)
1330 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1333 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1334 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1335 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1336 $(CONFIGURE) --prefix=/usr
1338 igmpproxy: igmpproxy/src/Makefile
1339 @$(SEP)
1340 @$(MAKE) -C igmpproxy/src
1342 igmpproxy-install: igmpproxy
1343 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1344 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1346 igmpproxy-clean:
1347 -@$(MAKE) -C igmpproxy/src clean
1348 @rm -f igmpproxy/src/Makefile
1350 udev:
1351 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1352 PROGRAMS=udevtrigger
1354 udev-install: udev
1355 install -d $(INSTALLDIR)
1356 install -d $(TARGETDIR)
1357 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1359 hotplug2:
1360 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1362 hotplug2-install: hotplug2
1363 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1364 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1366 emf:
1367 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1369 emf-install: emf
1370 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1372 igs:
1373 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1375 igs-install: igs
1376 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1378 wanuptime: nvram shared
1379 @$(SEP)
1380 @$(MAKE) -C wanuptime
1382 wanuptime-clean:
1383 -@$(MAKE) -C wanuptime clean
1385 wanuptime-install:
1386 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1387 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1389 ebtables: dummy
1390 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1391 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1392 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1393 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1395 ebtables-install: ebtables
1396 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1398 @mkdir -p $(TARGETDIR)/rom/etc
1399 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1400 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1402 install -d $(INSTALLDIR)/ebtables/usr/lib
1403 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1404 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1405 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1407 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1408 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1409 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1411 ebtables-clean:
1412 -@$(MAKE) -C ebtables clean
1414 #Roadkill
1415 glib/stamp-h1:
1416 @$(SEP)
1417 @cd glib && $(CONFIGURE) --prefix=/usr glib_cv_prog_cc_ansi_proto=no glib_cv_has__inline=yes glib_cv_has__inline__=yes glib_cv_hasinline=yes \
1418 glib_cv_sane_realloc=yes glib_cv_va_copy=no glib_cv___va_copy=yes glib_cv_va_val_copy=yes glib_cv_rtldglobal_broken=no \
1419 glib_cv_uscore=no glib_cv_func_pthread_mutex_trylock_posix=yes glib_cv_func_pthread_cond_timedwait_posix=yes glib_cv_sizeof_gmutex=24 \
1420 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" glib_cv_sys_pthread_getspecific_posix=yes \
1421 glib_cv_sys_pthread_mutex_trylock_posix=yes glib_cv_sys_pthread_cond_timedwait_posix=yes ac_cv_func_getpwuid_r=yes ac_cv_func_getpwuid_r_posix=yes
1422 @$(MAKE) -C glib
1423 touch glib/stamp-h1
1425 glib: glib/stamp-h1
1427 glib-clean:
1428 -@$(MAKE) -C glib clean
1429 rm -f glib/stamp-h1
1431 glib-install: glib
1432 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1434 #Roadkill
1435 nocat/stamp-h1: glib-install
1436 @$(SEP)
1437 @cd nocat && \
1438 NC_CONF_PATH="/" \
1439 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1440 @$(MAKE) -C nocat
1442 echo *** integrate glib to nocat installdir
1443 install -d $(INSTALLDIR)/nocat/usr/lib
1444 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1445 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1446 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1447 touch nocat/stamp-h1
1449 nocat: nocat/stamp-h1
1451 nocat-clean:
1452 -@$(MAKE) -C nocat clean
1453 rm -f nocat/stamp-h1
1455 nocat-install:
1456 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1457 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1458 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1459 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1461 lzo/stamp-h1:
1462 cd lzo && \
1463 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1464 touch lzo/stamp-h1
1466 lzo: lzo/stamp-h1
1468 lzo-clean:
1469 -@$(MAKE) -C lzo clean
1470 @rm -f lzo/stamp-h1
1472 lzo-install: lzo
1473 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1474 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1475 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1477 openvpn/.conf: openssl lzo
1478 cd openvpn && CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1479 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1480 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1481 $(CONFIGURE) --prefix= \
1482 --with-crypto-library=openssl \
1483 --disable-debug --disable-plugins --enable-management --enable-small \
1484 --disable-selinux --disable-socks --enable-password-save \
1485 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1486 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1487 ac_cv_lib_resolv_gethostbyname=no
1488 touch openvpn/.conf
1490 openvpn: openvpn/.conf
1492 openvpn-clean:
1493 -@$(MAKE) -C openvpn clean
1494 @rm -f openvpn/.conf
1496 openvpn-install: openvpn
1497 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1498 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1499 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1501 sd-idle/stamp-h1:
1502 cd sd-idle \
1503 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1504 $(MAKE) -C sd-idle
1505 chmod 0755 sd-idle/sd-idle
1506 touch sd-idle/stamp-h1
1508 sd-idle-clean:
1509 -@$(MAKE) -C sd-idle clean
1510 @rm -f sd-idle/stamp-h1
1512 sd-idle-install: sd-idle/stamp-h1
1513 install -d $(INSTALLDIR)/sd-idle/usr/bin
1514 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1515 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1517 snmp/stamp-h1:
1518 cd snmp && \
1519 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1520 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1521 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1522 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1523 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1524 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1525 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1526 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1527 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1528 touch snmp/stamp-h1
1530 snmp: snmp/stamp-h1
1531 @$(SEP)
1532 $(MAKE) -C snmp
1534 snmp-clean:
1535 -@$(MAKE) -C snmp clean
1536 @rm -f snmp/stamp-h1
1538 snmp-install: snmp
1539 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1540 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1542 libpcap/stamp-h1: openssl
1543 cd libpcap && \
1544 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1545 ac_cv_linux_vers=2 \
1546 $(CONFIGURE) --prefix=/usr --with-pcap=linux \
1547 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1548 touch libpcap/stamp-h1
1550 libpcap: libpcap/stamp-h1
1551 @$(SEP)
1552 $(MAKE) -C libpcap
1554 libpcap-clean:
1555 -@$(MAKE) -C libpcap clean
1556 @rm -f libpcap/stamp-h1
1558 libpcap-install:
1559 @$(SEP)
1561 tcpdump/stamp-h1: openssl libpcap
1562 cd tcpdump && \
1563 CFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/openssl/include" \
1564 LDFLAGS="-L$(TOP)/openssl" \
1565 ac_cv_linux_vers=2 ac_cv_search_getaddrinfo=no \
1566 $(CONFIGURE) --prefix=/usr --disable-smb \
1567 --without-smi --with-crypt \
1568 $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6)
1569 touch tcpdump/stamp-h1
1571 tcpdump: tcpdump/stamp-h1
1572 @$(SEP)
1573 $(MAKE) -C tcpdump
1575 tcpdump-clean:
1576 -@$(MAKE) -C tcpdump clean
1577 @rm -f tcpdump/stamp-h1
1579 tcpdump-install: tcpdump
1580 install -D tcpdump/tcpdump $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1581 $(STRIP) $(INSTALLDIR)/tcpdump/usr/sbin/tcpdump
1584 # Generic rules
1588 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1591 %-clean:
1592 @-[ ! -d $* ] || $(MAKE) -C $* clean
1594 %-distclean:
1595 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1597 %-install: %
1598 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1600 %-build:
1601 $(MAKE) $*-clean $*
1603 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1605 .PHONY: all clean distclean mrproper install package
1606 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1607 .PHONY: dummy libnet