Transmission 2.33
[tomato.git] / release / src / router / Makefile
blob5bb83d45f10a14c122e54910a85038d752b1cdf6
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_BBT) += openssl
127 obj-$(TCONFIG_BBT) += libevent
128 obj-$(TCONFIG_BBT) += libcurl
129 obj-$(TCONFIG_BBT) += transmission
130 obj-$(TCONFIG_BT) += btgui
131 obj-$(TCONFIG_BBT) += zlib
133 obj-$(CONFIG_LINUX26) += hotplug2
134 obj-$(CONFIG_LINUX26) += udev
136 ifeq ($(TCONFIG_OPENVPN),y)
137 export FULL_OPENSSL := y
138 else
139 ifeq ($(TCONFIG_FTP_SSL),y)
140 export FULL_OPENSSL := y
141 else
142 ifeq ($(TCONFIG_BBT),y)
143 export FULL_OPENSSL := y
144 else
145 FULL_OPENSSL :=
146 endif
147 endif
148 endif
150 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
151 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
156 # Basic rules
159 all: clean-build libc $(obj-y) kernel
162 kernel: $(LINUXDIR)/.config
163 @$(SEP)
165 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
166 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
168 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
169 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
171 ifeq ($(CONFIG_LINUX26),y)
172 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
173 endif
176 lzma-loader:
177 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
179 lzma-loader-install: lzma-loader
180 @$(SEP)
183 kmod: dummy
184 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
186 testfind:
187 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
188 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
190 install package: $(obj-install) $(LINUXDIR)/.config
191 @$(SEP)
193 install -d $(TARGETDIR)
196 # kernel modules
197 $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
199 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded {} \;
200 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded {} \;
201 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded {} \;
202 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded {} \;
203 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded {} \;
204 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded {} \;
205 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded {} \;
207 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug {} \;
209 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
211 # nice and clean
212 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
213 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
214 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
215 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
216 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
217 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
218 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
219 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
220 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
221 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
223 ##!!TB
224 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
225 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
226 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
227 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
228 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
229 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
230 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
231 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
232 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
233 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
234 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
235 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
236 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
237 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
238 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
239 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
240 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
241 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
242 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
243 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
244 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
245 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
246 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
247 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
248 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
249 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
251 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
252 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
253 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
258 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
259 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
267 cd $(TARGETDIR)/lib/modules && rm -f */source || true
269 # misc
270 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
271 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
272 done
274 ifneq ($(TCONFIG_L7),y)
275 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
276 endif
278 # uClibc
279 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
280 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
281 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
282 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
283 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
284 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
285 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
286 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
287 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
288 ifeq ($(TCONFIG_SSH),y)
289 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
290 endif
291 ifeq ($(TCONFIG_BBT),y)
292 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
293 endif
294 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
295 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
296 $(STRIP) $(TARGETDIR)/lib/*.so.0
297 endif
299 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
301 @echo ---
303 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
304 @$(SRCBASE)/btools/libfoo.pl
305 else
306 @$(SRCBASE)/btools/libfoo.pl --noopt
307 endif
308 @chmod 0555 $(TARGETDIR)/lib/*.so*
309 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
311 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
312 # separated/copied extra stuff
313 @rm -rf $(PLATFORMDIR)/extras
314 @mkdir $(PLATFORMDIR)/extras
315 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
317 $(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
318 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
320 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
321 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
322 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
323 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
324 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
325 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
326 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
327 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
328 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
329 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
330 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
331 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
332 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
333 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
334 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
335 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
337 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
338 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
339 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
340 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
341 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
342 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
344 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
345 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
346 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
347 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
348 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
349 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
350 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
351 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
352 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
353 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
354 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
355 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
356 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
357 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
358 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
359 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
360 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
361 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
362 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
363 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
364 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
365 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
366 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
367 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
368 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
369 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
370 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
371 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
374 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
376 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
377 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
378 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
379 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
382 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
384 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
385 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
387 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
394 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
395 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
396 ifneq ($(TCONFIG_USB),y)
397 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
398 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
399 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
400 endif
402 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
403 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
404 ifneq ($(TCONFIG_USB_EXTRAS),y)
405 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
406 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
407 endif
408 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
409 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
410 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
411 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
412 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
413 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
414 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
416 @mkdir -p $(PLATFORMDIR)/extras/apps
417 @mkdir -p $(PLATFORMDIR)/extras/lib
419 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
420 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
421 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
423 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
424 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
425 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
426 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
427 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
428 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
429 ifneq ($(NEED_EX_USB),y)
430 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
431 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
432 endif
433 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
435 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
436 ifeq ($(TCONFIG_L7PAT),y)
437 @cd layer7 && ./squish.sh
438 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
439 endif
441 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
442 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
443 @echo ---
445 @rm -f $(TARGETDIR)/lib/modules/*/build
447 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
448 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
450 # Package kernel and filesystem
451 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
452 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
453 # $(MAKE) -C $(LINUXDIR) zImage ; \
454 # else \
455 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
456 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
457 # fi
459 # Pad self-booting Linux to a 64 KB boundary
460 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
461 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
462 # Append filesystem to self-booting Linux
463 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
466 libc: $(LIBDIR)/ld-uClibc.so.0
467 # $(MAKE) -C ../../../tools-src/uClibc all
468 # $(MAKE) -C ../../../tools-src/uClibc install
472 # cleaners
475 clean: clean-build $(obj-clean)
476 rm -rf layer7/squished
477 rm -f .ipv6-y .ipv6-n
478 rm -f .fullssl-y .fullssl-n
479 make -C config clean
481 clean-build: dummy
482 rm -rf $(TARGETDIR)
483 rm -rf $(INSTALLDIR)
484 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
485 rm -rf $(PLATFORMDIR)/extras
487 distclean: clean
488 ifneq ($(INSIDE_MAK),1)
489 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
490 endif
491 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
494 # configuration
497 CONFIG_IN := config/config.in
499 config/conf config/mconf:
500 @$(MAKE) -C config
502 rconf: config/conf
503 @config/conf $(CONFIG_IN)
505 rmconf: config/mconf
506 @config/mconf $(CONFIG_IN)
508 roldconf: config/conf
509 @config/conf -o $(CONFIG_IN)
510 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
512 kconf:
513 @$(MAKE) -C $(LINUXDIR) config
515 kmconf:
516 @$(MAKE) -C $(LINUXDIR) menuconfig
518 koldconf:
519 @$(MAKE) -C $(LINUXDIR) oldconfig
520 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
522 bboldconf:
523 @$(MAKE) -C busybox oldconfig
525 config conf: rconf kconf
527 menuconfig mconf: rmconf kmconf
529 .ipv6-y .ipv6-n:
530 @rm -f .ipv6-y .ipv6-n
531 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
532 @touch $@
534 .fullssl-y .fullssl-n:
535 @rm -f .fullssl-y .fullssl-n
536 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
537 @touch $@
539 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
541 oldconfig oldconf: koldconf roldconf dependconf bboldconf
545 # overrides and extra dependencies
548 busybox: dummy
549 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
551 # V=1
553 busybox-install:
554 rm -rf $(INSTALLDIR)/busybox
555 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
557 busybox-clean:
558 $(MAKE) -C busybox distclean
560 busybox-config:
561 $(MAKE) -C busybox menuconfig
564 httpd: shared nvram mssl
565 @$(SEP)
566 @$(MAKE) -C httpd
568 www-install:
569 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
571 matrixssl:
572 @$(SEP)
573 @$(MAKE) -C matrixssl/src
575 matrixssl-install:
576 @true
578 matrixssl-clean:
579 $(MAKE) -C matrixssl/src clean
581 cyassl/stamp-h1:
582 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
583 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
584 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
585 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
586 PTHREAD_CFLAGS="-lpthread" PTHREAD_LIBS="-lpthread" \
587 $(CONFIGURE) --with-libz=no
588 @touch cyassl/stamp-h1
590 cyassl: cyassl/stamp-h1
591 @$(SEP)
592 @$(MAKE) -C cyassl
594 cyassl-clean:
595 -@$(MAKE) -C cyassl clean
596 @rm -f cyassl/stamp-h1
598 cyassl-install:
599 @true
601 ifeq ($(FULL_OPENSSL),y)
602 OPENSSL_CIPHERS:=enable-rc5
603 else
604 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-tls1 no-tlsext
605 endif
607 openssl/stamp-h1:
608 cd openssl && \
609 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
610 -ffunction-sections -fdata-sections -Wl,--gc-sections \
611 shared $(OPENSSL_CIPHERS) \
612 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
613 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
614 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
615 no-zlib no-engine no-engines no-sse2 no-perlasm \
616 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
618 @$(MAKE) -C openssl clean
619 @touch openssl/stamp-h1
621 openssl: openssl/stamp-h1
623 openssl-clean:
624 -@$(MAKE) -C openssl clean
625 @rm -f openssl/stamp-h1
627 openssl-install: openssl
628 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
629 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
630 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
632 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
633 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
634 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
636 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
638 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
639 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
641 ifeq ($(FULL_OPENSSL),y)
642 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
643 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
644 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
645 endif
647 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
649 mdu: shared mssl
651 rc: nvram shared
653 bridge/Makefile:
654 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
655 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
657 bridge: bridge/Makefile
658 @$(SEP)
659 @$(MAKE) -C bridge
661 bridge-clean:
662 -@$(MAKE) -C bridge clean
663 @rm -f bridge/Makefile
665 bridge-install:
666 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
667 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
669 dnsmasq:
670 @$(SEP)
671 @$(MAKE) -C dnsmasq \
672 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
673 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
675 dnsmasq-install:
676 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
677 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
679 iptables:
680 @$(SEP)
681 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS)"
683 iptables-install:
684 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
685 cd $(INSTALLDIR)/iptables/usr/sbin && \
686 ln -sf iptables iptables-restore
688 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
689 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
691 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
693 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
694 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
695 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
697 ifeq ($(TCONFIG_IPV6),y)
698 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
699 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
700 cd $(INSTALLDIR)/iptables/usr/sbin && \
701 ln -sf ip6tables ip6tables-restore
702 endif
704 iptables-clean:
705 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
707 ppp:
708 @$(SEP)
709 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
710 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
712 ppp-%:
713 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
715 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
716 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
717 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
718 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
719 @touch rp-pppoe/src/stamp-h1
721 rp-pppoe: pppd rp-pppoe/src/stamp-h1
722 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
724 rp-pppoe-clean:
725 -$(MAKE) -C rp-pppoe/src clean
726 @rm -f rp-pppoe/src/pppoe-relay
727 @rm -f rp-pppoe/src/stamp-h1
729 rp-pppoe-install: rp-pppoe
730 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
731 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
732 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
733 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
736 upnp: nvram shared iptables
738 miniupnpd: iptables
739 @$(SEP)
740 $(MAKE) -C miniupnpd -f Makefile.tomato
742 miniupnpd-clean:
743 -$(MAKE) -C miniupnpd -f Makefile.tomato clean
745 miniupnpd-install:
746 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
747 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
749 # !!TB
750 shared: busybox
752 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
753 @$(SEP)
754 $(MAKE) -C vsftpd
756 vsftpd-install: vsftpd
757 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
758 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
760 ntfs-3g/Makefile:
761 cd ntfs-3g && \
762 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
763 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
764 $(CONFIGURE) --enable-shared=no --enable-static=no \
765 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
766 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
768 ntfs-3g: ntfs-3g/Makefile
769 @$(MAKE) -C ntfs-3g
771 ntfs-3g-clean:
772 -@$(MAKE) -C ntfs-3g clean
773 @rm -f ntfs-3g/Makefile
775 ntfs-3g-install: ntfs-3g
776 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
777 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
778 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
779 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
780 ln -sf ../bin/ntfs-3g mount.ntfs
782 libusb10/Makefile: libusb10/Makefile.in
783 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
784 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
786 libusb10: libusb10/Makefile
787 $(MAKE) -C $@
789 libusb10-install: libusb10
790 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
791 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
793 libusb10-clean:
794 -@$(MAKE) -C $@ clean
795 @rm -rf libusb10/Makefile
797 libusb/Makefile: libusb/Makefile.in
798 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
799 $(CONFIGURE) --prefix=/usr \
800 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
801 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
802 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
804 libusb: libusb10 libusb/Makefile
805 $(MAKE) -C $@
807 libusb-install: libusb
808 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
809 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
811 libusb-clean:
812 -@$(MAKE) -C $@ clean
813 @rm -rf libusb/Makefile
815 usbmodeswitch: libusb10
816 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
817 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
818 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
820 usbmodeswitchdb-install:
821 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
822 # compress whitespace
823 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
824 F=`basename $$D`; \
825 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
826 done
828 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
829 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
830 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
831 @mkdir -p $(TARGETDIR)/rom/etc
832 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
835 radvd/stamp-h1: radvd/Makefile.in
836 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
837 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
838 $(CONFIGURE) --prefix=""
839 @touch radvd/stamp-h1
841 radvd: radvd/stamp-h1
843 radvd-clean:
844 -@$(MAKE) -C radvd distclean
845 @rm -f radvd/stamp-h1
847 radvd-install:
848 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
849 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
851 dhcpv6/stamp-h1:
852 @cd dhcpv6 && \
853 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
854 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
855 ac_cv_func_setpgrp_void=yes \
856 $(CONFIGURE) --prefix= --with-localdbdir=/var
857 @$(MAKE) -C dhcpv6 clean
858 @touch dhcpv6/stamp-h1
860 dhcpv6: dhcpv6/stamp-h1
861 @$(SEP)
862 @$(MAKE) -C dhcpv6 dhcp6c
864 dhcpv6-install: dhcpv6
865 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
866 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
868 dhcpv6-clean:
869 -@$(MAKE) -C dhcpv6 clean
870 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
873 p910nd:
874 samba:
875 samba3:
877 nvram: shared
879 prebuilt: shared
881 vlan:
882 @$(SEP)
883 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
885 vlan-install:
886 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
887 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
890 pptp-client-install:
891 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
892 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
895 accel-pptp: pppd accel-pptp/Makefile
896 @$(MAKE) -C accel-pptp
898 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
899 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
900 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
902 accel-pptp-clean:
903 -@$(MAKE) -C accel-pptp clean
904 @rm -f accel-pptp/Makefile
906 accel-pptp-install: accel-pptp
907 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
908 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
911 pppd/Makefile: pppd/linux/Makefile.top
912 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
914 pppd: pppd/Makefile
915 @$(SEP)
916 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
918 pppd-clean:
919 -$(MAKE) -C pppd clean
920 @rm -f pppd/Makefile
922 pppd-install: pppd
923 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
924 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
925 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
926 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
927 ifeq ($(TCONFIG_L2TP),y)
928 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
929 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
930 endif
932 # ipupdate-install:
933 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
934 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
936 zebra/stamp-h1:
937 @cd zebra && rm -f config.cache && \
938 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
939 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
940 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
941 $(CONFIGURE) --sysconfdir=/etc \
942 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
943 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
944 @touch zebra/stamp-h1
946 zebra: zebra/stamp-h1
947 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
949 zebra-clean:
950 -@$(MAKE) -C zebra clean
951 @rm -f zebra/stamp-h1
953 zebra-install: zebra
954 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
955 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
956 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
957 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
958 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
959 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
962 rp-l2tp-install:
963 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
964 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
965 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
966 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
967 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
968 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
969 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
971 xl2tpd: pppd
972 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
974 xl2tpd-install: xl2tpd
975 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
976 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
979 bpalogin-install:
980 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
981 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
984 # libnet:
985 # @$(SEP)
986 # @-mkdir -p libnet/lib
987 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
989 # libpcap:
990 # @$(SEP)
991 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
993 libbcm:
994 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
996 libbcm-install:
997 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
998 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1001 iproute2:
1002 @$(SEP)
1003 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1005 iproute2-install: iproute2
1006 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1007 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1008 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1009 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1012 ntpc: nvram shared
1015 dropbear: dropbear/config.h
1016 @$(SEP)
1017 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1019 dropbear-install:
1020 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1021 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1022 cd $(INSTALLDIR)/dropbear/usr/bin && \
1023 ln -sf dropbearmulti dropbear && \
1024 ln -sf dropbearmulti dropbearconvert && \
1025 ln -sf dropbearmulti dropbearkey && \
1026 ln -sf dropbearmulti dbclient && \
1027 ln -sf dropbearmulti ssh && \
1028 ln -sf dropbearmulti scp
1030 dropbear-clean:
1031 -@$(MAKE) -C dropbear clean
1032 @rm -f dropbear/config.h
1034 dropbear/config.h:
1035 cd dropbear && \
1036 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1037 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1038 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1039 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1040 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1041 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty
1042 @$(MAKE) -C dropbear clean
1044 # Media libraries
1046 sqlite/stamp-h1:
1047 cd sqlite && \
1048 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1049 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1050 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1051 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1052 touch sqlite/stamp-h1
1054 sqlite: sqlite/stamp-h1
1055 @$(MAKE) -C sqlite all
1057 sqlite-clean:
1058 -@$(MAKE) -C sqlite clean
1059 @rm -f sqlite/stamp-h1
1061 sqlite-install: sqlite
1062 @$(SEP)
1063 ifneq ($(MEDIA_SERVER_STATIC),y)
1064 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1065 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1066 endif
1068 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1070 FFMPEG_DECODERS:=aac ac3 atrac3 h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1071 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1073 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1074 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1076 FFMPEG_PROTOCOLS:=file
1077 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1079 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
1080 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1082 ffmpeg/stamp-h1: zlib
1083 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1084 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1085 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1086 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1087 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1088 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1089 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1090 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1091 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1092 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1093 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1094 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1095 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1096 --extra-libs="-L$(TOP)/zlib -lz" \
1097 --enable-zlib --disable-debug --prefix=''
1098 touch ffmpeg/stamp-h1
1100 ffmpeg: ffmpeg/stamp-h1 zlib
1101 @$(MAKE) -C ffmpeg all
1103 ffmpeg-clean:
1104 -@$(MAKE) -C ffmpeg clean
1105 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1107 ffmpeg-install: ffmpeg
1108 @$(SEP)
1109 ifneq ($(MEDIA_SERVER_STATIC),y)
1110 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1111 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1112 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1113 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1114 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1115 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1116 endif
1118 libogg/stamp-h1:
1119 cd libogg && \
1120 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1121 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1122 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1123 touch libogg/stamp-h1
1125 libogg: libogg/stamp-h1
1126 @$(MAKE) -C libogg all
1128 libogg-clean:
1129 -@$(MAKE) -C libogg clean
1130 @rm -f libogg/stamp-h1
1132 libogg-install: libogg
1133 @$(SEP)
1134 ifneq ($(MEDIA_SERVER_STATIC),y)
1135 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1136 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1137 endif
1139 flac/stamp-h1: libogg
1140 cd flac && \
1141 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1142 CPPFLAGS="-I$(TOP)/libogg/include" \
1143 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1144 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1145 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1146 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1147 touch flac/stamp-h1
1149 flac: flac/stamp-h1 libogg
1150 @$(MAKE) -C flac/src/libFLAC all
1152 flac-clean:
1153 -@$(MAKE) -C flac clean
1154 @rm -f flac/stamp-h1
1156 flac-install: flac
1157 @$(SEP)
1158 ifneq ($(MEDIA_SERVER_STATIC),y)
1159 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1160 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1161 endif
1163 jpeg/stamp-h1:
1164 cd jpeg && \
1165 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1166 touch jpeg/stamp-h1
1168 jpeg: jpeg/stamp-h1
1169 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1171 jpeg-clean:
1172 -@$(MAKE) -C jpeg clean
1173 @rm -f jpeg/stamp-h1 jpeg/Makefile
1175 jpeg-install: jpeg
1176 @$(SEP)
1177 ifneq ($(MEDIA_SERVER_STATIC),y)
1178 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1179 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1180 endif
1182 libexif/stamp-h1:
1183 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1184 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1185 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1186 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1187 touch libexif/stamp-h1
1189 libexif: libexif/stamp-h1
1190 @$(MAKE) -C libexif all
1192 libexif-clean:
1193 -@$(MAKE) -C libexif clean
1194 @rm -f libexif/stamp-h1
1196 libexif-install: libexif
1197 @$(SEP)
1198 ifneq ($(MEDIA_SERVER_STATIC),y)
1199 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1200 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1201 endif
1203 zlib/stamp-h1:
1204 cd zlib && \
1205 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1206 ./configure --shared --prefix=''
1207 touch zlib/stamp-h1
1209 zlib: zlib/stamp-h1
1210 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1212 zlib-clean:
1213 -@$(MAKE) -C zlib clean
1214 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1216 zlib-install: zlib
1217 @$(SEP)
1218 ifneq ($(MEDIA_SERVER_STATIC),y)
1219 install -d $(INSTALLDIR)/zlib/usr/lib
1220 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1221 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1222 endif
1223 ifeq ($(TCONFIG_BT),y)
1224 install -d $(INSTALLDIR)/zlib/usr/lib
1225 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1226 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1227 endif
1229 libid3tag/stamp-h1: zlib
1230 cd libid3tag && \
1231 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1232 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1233 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1234 --disable-debugging --disable-profiling
1235 touch libid3tag/stamp-h1
1237 libid3tag: libid3tag/stamp-h1 zlib
1238 @$(MAKE) -C libid3tag all
1240 libid3tag-clean:
1241 -@$(MAKE) -C libid3tag clean
1242 @rm -f libid3tag/stamp-h1
1244 libid3tag-install: libid3tag
1245 @$(SEP)
1246 ifneq ($(MEDIA_SERVER_STATIC),y)
1247 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1248 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1249 endif
1251 libvorbis/stamp-h1: libogg
1252 cd libvorbis && \
1253 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1254 CPPFLAGS="-I$(TOP)/libogg/include" \
1255 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1256 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1257 --with-ogg-includes="$(TOP)/libogg/include" \
1258 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1259 touch libvorbis/stamp-h1
1261 libvorbis: libvorbis/stamp-h1
1262 @$(MAKE) -C libvorbis/lib all
1264 libvorbis-clean:
1265 -@$(MAKE) -C libvorbis clean
1266 @rm -f libvorbis/stamp-h1
1268 libvorbis-install: libvorbis
1269 @$(SEP)
1270 ifneq ($(MEDIA_SERVER_STATIC),y)
1271 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1272 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1273 endif
1275 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1276 @$(SEP)
1277 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1280 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1281 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1282 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1283 $(CONFIGURE) --prefix=/usr
1285 igmpproxy: igmpproxy/src/Makefile
1286 @$(SEP)
1287 @$(MAKE) -C igmpproxy/src
1289 igmpproxy-install: igmpproxy
1290 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1291 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1293 igmpproxy-clean:
1294 -$(MAKE) -C igmpproxy/src clean
1295 @rm -f igmpproxy/src/Makefile
1297 udev:
1298 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1299 PROGRAMS=udevtrigger
1301 udev-install: udev
1302 install -d $(INSTALLDIR)
1303 install -d $(TARGETDIR)
1304 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1306 hotplug2:
1307 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1309 hotplug2-install: hotplug2
1310 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1311 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1313 emf:
1314 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1316 emf-install: emf
1317 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1319 igs:
1320 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1322 igs-install: igs
1323 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1326 ebtables: dummy
1327 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1328 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1329 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1331 ebtables-install: ebtables
1332 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1334 @mkdir -p $(TARGETDIR)/rom/etc
1335 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1336 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1338 install -d $(INSTALLDIR)/ebtables/usr/lib
1339 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1340 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1341 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1343 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1344 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1345 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1347 ebtables-clean:
1348 make -C ebtables clean
1350 lzo/stamp-h1:
1351 cd lzo && \
1352 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1353 touch lzo/stamp-h1
1355 lzo: lzo/stamp-h1
1357 lzo-clean:
1358 -$(MAKE) -C lzo clean
1359 @rm -f lzo/stamp-h1
1361 lzo-install: lzo
1362 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1363 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1364 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1367 openvpn: openvpn/.conf openssl lzo
1369 openvpn/.conf:
1370 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1371 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1372 $(CONFIGURE) --prefix= \
1373 --with-lzo-headers="$(TOP)/lzo/include" \
1374 --with-ssl-headers="$(TOP)/openssl/include/" \
1375 --with-iproute-path="/usr/sbin/ip" \
1376 --disable-debug --disable-plugins --enable-management --enable-small \
1377 --disable-selinux --disable-socks --enable-password-save
1378 touch openvpn/.conf
1380 openvpn-clean:
1381 -$(MAKE) -C openvpn clean
1382 @rm -f openvpn/.conf
1384 openvpn-install: openvpn
1385 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1386 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1387 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1389 #shibby
1390 libcurl/stamp-h1: zlib openssl
1391 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1392 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1393 CPPFLAGS="-I$(TOP)/zlib" \
1394 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1395 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1396 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1397 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1398 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1399 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1400 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1401 --without-gnutls --without-krb4 --without-libidn \
1402 --with-linux-headers=$(LINUXDIR)/include \
1403 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1404 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1405 touch libcurl/stamp-h1
1407 libcurl: libcurl/stamp-h1
1408 @$(MAKE) -C libcurl
1410 libcurl-clean:
1411 -@$(MAKE) -C libcurl clean
1412 @rm -f libcurl/stamp-h1 libcurl/Makefile
1414 libcurl-install: libcurl
1415 install -d $(INSTALLDIR)/libcurl/usr/lib
1416 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1417 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1418 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1419 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1420 ln -sf libcurl.so.4.2.0 libcurl.so
1422 libevent/stamp-h1:
1423 cd libevent && CC=$(CC) \
1424 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1425 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1426 $(CONFIGURE)
1427 touch libevent/stamp-h1
1429 libevent: libevent/stamp-h1
1430 @$(SEP)
1431 $(MAKE) -C libevent
1433 libevent-clean:
1434 -@$(MAKE) -C libevent clean
1435 @rm -f libevent/stamp-h1 libevent/Makefile
1437 libevent-install: libevent
1438 install -d $(INSTALLDIR)/libevent/usr/lib
1439 install libevent/.libs/libevent-2.0.so.5.1.0 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1440 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1442 transmission/stamp-h1: openssl libcurl libevent zlib
1443 cd transmission && CC=$(CC) AR=$(AR) LD=$(LD) STRIP='mipsel-uclibc-strip' \
1444 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1445 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1446 -ffunction-sections -fdata-sections \
1447 -O2 -O0 -std=gnu99 -ggdb3 -W -Wpointer-arith -Wformat-security -Wcast-align -Wundef \
1448 -Wcast-align -Wstrict-prototypes -Wmissing-declarations -Wmissing-format-attribute \
1449 -Wredundant-decls -Wnested-externs -Wunused-parameter -Wwrite-strings -Winline -Wfloat-equal \
1450 -Wextra -Wdeclaration-after-statement -Winit-self" \
1451 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1452 CPPFLAGS="-I$(TOP)/zlib -O3 -DTR_EMBEDDED" \
1453 ac_cv_header_libintl_h=no \
1454 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-gtk --disable-nls \
1455 --enable-lightweight --enable-largefile --enable-utp \
1456 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1457 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1458 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1459 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1460 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1461 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1462 touch transmission/stamp-h1
1464 transmission: transmission/stamp-h1
1465 @$(SEP)
1466 $(MAKE) -C transmission
1468 transmission-clean:
1469 -@$(MAKE) -C transmission clean
1470 @rm -f transmission/stamp-h1 transmission/Makefile
1472 transmission-install: transmission
1473 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1474 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1475 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1476 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1477 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1478 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1479 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1480 ifeq ($(TCONFIG_TR_EXTRAS),y)
1481 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-create
1482 else
1483 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1484 endif
1486 btgui:
1487 @$(SEP)
1489 btgui-install: btgui
1490 install -d $(INSTALLDIR)/btgui/usr/bin
1491 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1492 install -D transmission/btqueue $(INSTALLDIR)/btgui/usr/bin/btqueue
1495 # Generic rules
1499 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1502 %-clean:
1503 @-[ ! -d $* ] || $(MAKE) -C $* clean
1505 %-distclean:
1506 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1508 %-install: %
1509 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1511 %-build:
1512 $(MAKE) $*-clean $*
1514 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1516 .PHONY: all clean distclean mrproper install package
1517 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1518 .PHONY: dummy libnet libpcap