Revert "transmission: update from 2.13 to 2.22"
[tomato.git] / release / src / router / Makefile
blob62f6f6162b3be38e6f91e02c9905b131a6ed181d
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
49 # !!TB - updated Broadcom Wireless driver
50 obj-y += et
51 obj-y += libbcmcrypto
52 obj-y += wlconf
54 obj-y += cyassl
55 obj-y += mssl
56 obj-y += mdu
58 # !!TB
59 obj-$(TCONFIG_USB) += p910nd
60 obj-$(TCONFIG_USB) += scsi-idle
61 obj-y += libusb10
62 #obj-y += libusb
63 obj-y += usbmodeswitch
64 obj-$(TCONFIG_FTP) += vsftpd
66 ifeq ($(CONFIG_LINUX26),y)
67 ifeq ($(TCONFIG_SAMBASRV),y)
68 NEED_EX_NLS = y
69 endif
70 ifeq ($(TCONFIG_USB_EXTRAS),y)
71 NEED_EX_USB = y
72 endif
73 endif
75 ifeq ($(TCONFIG_SAMBASRV),y)
76 ifeq ($(TCONFIG_SAMBA3),y)
77 NEED_SAMBA3 = y
78 else
79 NEED_SAMBA2 = y
80 endif
81 endif
83 ifeq ($(TCONFIG_IPV6),y)
84 export TCONFIG_IPV6 := y
85 else
86 TCONFIG_IPV6 :=
87 endif
89 obj-$(NEED_SAMBA2) += samba
90 obj-$(NEED_SAMBA3) += samba3
91 obj-$(TCONFIG_NTFS) += ntfs-3g
92 obj-$(TCONFIG_EBTABLES) += ebtables
93 obj-$(TCONFIG_IPV6) += radvd
94 obj-$(TCONFIG_IPV6) += dhcpv6
96 obj-$(TCONFIG_MEDIA_SERVER) += zlib
97 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
98 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
99 obj-$(TCONFIG_MEDIA_SERVER) += libogg
100 obj-$(TCONFIG_MEDIA_SERVER) += flac
101 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
102 obj-$(TCONFIG_MEDIA_SERVER) += libexif
103 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
104 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
105 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
106 MEDIA_SERVER_STATIC=y
108 obj-y += miniupnpd
109 # obj-y += upnp
113 # configurable packages
115 obj-$(TCONFIG_L2TP) += xl2tpd
116 obj-$(TCONFIG_PPTP) += accel-pptp
117 obj-$(TCONFIG_HTTPS) += openssl
118 obj-$(TCONFIG_SSH) += dropbear
119 obj-$(TCONFIG_ZEBRA) += zebra
120 # obj-$(TCONFIG_IPP2P) += ipp2p
121 obj-$(TCONFIG_LZO) += lzo
122 obj-$(TCONFIG_OPENVPN) += openvpn
123 obj-$(TCONFIG_EMF) += emf
124 obj-$(TCONFIG_EMF) += igs
126 obj-$(TCONFIG_BT) += openssl
127 obj-$(TCONFIG_BT) += libevent
128 obj-$(TCONFIG_BT) += libcurl
129 obj-$(TCONFIG_BT) += transmission
130 obj-$(TCONFIG_BT) += zlib
132 obj-$(CONFIG_LINUX26) += hotplug2
133 obj-$(CONFIG_LINUX26) += udev
135 ifeq ($(TCONFIG_OPENVPN),y)
136 export FULL_OPENSSL := y
137 else
138 ifeq ($(TCONFIG_FTP_SSL),y)
139 export FULL_OPENSSL := y
140 else
141 ifeq ($(TCONFIG_BT),y)
142 export FULL_OPENSSL := y
143 else
144 FULL_OPENSSL :=
145 endif
146 endif
147 endif
149 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
150 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
155 # Basic rules
158 all: clean-build libc $(obj-y) kernel
161 kernel: $(LINUXDIR)/.config
162 @$(SEP)
164 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
165 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
167 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
168 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
170 ifeq ($(CONFIG_LINUX26),y)
171 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
172 endif
175 lzma-loader:
176 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
178 lzma-loader-install: lzma-loader
179 @$(SEP)
182 kmod: dummy
183 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
185 testfind:
186 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
187 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
189 install package: $(obj-install) $(LINUXDIR)/.config
190 @$(SEP)
192 install -d $(TARGETDIR)
195 # kernel modules
196 $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
198 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded {} \;
199 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded {} \;
200 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded {} \;
201 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded {} \;
202 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded {} \;
203 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded {} \;
204 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded {} \;
206 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug {} \;
208 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
210 # nice and clean
211 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
212 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
213 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
214 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
215 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
216 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
217 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
218 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
219 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
220 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
222 ##!!TB
223 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
224 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
266 cd $(TARGETDIR)/lib/modules && rm -f */source || true
268 # misc
269 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
270 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
271 done
273 ifneq ($(TCONFIG_L7),y)
274 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
275 endif
277 # uClibc
278 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
279 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
280 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
281 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
282 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
283 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
284 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
285 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
286 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
287 ifeq ($(TCONFIG_SSH),y)
288 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
289 endif
290 ifeq ($(TCONFIG_BT),y)
291 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
292 endif
293 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
294 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
295 $(STRIP) $(TARGETDIR)/lib/*.so.0
296 endif
298 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
300 @echo ---
302 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
303 @$(SRCBASE)/btools/libfoo.pl
304 else
305 @$(SRCBASE)/btools/libfoo.pl --noopt
306 endif
307 @chmod 0555 $(TARGETDIR)/lib/*.so*
308 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
310 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
311 # separated/copied extra stuff
312 @rm -rf $(PLATFORMDIR)/extras
313 @mkdir $(PLATFORMDIR)/extras
314 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
316 $(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
317 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
319 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
320 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
321 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
322 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
323 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
324 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
325 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
326 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
327 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
328 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
329 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
330 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
331 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
332 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
333 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
334 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
336 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
337 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
338 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
339 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
340 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
341 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
343 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
357 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
358 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
359 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
360 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
361 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
362 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
363 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
365 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
366 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
367 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
368 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
369 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
370 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
373 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
375 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
376 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
377 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
378 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
379 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
383 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
384 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
385 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
387 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
394 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
395 ifneq ($(TCONFIG_USB),y)
396 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
397 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
398 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
399 endif
401 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
402 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
403 ifneq ($(TCONFIG_USB_EXTRAS),y)
404 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
405 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
406 endif
407 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
408 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
411 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
412 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
413 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
415 @mkdir -p $(PLATFORMDIR)/extras/apps
416 @mkdir -p $(PLATFORMDIR)/extras/lib
418 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
419 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
420 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
422 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
423 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
424 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
425 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
426 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
427 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
428 ifneq ($(NEED_EX_USB),y)
429 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
430 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
431 endif
432 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
434 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
435 ifeq ($(TCONFIG_L7PAT),y)
436 @cd layer7 && ./squish.sh
437 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
438 endif
440 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
441 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
442 @echo ---
444 @rm -f $(TARGETDIR)/lib/modules/*/build
446 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
447 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
449 # Package kernel and filesystem
450 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
451 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
452 # $(MAKE) -C $(LINUXDIR) zImage ; \
453 # else \
454 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
455 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
456 # fi
458 # Pad self-booting Linux to a 64 KB boundary
459 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
460 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
461 # Append filesystem to self-booting Linux
462 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
465 libc: $(LIBDIR)/ld-uClibc.so.0
466 # $(MAKE) -C ../../../tools-src/uClibc all
467 # $(MAKE) -C ../../../tools-src/uClibc install
471 # cleaners
474 clean: clean-build $(obj-clean)
475 rm -rf layer7/squished
476 rm -f .ipv6-y .ipv6-n
477 rm -f .fullssl-y .fullssl-n
478 make -C config clean
480 clean-build: dummy
481 rm -rf $(TARGETDIR)
482 rm -rf $(INSTALLDIR)
483 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
484 rm -rf $(PLATFORMDIR)/extras
486 distclean: clean
487 ifneq ($(INSIDE_MAK),1)
488 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
489 endif
490 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
493 # configuration
496 CONFIG_IN := config/config.in
498 config/conf config/mconf:
499 @$(MAKE) -C config
501 rconf: config/conf
502 @config/conf $(CONFIG_IN)
504 rmconf: config/mconf
505 @config/mconf $(CONFIG_IN)
507 roldconf: config/conf
508 @config/conf -o $(CONFIG_IN)
509 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
511 kconf:
512 @$(MAKE) -C $(LINUXDIR) config
514 kmconf:
515 @$(MAKE) -C $(LINUXDIR) menuconfig
517 koldconf:
518 @$(MAKE) -C $(LINUXDIR) oldconfig
519 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
521 bboldconf:
522 @$(MAKE) -C busybox oldconfig
524 config conf: rconf kconf
526 menuconfig mconf: rmconf kmconf
528 .ipv6-y .ipv6-n:
529 @rm -f .ipv6-y .ipv6-n
530 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
531 @touch $@
533 .fullssl-y .fullssl-n:
534 @rm -f .fullssl-y .fullssl-n
535 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
536 @touch $@
538 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
540 oldconfig oldconf: koldconf roldconf dependconf bboldconf
544 # overrides and extra dependencies
547 busybox: dummy
548 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
550 # V=1
552 busybox-install:
553 rm -rf $(INSTALLDIR)/busybox
554 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
556 busybox-clean:
557 $(MAKE) -C busybox distclean
559 busybox-config:
560 $(MAKE) -C busybox menuconfig
563 httpd: shared nvram mssl
564 @$(SEP)
565 @$(MAKE) -C httpd
567 www-install:
568 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
570 matrixssl:
571 @$(SEP)
572 @$(MAKE) -C matrixssl/src
574 matrixssl-install:
575 @true
577 matrixssl-clean:
578 $(MAKE) -C matrixssl/src clean
580 cyassl/stamp-h1:
581 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
582 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
583 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
584 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
585 PTHREAD_CFLAGS="-lpthread" PTHREAD_LIBS="-lpthread" \
586 $(CONFIGURE) --with-libz=no
587 @touch cyassl/stamp-h1
589 cyassl: cyassl/stamp-h1
590 @$(SEP)
591 @$(MAKE) -C cyassl
593 cyassl-clean:
594 -@$(MAKE) -C cyassl clean
595 @rm -f cyassl/stamp-h1
597 cyassl-install:
598 @true
600 ifeq ($(FULL_OPENSSL),y)
601 OPENSSL_CIPHERS:=enable-rc5
602 else
603 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
604 endif
606 openssl/stamp-h1:
607 cd openssl && \
608 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
609 -ffunction-sections -fdata-sections -Wl,--gc-sections \
610 shared $(OPENSSL_CIPHERS) \
611 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
612 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
613 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
614 no-zlib no-engine no-engines no-sse2 no-perlasm \
615 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
617 @$(MAKE) -C openssl clean
618 @touch openssl/stamp-h1
620 openssl: openssl/stamp-h1
622 openssl-clean:
623 -@$(MAKE) -C openssl clean
624 @rm -f openssl/stamp-h1
626 openssl-install: openssl
627 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
628 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
629 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
631 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
632 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
633 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
635 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
637 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
638 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
640 ifeq ($(FULL_OPENSSL),y)
641 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
642 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
643 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
644 endif
646 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
648 mdu: shared mssl
650 rc: nvram shared
652 bridge/Makefile:
653 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
654 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
656 bridge: bridge/Makefile
657 @$(SEP)
658 @$(MAKE) -C bridge
660 bridge-clean:
661 -@$(MAKE) -C bridge clean
662 @rm -f bridge/Makefile
664 bridge-install:
665 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
666 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
668 dnsmasq:
669 @$(SEP)
670 @$(MAKE) -C dnsmasq \
671 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
672 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
674 dnsmasq-install:
675 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
676 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
678 iptables:
679 @$(SEP)
680 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS)"
682 iptables-install:
683 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
684 cd $(INSTALLDIR)/iptables/usr/sbin && \
685 ln -sf iptables iptables-restore
687 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
688 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
690 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
692 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
693 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
694 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
696 ifeq ($(TCONFIG_IPV6),y)
697 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
698 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
699 cd $(INSTALLDIR)/iptables/usr/sbin && \
700 ln -sf ip6tables ip6tables-restore
701 endif
703 iptables-clean:
704 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
706 ppp:
707 @$(SEP)
708 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
709 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
711 ppp-%:
712 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
714 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
715 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
716 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
717 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
718 @touch rp-pppoe/src/stamp-h1
720 rp-pppoe: pppd rp-pppoe/src/stamp-h1
721 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
723 rp-pppoe-clean:
724 -$(MAKE) -C rp-pppoe/src clean
725 @rm -f rp-pppoe/src/pppoe-relay
726 @rm -f rp-pppoe/src/stamp-h1
728 rp-pppoe-install: rp-pppoe
729 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
730 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
731 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
732 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
735 upnp: nvram shared iptables
737 miniupnpd: iptables
738 @$(SEP)
739 $(MAKE) -C miniupnpd -f Makefile.tomato
741 miniupnpd-clean:
742 -$(MAKE) -C miniupnpd -f Makefile.tomato clean
744 miniupnpd-install:
745 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
746 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
748 # !!TB
749 shared: busybox
751 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
752 @$(SEP)
753 $(MAKE) -C vsftpd
755 vsftpd-install: vsftpd
756 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
757 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
759 ntfs-3g/Makefile:
760 cd ntfs-3g && \
761 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
762 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
763 $(CONFIGURE) --enable-shared=no --enable-static=no \
764 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
765 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
767 ntfs-3g: ntfs-3g/Makefile
768 @$(MAKE) -C ntfs-3g
770 ntfs-3g-clean:
771 -@$(MAKE) -C ntfs-3g clean
772 @rm -f ntfs-3g/Makefile
774 ntfs-3g-install: ntfs-3g
775 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
776 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
777 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
778 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
779 ln -sf ../bin/ntfs-3g mount.ntfs
781 libusb10/Makefile: libusb10/Makefile.in
782 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
783 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
785 libusb10: libusb10/Makefile
786 $(MAKE) -C $@
788 libusb10-install: libusb10
789 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
790 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
792 libusb10-clean:
793 -@$(MAKE) -C $@ clean
794 @rm -rf libusb10/Makefile
796 libusb/Makefile: libusb/Makefile.in
797 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
798 $(CONFIGURE) --prefix=/usr \
799 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
800 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
801 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
803 libusb: libusb10 libusb/Makefile
804 $(MAKE) -C $@
806 libusb-install: libusb
807 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
808 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
810 libusb-clean:
811 -@$(MAKE) -C $@ clean
812 @rm -rf libusb/Makefile
814 usbmodeswitch: libusb10
815 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
816 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
817 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
819 usbmodeswitchdb-install:
820 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
821 # compress whitespace
822 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
823 F=`basename $$D`; \
824 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
825 done
827 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
828 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
829 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
830 @mkdir -p $(TARGETDIR)/rom/etc
831 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
834 radvd/stamp-h1: radvd/Makefile.in
835 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
836 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
837 $(CONFIGURE) --prefix=""
838 @touch radvd/stamp-h1
840 radvd: radvd/stamp-h1
842 radvd-clean:
843 -@$(MAKE) -C radvd distclean
844 @rm -f radvd/stamp-h1
846 radvd-install:
847 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
848 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
850 dhcpv6/stamp-h1:
851 @cd dhcpv6 && \
852 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
853 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
854 ac_cv_func_setpgrp_void=yes \
855 $(CONFIGURE) --prefix= --with-localdbdir=/var
856 @$(MAKE) -C dhcpv6 clean
857 @touch dhcpv6/stamp-h1
859 dhcpv6: dhcpv6/stamp-h1
860 @$(SEP)
861 @$(MAKE) -C dhcpv6 dhcp6c
863 dhcpv6-install: dhcpv6
864 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
865 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
867 dhcpv6-clean:
868 -@$(MAKE) -C dhcpv6 clean
869 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
872 p910nd:
873 samba:
874 samba3:
876 nvram: shared
878 prebuilt: shared
880 vlan:
881 @$(SEP)
882 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
884 vlan-install:
885 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
886 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
889 pptp-client-install:
890 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
891 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
894 accel-pptp: pppd accel-pptp/Makefile
895 @$(MAKE) -C accel-pptp
897 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
898 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
899 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
901 accel-pptp-clean:
902 -@$(MAKE) -C accel-pptp clean
903 @rm -f accel-pptp/Makefile
905 accel-pptp-install: accel-pptp
906 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
907 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
910 pppd/Makefile: pppd/linux/Makefile.top
911 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
913 pppd: pppd/Makefile
914 @$(SEP)
915 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
917 pppd-clean:
918 -$(MAKE) -C pppd clean
919 @rm -f pppd/Makefile
921 pppd-install: pppd
922 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
923 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
924 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
925 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
926 ifeq ($(TCONFIG_L2TP),y)
927 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
928 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
929 endif
931 # ipupdate-install:
932 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
933 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
935 zebra/stamp-h1:
936 @cd zebra && rm -f config.cache && \
937 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
938 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
939 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
940 $(CONFIGURE) --sysconfdir=/etc \
941 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
942 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
943 @touch zebra/stamp-h1
945 zebra: zebra/stamp-h1
946 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
948 zebra-clean:
949 -@$(MAKE) -C zebra clean
950 @rm -f zebra/stamp-h1
952 zebra-install: zebra
953 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
954 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
955 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
956 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
957 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
958 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
961 rp-l2tp-install:
962 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
963 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
964 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
965 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
966 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
967 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
968 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
970 xl2tpd: pppd
971 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
973 xl2tpd-install: xl2tpd
974 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
975 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
978 bpalogin-install:
979 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
980 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
983 # libnet:
984 # @$(SEP)
985 # @-mkdir -p libnet/lib
986 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
988 # libpcap:
989 # @$(SEP)
990 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
992 libbcm:
993 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
995 libbcm-install:
996 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
997 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1000 iproute2:
1001 @$(SEP)
1002 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1004 iproute2-install: iproute2
1005 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1006 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1007 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1008 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1011 ntpc: nvram shared
1014 dropbear: dropbear/config.h
1015 @$(SEP)
1016 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1018 dropbear-install:
1019 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1020 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1021 cd $(INSTALLDIR)/dropbear/usr/bin && \
1022 ln -sf dropbearmulti dropbear && \
1023 ln -sf dropbearmulti dropbearconvert && \
1024 ln -sf dropbearmulti dropbearkey && \
1025 ln -sf dropbearmulti dbclient && \
1026 ln -sf dropbearmulti ssh && \
1027 ln -sf dropbearmulti scp
1029 dropbear-clean:
1030 -@$(MAKE) -C dropbear clean
1031 @rm -f dropbear/config.h
1033 dropbear/config.h:
1034 cd dropbear && \
1035 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1036 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1037 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1038 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1039 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1040 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty
1041 @$(MAKE) -C dropbear clean
1043 # Media libraries
1045 sqlite/stamp-h1:
1046 cd sqlite && \
1047 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1048 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1049 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1050 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1051 touch sqlite/stamp-h1
1053 sqlite: sqlite/stamp-h1
1054 @$(MAKE) -C sqlite all
1056 sqlite-clean:
1057 -@$(MAKE) -C sqlite clean
1058 @rm -f sqlite/stamp-h1
1060 sqlite-install: sqlite
1061 @$(SEP)
1062 ifneq ($(MEDIA_SERVER_STATIC),y)
1063 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1064 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1065 endif
1067 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1069 FFMPEG_DECODERS:=aac ac3 atrac3 h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1070 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1072 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1073 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1075 FFMPEG_PROTOCOLS:=file
1076 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1078 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
1079 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1081 ffmpeg/stamp-h1: zlib
1082 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1083 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1084 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1085 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1086 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1087 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1088 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1089 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1090 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1091 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1092 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1093 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1094 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1095 --extra-libs="-L$(TOP)/zlib -lz" \
1096 --enable-zlib --disable-debug --prefix=''
1097 touch ffmpeg/stamp-h1
1099 ffmpeg: ffmpeg/stamp-h1 zlib
1100 @$(MAKE) -C ffmpeg all
1102 ffmpeg-clean:
1103 -@$(MAKE) -C ffmpeg clean
1104 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1106 ffmpeg-install: ffmpeg
1107 @$(SEP)
1108 ifneq ($(MEDIA_SERVER_STATIC),y)
1109 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1110 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1111 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1112 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1113 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1114 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1115 endif
1117 libogg/stamp-h1:
1118 cd libogg && \
1119 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1120 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1121 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1122 touch libogg/stamp-h1
1124 libogg: libogg/stamp-h1
1125 @$(MAKE) -C libogg all
1127 libogg-clean:
1128 -@$(MAKE) -C libogg clean
1129 @rm -f libogg/stamp-h1
1131 libogg-install: libogg
1132 @$(SEP)
1133 ifneq ($(MEDIA_SERVER_STATIC),y)
1134 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1135 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1136 endif
1138 flac/stamp-h1: libogg
1139 cd flac && \
1140 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1141 CPPFLAGS="-I$(TOP)/libogg/include" \
1142 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1143 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1144 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1145 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1146 touch flac/stamp-h1
1148 flac: flac/stamp-h1 libogg
1149 @$(MAKE) -C flac/src/libFLAC all
1151 flac-clean:
1152 -@$(MAKE) -C flac clean
1153 @rm -f flac/stamp-h1
1155 flac-install: flac
1156 @$(SEP)
1157 ifneq ($(MEDIA_SERVER_STATIC),y)
1158 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1159 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1160 endif
1162 jpeg/stamp-h1:
1163 cd jpeg && \
1164 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1165 touch jpeg/stamp-h1
1167 jpeg: jpeg/stamp-h1
1168 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1170 jpeg-clean:
1171 -@$(MAKE) -C jpeg clean
1172 @rm -f jpeg/stamp-h1 jpeg/Makefile
1174 jpeg-install: jpeg
1175 @$(SEP)
1176 ifneq ($(MEDIA_SERVER_STATIC),y)
1177 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1178 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1179 endif
1181 libexif/stamp-h1:
1182 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1183 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1184 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1185 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1186 touch libexif/stamp-h1
1188 libexif: libexif/stamp-h1
1189 @$(MAKE) -C libexif all
1191 libexif-clean:
1192 -@$(MAKE) -C libexif clean
1193 @rm -f libexif/stamp-h1
1195 libexif-install: libexif
1196 @$(SEP)
1197 ifneq ($(MEDIA_SERVER_STATIC),y)
1198 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1199 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1200 endif
1202 zlib/stamp-h1:
1203 cd zlib && \
1204 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1205 ./configure --shared --prefix=''
1206 touch zlib/stamp-h1
1208 zlib: zlib/stamp-h1
1209 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1211 zlib-clean:
1212 -@$(MAKE) -C zlib clean
1213 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1215 zlib-install: zlib
1216 @$(SEP)
1217 ifneq ($(MEDIA_SERVER_STATIC),y)
1218 install -d $(INSTALLDIR)/zlib/usr/lib
1219 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1220 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1221 endif
1222 ifeq ($(TCONFIG_BT),y)
1223 install -d $(INSTALLDIR)/zlib/usr/lib
1224 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1225 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1226 endif
1228 libid3tag/stamp-h1: zlib
1229 cd libid3tag && \
1230 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1231 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1232 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1233 --disable-debugging --disable-profiling
1234 touch libid3tag/stamp-h1
1236 libid3tag: libid3tag/stamp-h1 zlib
1237 @$(MAKE) -C libid3tag all
1239 libid3tag-clean:
1240 -@$(MAKE) -C libid3tag clean
1241 @rm -f libid3tag/stamp-h1
1243 libid3tag-install: libid3tag
1244 @$(SEP)
1245 ifneq ($(MEDIA_SERVER_STATIC),y)
1246 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1247 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1248 endif
1250 libvorbis/stamp-h1: libogg
1251 cd libvorbis && \
1252 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1253 CPPFLAGS="-I$(TOP)/libogg/include" \
1254 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1255 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1256 --with-ogg-includes="$(TOP)/libogg/include" \
1257 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1258 touch libvorbis/stamp-h1
1260 libvorbis: libvorbis/stamp-h1
1261 @$(MAKE) -C libvorbis/lib all
1263 libvorbis-clean:
1264 -@$(MAKE) -C libvorbis clean
1265 @rm -f libvorbis/stamp-h1
1267 libvorbis-install: libvorbis
1268 @$(SEP)
1269 ifneq ($(MEDIA_SERVER_STATIC),y)
1270 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1271 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1272 endif
1274 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1275 @$(SEP)
1276 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1279 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1280 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1281 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1282 $(CONFIGURE) --prefix=/usr
1284 igmpproxy: igmpproxy/src/Makefile
1285 @$(SEP)
1286 @$(MAKE) -C igmpproxy/src
1288 igmpproxy-install: igmpproxy
1289 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1290 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1292 igmpproxy-clean:
1293 -$(MAKE) -C igmpproxy/src clean
1294 @rm -f igmpproxy/src/Makefile
1296 udev:
1297 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1298 PROGRAMS=udevtrigger
1300 udev-install: udev
1301 install -d $(INSTALLDIR)
1302 install -d $(TARGETDIR)
1303 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1305 hotplug2:
1306 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1308 hotplug2-install: hotplug2
1309 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1310 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1312 emf:
1313 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1315 emf-install: emf
1316 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1318 igs:
1319 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1321 igs-install: igs
1322 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1325 ebtables: dummy
1326 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1327 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1328 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1330 ebtables-install: ebtables
1331 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1333 @mkdir -p $(TARGETDIR)/rom/etc
1334 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1335 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1337 install -d $(INSTALLDIR)/ebtables/usr/lib
1338 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1339 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1340 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1342 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1343 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1344 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1346 ebtables-clean:
1347 make -C ebtables clean
1349 lzo/stamp-h1:
1350 cd lzo && \
1351 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1352 touch lzo/stamp-h1
1354 lzo: lzo/stamp-h1
1356 lzo-clean:
1357 -$(MAKE) -C lzo clean
1358 @rm -f lzo/stamp-h1
1360 lzo-install: lzo
1361 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1362 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1363 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1366 openvpn: openvpn/.conf openssl lzo
1368 openvpn/.conf:
1369 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1370 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1371 $(CONFIGURE) --prefix= \
1372 --with-lzo-headers="$(TOP)/lzo/include" \
1373 --with-ssl-headers="$(TOP)/openssl/include/" \
1374 --with-iproute-path="/usr/sbin/ip" \
1375 --disable-debug --disable-plugins --enable-management --enable-small \
1376 --disable-selinux --disable-socks --enable-password-save
1377 touch openvpn/.conf
1379 openvpn-clean:
1380 -$(MAKE) -C openvpn clean
1381 @rm -f openvpn/.conf
1383 openvpn-install: openvpn
1384 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1385 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1386 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1388 #shibby
1389 libcurl/Makefile: zlib openssl
1390 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1391 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1392 CPPFLAGS="-I$(TOP)/zlib" \
1393 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1394 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1395 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1396 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1397 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1398 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1399 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1400 --without-gnutls --without-krb4 --without-libidn \
1401 --with-linux-headers=$(LINUXDIR)/include \
1402 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1403 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1405 libcurl: libcurl/Makefile
1406 @$(MAKE) -C libcurl
1408 libcurl-clean:
1409 -@$(MAKE) -C libcurl clean
1410 @rm -f libcurl/Makefile
1412 libcurl-install: libcurl
1413 install -d $(INSTALLDIR)/libcurl/usr/lib
1414 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1415 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1416 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1417 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1418 ln -sf libcurl.so.4.2.0 libcurl.so
1420 libevent/Makefile:
1421 cd libevent && \
1422 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1423 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1424 $(CONFIGURE)
1426 libevent: libevent/Makefile
1427 @$(SEP)
1428 $(MAKE) -C libevent
1430 libevent-clean:
1431 -@$(MAKE) -C libevent clean
1432 @rm -f libevent/Makefile
1434 libevent-install: libevent
1435 install -d $(INSTALLDIR)/libevent/usr/lib
1436 install libevent/.libs/libevent-1.4.so.2.2.0 $(INSTALLDIR)/libevent/usr/lib/libevent-1.4.so.2.2.0
1437 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-1.4.so.2.2.0
1438 cd $(INSTALLDIR)/libevent/usr/lib/ && \
1439 ln -sf libevent-1.4.so.2.2.0 libevent-1.4.so.2 && \
1440 ln -sf libevent-1.4.so.2.2.0 libevent.so
1442 transmission/Makefile: openssl libcurl libevent zlib transmission/Makefile
1443 cd transmission && CC=$(CC) AR=$(AR) LD=$(LD) STRIP='mipsel-uclibc-strip' \
1444 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1445 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1446 CPPFLAGS="-I$(TOP)/zlib" \
1447 $(CONFIGURE) --prefix=/usr --disable-gtk --disable-nls \
1448 --enable-largefile \
1449 --with-ssl="$(TOP)/openssl" \
1450 --with-ssl-headers="$(TOP)/openssl/include/" \
1451 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1452 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1453 LIBEVENT_CFLAGS="-I$(TOP)/libevent" \
1454 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1455 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1456 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1458 transmission: transmission/Makefile
1459 @$(SEP)
1460 $(MAKE) -C transmission
1462 transmission-clean:
1463 -@$(MAKE) -C transmission clean
1464 @rm -f transmission/Makefile
1466 transmission-install: transmission
1467 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1468 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1469 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1470 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1471 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1472 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1473 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1474 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1477 # Generic rules
1481 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1484 %-clean:
1485 @-[ ! -d $* ] || $(MAKE) -C $* clean
1487 %-distclean:
1488 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1490 %-install: %
1491 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1493 %-build:
1494 $(MAKE) $*-clean $*
1496 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1498 .PHONY: all clean distclean mrproper install package
1499 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1500 .PHONY: dummy libnet libpcap