USB: Driver for CH341 USB-serial adaptor
[tomato.git] / release / src / router / Makefile
blobab0f530a9d1d3bb87d3c4a04322b294a9c976ab7
2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
5 # All Rights Reserved.
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 include common.mak
16 #TOMATO_EXPERIMENTAL=0
21 SEP=echo "\033[41;1m $@ \033[0m"
24 # standard packages
26 obj-y += lzma-loader
27 obj-y += nvram
28 obj-y += shared
29 obj-y += prebuilt
30 obj-y += igmpproxy
31 obj-y += iptables
32 obj-y += rc
33 obj-y += iproute2
34 obj-y += rom
35 obj-y += others
36 obj-y += busybox
37 obj-y += httpd
38 obj-y += www
39 obj-y += bridge
40 obj-y += dnsmasq
41 obj-y += etc
42 # obj-y += vlan # use Busybox vconfig
43 obj-y += pppd
44 obj-y += rp-pppoe
45 obj-y += utils
46 obj-y += ntpc
47 obj-y += rstats
48 obj-y += cstats
49 obj-y += udpxy
50 obj-$(TCONFIG_TOR) += tor
51 obj-$(TCONFIG_TOR) += libevent
52 obj-$(TCONFIG_TOR) += zlib
53 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
54 obj-$(TCONFIG_SNMP) += snmp
55 obj-$(TCONFIG_SDHC) += mmc
57 # !!TB - updated Broadcom Wireless driver
58 obj-y += et
59 obj-y += libbcmcrypto
60 obj-y += wlconf
62 obj-y += cyassl
63 obj-y += mssl
64 obj-y += mdu
66 obj-$(TCONFIG_NFS) += portmap
67 obj-$(TCONFIG_NFS) += e2fsprogs
68 obj-$(TCONFIG_NFS) += libevent
69 obj-$(TCONFIG_NFS) += libnfsidmap
70 obj-$(TCONFIG_NFS) += nfs-utils
72 #Roadkill
73 obj-$(TCONFIG_NOCAT) += nocat
75 # !!TB
76 obj-$(TCONFIG_USB) += p910nd
78 obj-$(TCONFIG_UPS) += apcupsd
80 ifeq ($(CONFIG_LINUX26),y)
81 obj-$(TCONFIG_USB) += sd-idle
82 else
83 obj-$(TCONFIG_USB) += scsi-idle
84 endif
86 obj-y += libusb10
87 #obj-y += libusb
88 obj-y += usbmodeswitch
89 obj-$(TCONFIG_FTP) += vsftpd
91 ifeq ($(CONFIG_LINUX26),y)
92 ifeq ($(TCONFIG_SAMBASRV),y)
93 NEED_EX_NLS = y
94 endif
95 ifeq ($(TCONFIG_USB_EXTRAS),y)
96 NEED_EX_USB = y
97 endif
98 endif
100 ifeq ($(TCONFIG_SAMBASRV),y)
101 ifeq ($(TCONFIG_SAMBA3),y)
102 NEED_SAMBA3 = y
103 else
104 NEED_SAMBA2 = y
105 endif
106 endif
108 ifeq ($(TCONFIG_IPV6),y)
109 export TCONFIG_IPV6 := y
110 else
111 TCONFIG_IPV6 :=
112 endif
114 obj-$(NEED_SAMBA2) += samba
115 obj-$(NEED_SAMBA3) += samba3
116 obj-$(TCONFIG_NTFS) += ntfs-3g
117 obj-$(TCONFIG_EBTABLES) += ebtables
118 obj-$(TCONFIG_IPV6) += radvd
119 obj-$(TCONFIG_IPV6) += dhcpv6
121 obj-$(TCONFIG_MEDIA_SERVER) += zlib
122 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
123 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
124 obj-$(TCONFIG_MEDIA_SERVER) += libogg
125 obj-$(TCONFIG_MEDIA_SERVER) += flac
126 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
127 obj-$(TCONFIG_MEDIA_SERVER) += libexif
128 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
129 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
130 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
131 MEDIA_SERVER_STATIC=y
133 obj-y += miniupnpd
134 # obj-y += upnp
138 # configurable packages
140 obj-$(TCONFIG_L2TP) += xl2tpd
141 obj-$(TCONFIG_PPTP) += accel-pptp
142 obj-$(TCONFIG_PPTPD) += pptpd
143 obj-$(TCONFIG_HTTPS) += openssl
144 obj-$(TCONFIG_SSH) += dropbear
145 obj-$(TCONFIG_ZEBRA) += zebra
146 # obj-$(TCONFIG_IPP2P) += ipp2p
147 obj-$(TCONFIG_LZO) += lzo
148 obj-$(TCONFIG_OPENVPN) += openvpn
149 obj-$(TCONFIG_EMF) += emf
150 obj-$(TCONFIG_EMF) += igs
152 obj-$(TCONFIG_BBT) += openssl
153 obj-$(TCONFIG_BBT) += libevent
154 obj-$(TCONFIG_BBT) += libcurl
155 obj-$(TCONFIG_BBT) += transmission
156 obj-$(TCONFIG_BT) += btgui
157 obj-$(TCONFIG_BBT) += zlib
158 obj-$(TCONFIG_BBT) += libiconv
160 obj-$(CONFIG_LINUX26) += hotplug2
161 obj-$(CONFIG_LINUX26) += udevtrigger
163 ifeq ($(TCONFIG_OPENVPN),y)
164 export FULL_OPENSSL := y
165 else
166 ifeq ($(TCONFIG_FTP_SSL),y)
167 export FULL_OPENSSL := y
168 else
169 ifeq ($(TCONFIG_BBT),y)
170 export FULL_OPENSSL := y
171 else
172 ifeq ($(TCONFIG_TOR),y)
173 export FULL_OPENSSL := y
174 else
175 FULL_OPENSSL :=
176 endif
177 endif
178 endif
179 endif
181 obj-y += wanuptime
183 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
184 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
189 # Basic rules
192 all: clean-build libc $(obj-y) kernel
195 kernel: $(LINUXDIR)/.config
196 @$(SEP)
198 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
199 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
201 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
202 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
204 ifeq ($(CONFIG_LINUX26),y)
205 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
206 endif
209 lzma-loader:
210 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
212 lzma-loader-install: lzma-loader
213 @$(SEP)
216 kmod: dummy
217 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
219 testfind:
220 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
221 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
223 install package: $(obj-install) $(LINUXDIR)/.config
224 @$(SEP)
226 install -d $(TARGETDIR)
229 # kernel modules
230 $(MAKE) -C $(LINUXDIR) modules_install \
231 INSTALL_MOD_STRIP="--strip-debug -x -R .comment -R .note -R .pdr -R .mdebug.abi32 -R .note.gnu.build-id -R .gnu.attributes -R .reginfo" \
232 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
234 ifneq ($(CONFIG_LINUX26),y)
235 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
236 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
237 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
238 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
239 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
240 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
241 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
243 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
244 endif
246 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
248 # nice and clean
249 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
250 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
251 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
252 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
253 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
254 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
255 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
257 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
258 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
260 ##!!TB
261 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
264 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
265 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
266 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
267 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
285 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
288 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
291 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
292 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
293 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
294 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
295 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
296 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
297 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
298 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
299 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
300 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
301 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
302 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
303 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
304 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
305 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
307 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
308 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
309 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
310 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
311 cd $(TARGETDIR)/lib/modules && rm -f */source || true
313 # misc
314 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
315 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
316 done
318 ifneq ($(TCONFIG_L7),y)
319 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
320 endif
322 # uClibc
323 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
324 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
325 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
326 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
327 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
328 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
329 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
330 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
331 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
332 ifeq ($(TCONFIG_SSH),y)
333 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
334 endif
335 ifeq ($(TCONFIG_BBT),y)
336 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
337 endif
338 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
339 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
340 $(STRIP) $(TARGETDIR)/lib/*.so.0
341 endif
343 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
345 @echo ---
347 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
348 @$(SRCBASE)/btools/libfoo.pl
349 else
350 @$(SRCBASE)/btools/libfoo.pl --noopt
351 endif
352 @chmod 0555 $(TARGETDIR)/lib/*.so*
353 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
355 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
356 # separated/copied extra stuff
357 @rm -rf $(PLATFORMDIR)/extras
358 @mkdir $(PLATFORMDIR)/extras
359 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
361 $(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
362 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
364 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
365 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
366 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
367 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
368 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
369 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
370 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
371 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
372 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
373 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
374 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
377 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
378 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
379 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
382 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
383 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
384 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
385 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
386 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
388 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
389 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
390 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
391 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
392 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
393 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
394 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
395 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
396 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
398 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
399 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
400 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
401 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
402 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
403 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
404 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
405 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
406 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
407 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
408 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
409 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
410 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
411 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
412 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
413 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
414 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
415 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
416 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
417 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
418 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
419 @mv $(TARGETDIR)/lib/modules/*/kernel/crypto/* $(PLATFORMDIR)/extras/ || true
420 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/crypto || true
422 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
424 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
425 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
426 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
427 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
428 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
430 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
432 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
433 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
436 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
438 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
440 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
441 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
442 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
443 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
445 ifneq ($(TCONFIG_USB),y)
446 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
447 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
448 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
449 endif
451 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
452 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
453 ifneq ($(TCONFIG_USB_EXTRAS),y)
454 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
455 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
456 endif
457 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
458 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
459 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
460 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
461 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
462 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
463 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
465 @mkdir -p $(PLATFORMDIR)/extras/apps
466 @mkdir -p $(PLATFORMDIR)/extras/lib
468 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
469 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
470 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
472 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
473 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
474 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
475 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
476 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
477 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
478 ifneq ($(NEED_EX_USB),y)
479 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
480 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
481 endif
482 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
484 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
485 ifeq ($(TCONFIG_L7PAT),y)
486 @cd layer7 && ./squish.sh
487 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
488 endif
490 ifeq ($(TCONFIG_PPTPD),y)
491 @mkdir -p $(TARGETDIR)/rom/etc/vpn
492 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
493 chmod +x $(TARGETDIR)/rom/etc/vpn/*
494 endif
496 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
497 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
498 @echo ---
500 @rm -f $(TARGETDIR)/lib/modules/*/build
502 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
503 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
505 # Package kernel and filesystem
506 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
507 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
508 # $(MAKE) -C $(LINUXDIR) zImage ; \
509 # else \
510 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
511 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
512 # fi
514 # Pad self-booting Linux to a 64 KB boundary
515 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
516 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
517 # Append filesystem to self-booting Linux
518 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
521 libc: $(LIBDIR)/ld-uClibc.so.0
522 # $(MAKE) -C ../../../tools-src/uClibc all
523 # $(MAKE) -C ../../../tools-src/uClibc install
527 # cleaners
530 clean: clean-build $(obj-clean)
531 rm -rf layer7/squished
532 rm -f .ipv6-y .ipv6-n
533 rm -f .fullssl-y .fullssl-n
534 make -C config clean
536 clean-build: dummy
537 rm -rf $(TARGETDIR)
538 rm -rf $(INSTALLDIR)
539 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
540 rm -rf $(PLATFORMDIR)/extras
542 distclean: clean
543 ifneq ($(INSIDE_MAK),1)
544 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
545 endif
546 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
549 # configuration
552 CONFIG_IN := config/config.in
554 config/conf config/mconf:
555 @$(MAKE) -C config
557 rconf: config/conf
558 @config/conf $(CONFIG_IN)
560 rmconf: config/mconf
561 @config/mconf $(CONFIG_IN)
563 roldconf: config/conf
564 @config/conf -o $(CONFIG_IN)
565 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
567 kconf:
568 @$(MAKE) -C $(LINUXDIR) config
570 kmconf:
571 @$(MAKE) -C $(LINUXDIR) menuconfig
573 koldconf:
574 @$(MAKE) -C $(LINUXDIR) oldconfig
575 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
577 bboldconf:
578 @$(MAKE) -C busybox oldconfig
580 config conf: rconf kconf
582 menuconfig mconf: rmconf kmconf
584 .ipv6-y .ipv6-n:
585 @rm -f .ipv6-y .ipv6-n
586 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
587 @touch $@
589 .fullssl-y .fullssl-n:
590 @rm -f .fullssl-y .fullssl-n
591 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
592 @touch $@
594 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
596 oldconfig oldconf: koldconf roldconf dependconf bboldconf
600 # overrides and extra dependencies
603 busybox: dummy
604 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
606 # V=1
608 busybox-install:
609 rm -rf $(INSTALLDIR)/busybox
610 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
612 busybox-clean:
613 -@$(MAKE) -C busybox distclean
615 busybox-config:
616 $(MAKE) -C busybox menuconfig
619 httpd: shared nvram mssl
620 @$(SEP)
621 @$(MAKE) -C httpd
623 www-install:
624 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
626 matrixssl:
627 @$(SEP)
628 @$(MAKE) -C matrixssl/src
630 matrixssl-install:
631 @true
633 matrixssl-clean:
634 -@$(MAKE) -C matrixssl/src clean
636 cyassl/stamp-h1:
637 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
638 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
639 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
640 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
641 PTHREAD_LIBS="-lpthread" \
642 $(CONFIGURE)
643 @touch cyassl/stamp-h1
645 cyassl: cyassl/stamp-h1
646 @$(SEP)
647 @$(MAKE) -C cyassl
649 cyassl-clean:
650 -@$(MAKE) -C cyassl clean
651 @rm -f cyassl/stamp-h1
653 cyassl-install:
654 @true
656 ifeq ($(FULL_OPENSSL),y)
657 OPENSSL_CIPHERS:=enable-rc5
658 else
659 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-engine
660 # no-tls1 no-tlsext
661 # openssl 1.0.1 doesn't build when using "no-tlsext" or "no-tls1"
662 endif
664 openssl/stamp-h1:
665 cd openssl && \
666 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
667 -ffunction-sections -fdata-sections -Wl,--gc-sections \
668 shared $(OPENSSL_CIPHERS) \
669 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
670 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
671 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
672 no-zlib no-engines no-sse2 no-perlasm \
673 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
675 @$(MAKE) -C openssl clean
676 @touch openssl/stamp-h1
678 openssl: openssl/stamp-h1
680 openssl-clean:
681 -@$(MAKE) -C openssl clean
682 @rm -f openssl/stamp-h1
684 openssl-install: openssl
685 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
686 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
687 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
689 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
690 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
691 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
693 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
695 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
696 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
698 ifeq ($(FULL_OPENSSL),y)
699 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
700 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
701 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
702 endif
704 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
706 mdu: shared mssl
708 rc: nvram shared
710 bridge/Makefile:
711 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
712 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
714 bridge: bridge/Makefile
715 @$(SEP)
716 @$(MAKE) -C bridge
718 bridge-clean:
719 -@$(MAKE) -C bridge clean
720 @rm -f bridge/Makefile
722 bridge-install:
723 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
724 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
726 dnsmasq:
727 @$(SEP)
728 @$(MAKE) -C dnsmasq \
729 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
730 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
732 dnsmasq-install:
733 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
734 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
736 iptables:
737 @$(SEP)
738 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
740 iptables-install:
741 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
742 cd $(INSTALLDIR)/iptables/usr/sbin && \
743 ln -sf iptables iptables-restore
745 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
746 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
748 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
750 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
751 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
752 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
754 ifeq ($(TCONFIG_IPV6),y)
755 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
756 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
757 cd $(INSTALLDIR)/iptables/usr/sbin && \
758 ln -sf ip6tables ip6tables-restore
759 endif
761 iptables-clean:
762 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
764 ppp:
765 @$(SEP)
766 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
767 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
769 ppp-%:
770 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
772 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
773 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
774 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
775 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
776 @touch rp-pppoe/src/stamp-h1
778 rp-pppoe: pppd rp-pppoe/src/stamp-h1
779 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
781 rp-pppoe-clean:
782 -@$(MAKE) -C rp-pppoe/src clean
783 @rm -f rp-pppoe/src/pppoe-relay
784 @rm -f rp-pppoe/src/stamp-h1
786 rp-pppoe-install: rp-pppoe
787 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
788 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
789 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
790 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
793 upnp: nvram shared iptables
795 miniupnpd-config:
796 @cd miniupnpd && ./genconfig.sh
798 miniupnpd: iptables miniupnpd-config
799 @$(SEP)
800 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
801 TARGET_OPENWRT="not really" CC=$(CC) \
802 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
803 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
805 miniupnpd-clean:
806 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
807 @rm -f miniupnpd/config.h
809 miniupnpd-install:
810 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
811 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
813 # !!TB
814 shared: busybox
816 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
817 @$(SEP)
818 $(MAKE) -C vsftpd
820 vsftpd-install: vsftpd
821 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
822 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
824 ntfs-3g/Makefile:
825 cd ntfs-3g && \
826 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
827 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
828 $(CONFIGURE) --enable-shared=no --enable-static=no \
829 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
830 --disable-ntfsprogs --disable-crypto --without-uuid \
831 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
833 ntfs-3g: ntfs-3g/Makefile
834 @$(MAKE) -C ntfs-3g
836 ntfs-3g-clean:
837 -@$(MAKE) -C ntfs-3g clean
838 @rm -f ntfs-3g/Makefile
840 ntfs-3g-install: ntfs-3g
841 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
842 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
843 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
844 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
845 ln -sf ../bin/ntfs-3g mount.ntfs
847 libusb10/Makefile: libusb10/Makefile.in
848 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
849 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
851 libusb10: libusb10/Makefile
852 $(MAKE) -C $@
854 libusb10-install: libusb10
855 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
856 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
858 libusb10-clean:
859 -@$(MAKE) -C $@ clean
860 @rm -rf libusb10/Makefile
862 libusb/Makefile: libusb/Makefile.in
863 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
864 $(CONFIGURE) --prefix=/usr \
865 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
866 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
867 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
869 libusb: libusb10 libusb/Makefile
870 $(MAKE) -C $@
872 libusb-install: libusb
873 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
874 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
876 libusb-clean:
877 -@$(MAKE) -C $@ clean
878 @rm -rf libusb/Makefile
880 usbmodeswitch: libusb10
881 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
882 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
883 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
885 usbmodeswitchdb-install:
886 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
887 # compress whitespace
888 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
889 F=`basename $$D`; \
890 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
891 done
893 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
894 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
895 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
896 @mkdir -p $(TARGETDIR)/rom/etc
897 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
900 radvd/stamp-h1:
901 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
902 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
903 $(CONFIGURE) --prefix=""
904 @$(MAKE) -C radvd clean
905 @touch radvd/stamp-h1
907 radvd: radvd/stamp-h1
909 radvd-clean:
910 -@$(MAKE) -C radvd distclean
911 @rm -f radvd/stamp-h1
913 radvd-install: radvd
914 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
915 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
917 dhcpv6/stamp-h1:
918 @cd dhcpv6 && \
919 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
920 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
921 ac_cv_func_setpgrp_void=yes \
922 $(CONFIGURE) --prefix= --with-localdbdir=/var
923 @$(MAKE) -C dhcpv6 clean
924 @touch dhcpv6/stamp-h1
926 dhcpv6: dhcpv6/stamp-h1
927 @$(SEP)
928 @$(MAKE) -C dhcpv6 dhcp6c
930 dhcpv6-install: dhcpv6
931 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
932 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
934 dhcpv6-clean:
935 -@$(MAKE) -C dhcpv6 clean
936 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
939 p910nd:
940 samba:
941 samba3:
943 nvram: shared
945 prebuilt: shared
947 vlan:
948 @$(SEP)
949 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
951 vlan-install:
952 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
953 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
956 pptp-client-install:
957 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
958 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
961 accel-pptp: pppd accel-pptp/Makefile
962 @$(MAKE) -C accel-pptp
964 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
965 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
966 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
968 accel-pptp-clean:
969 -@$(MAKE) -C accel-pptp clean
970 @rm -f accel-pptp/Makefile
972 accel-pptp-install: accel-pptp
973 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
974 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
976 pptpd/stamp-h1:
977 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
978 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
979 touch pptpd/stamp-h1
981 pptpd: pptpd/stamp-h1
983 pptpd-install: pptpd
984 @echo pptpd
985 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
986 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
987 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
988 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
989 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
990 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
992 pptpd-clean:
993 -@$(MAKE) -C pptpd clean
994 rm -rf pptpd/stamp-h1 pptpd/.deps
996 pppd/Makefile: pppd/linux/Makefile.top
997 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
999 pppd: pppd/Makefile
1000 @$(SEP)
1001 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1003 pppd-clean:
1004 -@$(MAKE) -C pppd clean
1005 @rm -f pppd/Makefile
1007 pppd-install: pppd
1008 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1009 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1010 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1011 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1012 ifeq ($(TCONFIG_L2TP),y)
1013 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1014 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1015 endif
1017 # ipupdate-install:
1018 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1019 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1021 zebra/stamp-h1:
1022 @cd zebra && rm -f config.cache && \
1023 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1024 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1025 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1026 $(CONFIGURE) --sysconfdir=/etc \
1027 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1028 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1029 @touch zebra/stamp-h1
1031 zebra: zebra/stamp-h1
1032 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1034 zebra-clean:
1035 -@$(MAKE) -C zebra clean
1036 @rm -f zebra/stamp-h1
1038 zebra-install: zebra
1039 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1040 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1041 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1042 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1043 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1044 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1047 rp-l2tp-install:
1048 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1049 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1050 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1051 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1052 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1053 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1054 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1056 xl2tpd: pppd
1057 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1059 xl2tpd-install: xl2tpd
1060 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1061 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1064 bpalogin-install:
1065 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1066 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1069 # libnet:
1070 # @$(SEP)
1071 # @-mkdir -p libnet/lib
1072 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1074 # libpcap:
1075 # @$(SEP)
1076 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1078 libbcm:
1079 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1081 libbcm-install:
1082 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1083 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1086 iproute2:
1087 @$(SEP)
1088 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1090 iproute2-install: iproute2
1091 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1092 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1093 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1094 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1097 ntpc: nvram shared
1100 dropbear: dropbear/config.h
1101 @$(SEP)
1102 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1104 dropbear-install:
1105 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1106 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1107 cd $(INSTALLDIR)/dropbear/usr/bin && \
1108 ln -sf dropbearmulti dropbear && \
1109 ln -sf dropbearmulti dropbearconvert && \
1110 ln -sf dropbearmulti dropbearkey && \
1111 ln -sf dropbearmulti dbclient && \
1112 ln -sf dropbearmulti ssh && \
1113 ln -sf dropbearmulti scp
1115 dropbear-clean:
1116 -@$(MAKE) -C dropbear clean
1117 @rm -f dropbear/config.h
1119 dropbear/config.h:
1120 cd dropbear && \
1121 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1122 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1123 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1124 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1125 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1126 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1127 @$(MAKE) -C dropbear clean
1129 # Media libraries
1131 sqlite/stamp-h1:
1132 cd sqlite && \
1133 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1134 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1135 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1136 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1137 touch sqlite/stamp-h1
1139 sqlite: sqlite/stamp-h1
1140 @$(MAKE) -C sqlite all
1142 sqlite-clean:
1143 -@$(MAKE) -C sqlite clean
1144 @rm -f sqlite/stamp-h1
1146 sqlite-install: sqlite
1147 @$(SEP)
1148 ifneq ($(MEDIA_SERVER_STATIC),y)
1149 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1150 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1151 endif
1153 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1155 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1156 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1158 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1159 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1161 FFMPEG_PROTOCOLS:=file
1162 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1164 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
1165 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1167 ffmpeg/stamp-h1: zlib
1168 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1169 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1170 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1171 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1172 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1173 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1174 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1175 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1176 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1177 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1178 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1179 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1180 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1181 --extra-libs="-L$(TOP)/zlib -lz" \
1182 --enable-zlib --disable-debug --prefix=''
1183 touch ffmpeg/stamp-h1
1185 ffmpeg: ffmpeg/stamp-h1 zlib
1186 @$(MAKE) -C ffmpeg all
1188 ffmpeg-clean:
1189 -@$(MAKE) -C ffmpeg clean
1190 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1192 ffmpeg-install: ffmpeg
1193 @$(SEP)
1194 ifneq ($(MEDIA_SERVER_STATIC),y)
1195 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1196 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1197 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1198 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1199 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1200 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1201 endif
1203 libogg/stamp-h1:
1204 cd libogg && \
1205 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1206 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1207 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1208 touch libogg/stamp-h1
1210 libogg: libogg/stamp-h1
1211 @$(MAKE) -C libogg all
1213 libogg-clean:
1214 -@$(MAKE) -C libogg clean
1215 @rm -f libogg/stamp-h1
1217 libogg-install: libogg
1218 @$(SEP)
1219 ifneq ($(MEDIA_SERVER_STATIC),y)
1220 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1221 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1222 endif
1224 flac/stamp-h1: libogg
1225 cd flac && \
1226 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1227 CPPFLAGS="-I$(TOP)/libogg/include" \
1228 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1229 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1230 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1231 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1232 touch flac/stamp-h1
1234 flac: flac/stamp-h1 libogg
1235 @$(MAKE) -C flac/src/libFLAC all
1237 flac-clean:
1238 -@$(MAKE) -C flac clean
1239 @rm -f flac/stamp-h1
1241 flac-install: flac
1242 @$(SEP)
1243 ifneq ($(MEDIA_SERVER_STATIC),y)
1244 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1245 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1246 endif
1248 jpeg/stamp-h1:
1249 cd jpeg && \
1250 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1251 touch jpeg/stamp-h1
1253 jpeg: jpeg/stamp-h1
1254 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1256 jpeg-clean:
1257 -@$(MAKE) -C jpeg clean
1258 @rm -f jpeg/stamp-h1 jpeg/Makefile
1260 jpeg-install: jpeg
1261 @$(SEP)
1262 ifneq ($(MEDIA_SERVER_STATIC),y)
1263 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1264 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1265 endif
1267 libexif/stamp-h1:
1268 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1269 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1270 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1271 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1272 touch libexif/stamp-h1
1274 libexif: libexif/stamp-h1
1275 @$(MAKE) -C libexif all
1277 libexif-clean:
1278 -@$(MAKE) -C libexif clean
1279 @rm -f libexif/stamp-h1
1281 libexif-install: libexif
1282 @$(SEP)
1283 ifneq ($(MEDIA_SERVER_STATIC),y)
1284 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1285 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1286 endif
1288 zlib/stamp-h1:
1289 cd zlib && \
1290 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1291 ./configure --shared --prefix=''
1292 touch zlib/stamp-h1
1294 zlib: zlib/stamp-h1
1295 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1297 zlib-clean:
1298 -@$(MAKE) -C zlib clean
1299 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1301 zlib-install: zlib
1302 @$(SEP)
1303 ifneq ($(MEDIA_SERVER_STATIC),y)
1304 install -d $(INSTALLDIR)/zlib/usr/lib
1305 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1306 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1307 endif
1308 ifeq ($(TCONFIG_BT),y)
1309 install -d $(INSTALLDIR)/zlib/usr/lib
1310 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1311 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1312 endif
1313 ifeq ($(TCONFIG_TOR),y)
1314 install -d $(INSTALLDIR)/zlib/usr/lib
1315 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1316 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1317 endif
1319 libid3tag/stamp-h1: zlib
1320 cd libid3tag && \
1321 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1322 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1323 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1324 --disable-debugging --disable-profiling
1325 touch libid3tag/stamp-h1
1327 libid3tag: libid3tag/stamp-h1 zlib
1328 @$(MAKE) -C libid3tag all
1330 libid3tag-clean:
1331 -@$(MAKE) -C libid3tag clean
1332 @rm -f libid3tag/stamp-h1
1334 libid3tag-install: libid3tag
1335 @$(SEP)
1336 ifneq ($(MEDIA_SERVER_STATIC),y)
1337 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1338 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1339 endif
1341 libvorbis/stamp-h1: libogg
1342 cd libvorbis && \
1343 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1344 CPPFLAGS="-I$(TOP)/libogg/include" \
1345 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1346 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1347 --with-ogg-includes="$(TOP)/libogg/include" \
1348 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1349 touch libvorbis/stamp-h1
1351 libvorbis: libvorbis/stamp-h1
1352 @$(MAKE) -C libvorbis/lib all
1354 libvorbis-clean:
1355 -@$(MAKE) -C libvorbis clean
1356 @rm -f libvorbis/stamp-h1
1358 libvorbis-install: libvorbis
1359 @$(SEP)
1360 ifneq ($(MEDIA_SERVER_STATIC),y)
1361 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1362 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1363 endif
1365 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1366 @$(SEP)
1367 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1370 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1371 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1372 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1373 $(CONFIGURE) --prefix=/usr
1375 igmpproxy: igmpproxy/src/Makefile
1376 @$(SEP)
1377 @$(MAKE) -C igmpproxy/src
1379 igmpproxy-install: igmpproxy
1380 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1381 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1383 igmpproxy-clean:
1384 -@$(MAKE) -C igmpproxy/src clean
1385 @rm -f igmpproxy/src/Makefile
1387 udev:
1388 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1389 PROGRAMS=udevtrigger
1391 udev-install: udev
1392 install -d $(INSTALLDIR)
1393 install -d $(TARGETDIR)
1394 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1396 hotplug2:
1397 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1399 hotplug2-install: hotplug2
1400 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1401 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1403 emf:
1404 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1406 emf-install: emf
1407 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1409 igs:
1410 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1412 igs-install: igs
1413 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1415 wanuptime: nvram shared
1416 @$(SEP)
1417 @$(MAKE) -C wanuptime
1419 wanuptime-clean:
1420 -@$(MAKE) -C wanuptime clean
1422 wanuptime-install:
1423 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1424 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1426 ebtables: dummy
1427 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1428 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1429 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1431 ebtables-install: ebtables
1432 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1434 @mkdir -p $(TARGETDIR)/rom/etc
1435 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1436 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1438 install -d $(INSTALLDIR)/ebtables/usr/lib
1439 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1440 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1441 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1443 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1444 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1445 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1447 ebtables-clean:
1448 -@$(MAKE) -C ebtables clean
1450 #Roadkill
1451 glib/stamp-h1:
1452 @$(SEP)
1453 @cd glib && $(CONFIGURE) --prefix=/usr glib_cv_prog_cc_ansi_proto=no glib_cv_has__inline=yes glib_cv_has__inline__=yes glib_cv_hasinline=yes \
1454 glib_cv_sane_realloc=yes glib_cv_va_copy=no glib_cv___va_copy=yes glib_cv_va_val_copy=yes glib_cv_rtldglobal_broken=no \
1455 glib_cv_uscore=no glib_cv_func_pthread_mutex_trylock_posix=yes glib_cv_func_pthread_cond_timedwait_posix=yes glib_cv_sizeof_gmutex=24 \
1456 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" glib_cv_sys_pthread_getspecific_posix=yes \
1457 glib_cv_sys_pthread_mutex_trylock_posix=yes glib_cv_sys_pthread_cond_timedwait_posix=yes ac_cv_func_getpwuid_r=yes ac_cv_func_getpwuid_r_posix=yes
1458 @$(MAKE) -C glib
1459 touch glib/stamp-h1
1461 glib: glib/stamp-h1
1463 glib-clean:
1464 -@$(MAKE) -C glib clean
1465 rm -f glib/stamp-h1
1467 glib-install: glib
1468 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1470 #Roadkill
1471 nocat/stamp-h1: glib-install
1472 @$(SEP)
1473 @cd nocat && \
1474 NC_CONF_PATH="/" \
1475 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1476 @$(MAKE) -C nocat
1478 echo *** integrate glib to nocat installdir
1479 install -d $(INSTALLDIR)/nocat/usr/lib
1480 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1481 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1482 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1483 touch nocat/stamp-h1
1485 nocat: nocat/stamp-h1
1487 nocat-clean:
1488 -@$(MAKE) -C nocat clean
1489 rm -f nocat/stamp-h1
1491 nocat-install:
1492 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1493 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1494 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1495 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1497 lzo/stamp-h1:
1498 cd lzo && \
1499 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1500 touch lzo/stamp-h1
1502 lzo: lzo/stamp-h1
1504 lzo-clean:
1505 -@$(MAKE) -C lzo clean
1506 @rm -f lzo/stamp-h1
1508 lzo-install: lzo
1509 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1510 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1511 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1514 openvpn: openvpn/.conf openssl lzo
1516 openvpn/.conf:
1517 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1518 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1519 $(CONFIGURE) --prefix= \
1520 --with-lzo-headers="$(TOP)/lzo/include" \
1521 --with-ssl-headers="$(TOP)/openssl/include/" \
1522 --with-iproute-path="/usr/sbin/ip" \
1523 --disable-debug --disable-plugins --enable-management --enable-small \
1524 --disable-selinux --disable-socks --enable-password-save
1525 touch openvpn/.conf
1527 openvpn-clean:
1528 -@$(MAKE) -C openvpn clean
1529 @rm -f openvpn/.conf
1531 openvpn-install: openvpn
1532 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1533 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1534 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1536 #shibby
1537 libcurl/stamp-h1: zlib openssl
1538 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1539 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1540 CPPFLAGS="-I$(TOP)/zlib" \
1541 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1542 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1543 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1544 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1545 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1546 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1547 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1548 --without-gnutls --without-krb4 --without-libidn \
1549 --with-linux-headers=$(LINUXDIR)/include \
1550 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1551 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1552 touch libcurl/stamp-h1
1554 libcurl: libcurl/stamp-h1
1555 @$(MAKE) -C libcurl
1557 libcurl-clean:
1558 -@$(MAKE) -C libcurl clean
1559 @rm -f libcurl/stamp-h1 libcurl/Makefile
1561 libcurl-install: libcurl
1562 install -d $(INSTALLDIR)/libcurl/usr/lib
1563 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1564 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1565 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1566 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1567 ln -sf libcurl.so.4.2.0 libcurl.so
1569 libevent/stamp-h1:
1570 cd libevent && CC=$(CC) \
1571 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1572 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1573 $(CONFIGURE)
1574 touch libevent/stamp-h1
1576 libevent: libevent/stamp-h1
1577 @$(SEP)
1578 $(MAKE) -C libevent
1579 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1581 libevent-clean:
1582 -@$(MAKE) -C libevent clean
1583 @rm -f libevent/stamp-h1 libevent/Makefile
1584 @rm -rf libevent/staged
1586 libevent-install: libevent
1587 install -d $(INSTALLDIR)/libevent/usr/lib
1588 install libevent/.libs/libevent-2.0.so.5.1.6 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1589 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1591 libiconv/stamp-h1:
1592 cd libiconv && CC=$(CC) \
1593 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1594 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1595 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static
1596 touch libiconv/stamp-h1
1598 libiconv: libiconv/stamp-h1
1599 @$(SEP)
1600 $(MAKE) -C libiconv
1602 libiconv-clean:
1603 -@$(MAKE) -C libiconv clean
1604 @rm -f libiconv/stamp-h1 libiconv/Makefile
1606 libiconv-install: libiconv
1607 install -d $(INSTALLDIR)/libiconv/usr/lib
1608 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1609 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1611 transmission/stamp-h1: openssl libcurl libevent zlib libiconv
1612 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1613 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1614 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1615 -ffunction-sections -fdata-sections" \
1616 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
1617 -L$(TOP)/libiconv/lib/.libs -liconv" \
1618 CPPFLAGS="-I$(TOP)/zlib -I$(TOP)/libiconv/include" \
1619 ac_cv_header_libintl_h=yes HAVE_CXX=yes \
1620 am_cv_lib_iconv=yes ac_cv_func_iconv_open=yes \
1621 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-nls \
1622 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1623 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1624 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1625 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1626 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1627 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1628 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1629 touch transmission/stamp-h1
1631 transmission: transmission/stamp-h1
1632 @$(SEP)
1633 $(MAKE) -C transmission
1635 transmission-clean:
1636 -@$(MAKE) -C transmission clean
1637 @rm -f transmission/stamp-h1 transmission/Makefile
1639 transmission-install: transmission
1640 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1641 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1642 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1643 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1644 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1645 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1646 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1647 ifeq ($(TCONFIG_TR_EXTRAS),y)
1648 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1649 else
1650 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1651 endif
1653 btgui:
1654 @$(SEP)
1656 btgui-install: btgui
1657 install -d $(INSTALLDIR)/btgui/usr/bin
1658 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1660 libnfsidmap/stamp-h1:
1661 cd libnfsidmap && \
1662 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1663 ac_cv_func_malloc_0_nonnull=yes \
1664 ac_cv_func_realloc_0_nonnull=yes \
1665 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1666 touch libnfsidmap/stamp-h1
1668 libnfsidmap: libnfsidmap/stamp-h1
1669 @$(SEP)
1670 $(MAKE) -C libnfsidmap
1672 libnfsidmap-clean:
1673 -@$(MAKE) -C libnfsidmap clean
1674 @rm -f libnfsidmap/stamp-h1
1675 @rm -rf libnfsidmap/staged
1677 libnfsidmap-install: libnfsidmap
1678 install -d $(TOP)/libnfsidmap/staged
1679 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1681 portmap/stamp-h1:
1682 cd portmap \
1683 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1684 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1685 touch portmap/stamp-h1
1687 portmap: portmap/stamp-h1
1688 @$(SEP)
1689 $(MAKE) -C portmap
1691 portmap-clean:
1692 -@$(MAKE) -C portmap clean
1693 @rm -f portmap/stamp-h1
1695 portmap-install: portmap
1696 install -d $(INSTALLDIR)/portmap/usr/sbin
1697 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1698 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1700 e2fsprogs/stamp-h1:
1701 cd e2fsprogs && \
1702 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1703 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
1704 touch e2fsprogs/stamp-h1
1706 e2fsprogs: e2fsprogs/stamp-h1
1707 @$(SEP)
1708 $(MAKE) -C e2fsprogs
1710 e2fsprogs-clean:
1711 -@$(MAKE) -C e2fsprogs clean
1712 @rm -f e2fsprogs/stamp-h1
1713 @rm -f e2fsprogs/Makefile
1714 @rm -rf e2fsprogs/staged
1716 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1717 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1718 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1719 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1720 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1721 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1722 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1723 ac_cv_func_malloc_0_nonnull=yes \
1724 ac_cv_func_realloc_0_nonnull=yes \
1725 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1726 --enable-nfsv4 --enable-nfsv3
1727 touch nfs-utils/stamp-h1
1729 nfs-utils: nfs-utils/stamp-h1
1731 nfs-utils-clean:
1732 -@$(MAKE) -C nfs-utils clean
1733 @rm -f nfs-utils/stamp-h1
1735 nfs-utils-install: nfs-utils
1736 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1737 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1738 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1739 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1740 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1741 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1742 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1743 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1744 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1745 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1746 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1747 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1748 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1749 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1751 sd-idle/stamp-h1:
1752 cd sd-idle \
1753 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1754 $(MAKE) -C sd-idle
1755 chmod 0755 sd-idle/sd-idle
1756 touch sd-idle/stamp-h1
1758 sd-idle-clean:
1759 -@$(MAKE) -C sd-idle clean
1760 @rm -f sd-idle/stamp-h1
1762 sd-idle-install: sd-idle/stamp-h1
1763 install -d $(INSTALLDIR)/sd-idle/usr/bin
1764 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1765 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1767 snmp/stamp-h1:
1768 cd snmp && \
1769 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1770 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1771 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1772 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1773 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1774 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1775 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1776 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1777 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1778 touch snmp/stamp-h1
1780 snmp: snmp/stamp-h1
1781 @$(SEP)
1782 $(MAKE) -C snmp
1784 snmp-clean:
1785 -@$(MAKE) -C snmp clean
1786 @rm -f snmp/stamp-h1
1788 snmp-install: snmp
1789 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1790 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1792 apcupsd/stamp-h1:
1793 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1794 $(MAKE) configure && \
1795 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
1796 $(CONFIGURE) --prefix=/usr --without-x --enable-shared --enable-static --enable-usb --disable-pcnet --enable-cgi \
1797 --disable-lgd --enable-net --enable-powerflute --sysconfdir=/usr/local/apcupsd --bindir=/bin \
1798 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev= \
1799 touch apcupsd/stamp-h1
1801 apcupsd: apcupsd/stamp-h1
1802 $(MAKE) -C apcupsd
1804 apcupsd-clean:
1805 -@$(MAKE) -C apcupsd clean
1806 @rm -f apcupsd/stamp-h1
1807 @rm -f apcupsd/config*
1809 apcupsd-install: apcupsd
1810 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
1811 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
1812 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
1813 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
1814 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
1816 dnscrypt/stamp-h1:
1817 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1818 $(CONFIGURE) --prefix=/usr
1819 touch dnscrypt/stamp-h1
1821 dnscrypt: dnscrypt/stamp-h1
1823 dnscrypt-install: dnscrypt
1824 install -D dnscrypt/src/dnscrypt-proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1825 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1827 dnscrypt-clean:
1828 -@$(MAKE) -c dnscrypt clean
1829 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
1831 tor/stamp-h1: openssl zlib libevent
1832 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1833 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1834 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1835 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
1836 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib
1837 touch tor/stamp-h1
1839 tor: tor/stamp-h1
1841 tor-install: tor
1842 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
1843 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
1845 tor-clean:
1846 -@$(MAKE) -c tor clean
1847 @rm -rf tor/stamp-h1 tor/Makefile
1850 # Generic rules
1854 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1857 %-clean:
1858 @-[ ! -d $* ] || $(MAKE) -C $* clean
1860 %-distclean:
1861 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1863 %-install: %
1864 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1866 %-build:
1867 $(MAKE) $*-clean $*
1869 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1871 .PHONY: all clean distclean mrproper install package
1872 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1873 .PHONY: dummy libnet libpcap