Cosmetic changes for Toastman versions
[tomato.git] / release / src / router / Makefile
blob6a1bdb3ad8843bab0f6aee8e44ae63813ed575e5
1 # Broadcom Linux Router Makefile
3 # Copyright 2005, Broadcom Corporation
4 # All Rights Reserved.
6 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
7 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
8 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
9 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
13 include common.mak
15 #TOMATO_EXPERIMENTAL=0
17 #export PARALLEL_BUILD :=
18 export PARALLEL_BUILD := -j`grep -c '^processor' /proc/cpuinfo`
23 SEP=echo "\033[41;1m $@ \033[0m"
26 # standard packages
28 obj-y += lzma-loader
29 obj-y += nvram
30 obj-y += shared
31 obj-y += prebuilt
32 obj-y += igmpproxy
33 obj-y += iptables
34 obj-y += rc
35 obj-y += iproute2
36 obj-y += rom
37 obj-y += others
38 obj-y += busybox
39 obj-y += httpd
40 obj-y += www
41 obj-y += wwwAT
42 obj-y += bridge
43 obj-$(TCONFIG_DNSSEC) += nettle
44 obj-y += dnsmasq
45 obj-y += etc
46 # obj-y += vlan # use Busybox vconfig
47 obj-y += pppd
48 obj-y += rp-pppoe
49 obj-y += utils
50 obj-y += ntpc
51 obj-y += rstats
52 obj-y += cstats
53 obj-y += udpxy
54 obj-$(TCONFIG_TOR) += tor
55 obj-$(TCONFIG_TOR) += libevent
56 obj-$(TCONFIG_TOR) += zlib
57 obj-$(TCONFIG_DNSCRYPT) += libsodium
58 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
59 obj-$(TCONFIG_SNMP) += snmp
60 obj-$(TCONFIG_SDHC) += mmc
62 # !!TB - updated Broadcom Wireless driver
63 obj-y += et
64 obj-y += libbcmcrypto
65 obj-y += wlconf
67 obj-y += cyassl
68 obj-y += mssl
69 obj-y += mdu
70 obj-$(TCONFIG_RAID) += mdadm
72 obj-$(TCONFIG_NFS) += portmap
73 obj-$(TCONFIG_NFS) += e2fsprogs
74 obj-$(TCONFIG_NFS) += libevent
75 obj-$(TCONFIG_NFS) += libnfsidmap
76 obj-$(TCONFIG_NFS) += nfs-utils
78 #Roadkill
79 obj-$(TCONFIG_NOCAT) += nocat
81 # !!TB
82 obj-$(TCONFIG_USB) += p910nd
83 obj-$(TCONFIG_USB) += comgt
84 obj-$(TCONFIG_USB) += uqmi
86 obj-$(TCONFIG_UPS) += apcupsd
88 ifeq ($(CONFIG_LINUX26),y)
89 obj-$(TCONFIG_USB) += sd-idle
90 else
91 obj-$(TCONFIG_USB) += scsi-idle
92 endif
94 obj-y += libusb10
95 #obj-y += libusb
96 obj-y += usbmodeswitch
97 obj-$(TCONFIG_FTP) += vsftpd
99 ifeq ($(CONFIG_LINUX26),y)
100 ifeq ($(TCONFIG_SAMBASRV),y)
101 NEED_EX_NLS = y
102 endif
103 ifeq ($(TCONFIG_USB_EXTRAS),y)
104 NEED_EX_USB = y
105 endif
106 ifeq ($(TCONFIG_MICROSD),y)
107 NEED_SD_MODULES = y
108 endif
109 endif
111 ifeq ($(TCONFIG_SAMBASRV),y)
112 ifeq ($(TCONFIG_SAMBA3),y)
113 NEED_SAMBA3 = y
114 else
115 NEED_SAMBA2 = y
116 endif
117 endif
119 ifeq ($(TCONFIG_IPV6),y)
120 export TCONFIG_IPV6 := y
121 else
122 TCONFIG_IPV6 :=
123 endif
125 ifeq ($(TCONFIG_IPSEC),y)
126 export TCONFIG_IPSEC := y
127 else
128 TCONFIG_IPSEC :=
129 endif
131 ifeq ($(TCONFIG_RAID),y)
132 export TCONFIG_RAID := y
133 else
134 TCONFIG_RAID :=
135 endif
137 obj-$(NEED_SAMBA2) += samba
138 obj-$(NEED_SAMBA3) += samba3
140 ifeq ($(CONFIG_BCMWL6),y)
141 ifeq ($(TCONFIG_UFSD),y)
142 obj-$(TCONFIG_NTFS) += ufsd
143 else
144 obj-$(TCONFIG_NTFS) += ntfs-3g
145 endif
146 else
147 obj-$(TCONFIG_NTFS) += ntfs-3g
148 endif
150 obj-$(TCONFIG_EBTABLES) += ebtables
151 #obj-$(TCONFIG_IPV6) += libdaemon
152 #obj-$(TCONFIG_IPV6) += radvd
153 obj-$(TCONFIG_IPV6) += dhcpv6
155 obj-$(TCONFIG_MEDIA_SERVER) += zlib
156 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
157 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
158 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
159 obj-$(TCONFIG_MEDIA_SERVER) += libogg
160 obj-$(TCONFIG_MEDIA_SERVER) += flac
161 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
162 obj-$(TCONFIG_MEDIA_SERVER) += libexif
163 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
164 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
165 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
166 MEDIA_SERVER_STATIC=y
167 #MEDIA_SERVER_STATIC :=
169 #obj-y += libnfnetlink
170 obj-y += miniupnpd
171 # obj-y += upnp
172 obj-$(CONFIG_LINUX26) += ipset
176 # configurable packages
178 obj-$(TCONFIG_L2TP) += xl2tpd
179 obj-$(TCONFIG_PPTP) += accel-pptp
180 obj-$(TCONFIG_PPTPD) += pptpd
181 obj-$(TCONFIG_HTTPS) += openssl
182 obj-$(TCONFIG_SSH) += dropbear
183 obj-$(TCONFIG_ZEBRA) += zebra
184 # obj-$(TCONFIG_IPP2P) += ipp2p
185 obj-$(TCONFIG_LZO) += lzo
186 obj-$(TCONFIG_OPENVPN) += openvpn
187 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
188 obj-$(TCONFIG_TINC) += tinc
189 obj-$(TCONFIG_EMF) += emf
190 obj-$(TCONFIG_EMF) += igs
192 # Tomato RAF
193 # additional modules for nginx
194 ifeq (obj-$(TCONFIG_NGINX),y)
195 ifndef ($(ADDITIONAL_MODULES))
196 ADDITIONAL_MODULES:=
197 else
198 ifeq ($(TCONFIG_IPV6),y)
199 ADDITIONAL_MODULES += --with-ipv6
200 endif
201 endif
202 endif
203 obj-$(TCONFIG_NGINX) += libncurses
204 obj-$(TCONFIG_NGINX) += mysql
205 obj-$(TCONFIG_NGINX) += openssl
206 obj-$(TCONFIG_NGINX) += spawn-fcgi
207 obj-$(TCONFIG_NGINX) += pcre
208 obj-$(TCONFIG_NGINX) += sqlite
209 obj-$(TCONFIG_NGINX) += libiconv
210 obj-$(TCONFIG_NGINX) += libxml2
211 obj-$(TCONFIG_NGINX) += libpng
212 obj-$(TCONFIG_NGINX) += jpeg
213 obj-$(TCONFIG_NGINX) += php
214 obj-$(TCONFIG_NGINX) += nginx
216 obj-$(TCONFIG_NANO) += libncurses
217 obj-$(TCONFIG_NANO) += nano
219 obj-$(TCONFIG_BBT) += openssl
220 obj-$(TCONFIG_BBT) += libevent
221 obj-$(TCONFIG_BBT) += libcurl
222 obj-$(TCONFIG_BBT) += transmission
223 obj-$(TCONFIG_BT) += btgui
224 obj-$(TCONFIG_BBT) += zlib
225 #obj-$(TCONFIG_BBT) += libiconv
227 obj-$(CONFIG_LINUX26) += hotplug2
228 obj-$(CONFIG_LINUX26) += udevtrigger
230 ifeq ($(TCONFIG_OPENVPN),y)
231 export FULL_OPENSSL := y
232 else
233 ifeq ($(TCONFIG_FTP_SSL),y)
234 export FULL_OPENSSL := y
235 else
236 ifeq ($(TCONFIG_BBT),y)
237 export FULL_OPENSSL := y
238 else
239 ifeq ($(TCONFIG_TOR),y)
240 export FULL_OPENSSL := y
241 else
242 ifeq ($(TCONFIG_TOR),y)
243 export FULL_OPENSSL := y
244 else
245 ifeq ($(TCONFIG_TINC),y)
246 export FULL_OPENSSL := y
247 else
248 FULL_OPENSSL :=
249 endif
250 endif
251 endif
252 endif
253 endif
254 endif
256 obj-y += wanuptime
258 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
259 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
264 # Basic rules
267 all: clean-build libc $(obj-y) kernel
270 kernel: $(LINUXDIR)/.config
271 @$(SEP)
273 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
274 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
276 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
277 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
279 ifeq ($(CONFIG_LINUX26),y)
280 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
281 endif
284 lzma-loader:
285 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
287 lzma-loader-install: lzma-loader
288 @$(SEP)
291 kmod: dummy
292 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
294 testfind:
295 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
296 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
298 install package: $(obj-install) $(LINUXDIR)/.config
299 @$(SEP)
301 install -d $(TARGETDIR)
304 # kernel modules
305 $(MAKE) -C $(LINUXDIR) modules_install \
306 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" \
307 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
309 ifneq ($(CONFIG_LINUX26),y)
310 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
311 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
312 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
313 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
314 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
315 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
316 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
318 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
319 endif
321 # nice and clean
322 ifneq ($(TCONFIG_USBAP),y)
323 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
324 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
325 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb
326 endif
327 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
328 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
329 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
330 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
332 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
333 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
334 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
335 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
337 ##!!TB
338 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
346 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
352 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
353 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
354 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
355 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
356 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
357 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
358 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
359 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
360 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
361 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
362 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
363 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
364 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
365 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
366 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
367 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
368 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
369 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
370 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
371 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
372 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
373 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
374 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
375 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
376 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
377 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
378 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
379 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
380 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
381 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
382 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
383 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
384 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
385 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
387 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
388 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
389 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
390 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
391 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
392 cd $(TARGETDIR)/lib/modules && rm -f */source || true
394 # misc
395 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
396 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
397 done
399 ifneq ($(TCONFIG_L7),y)
400 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
401 endif
403 # uClibc
404 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
405 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
406 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
407 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
408 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
409 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
410 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
411 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
412 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
413 ifeq ($(TCONFIG_SSH),y)
414 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
415 endif
416 ifeq ($(TCONFIG_BBT),y)
417 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
418 endif
419 ifeq ($(TCONFIG_NGINX),y)
420 install $(LIBDIR)/libstdc++.so.6 $(TARGETDIR)/lib/libstdc++.so.6
421 cd $(TARGETDIR)/lib && ln -sf libstdc++.so.6 libstdc++.so
422 $(STRIP) $(TARGETDIR)/lib/libstdc++.so.6
423 endif
424 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
425 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
426 $(STRIP) $(TARGETDIR)/lib/*.so.0
427 endif
429 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
431 @echo ---
433 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
434 @$(SRCBASE)/btools/libfoo.pl
435 else
436 @$(SRCBASE)/btools/libfoo.pl --noopt
437 endif
438 @chmod 0555 $(TARGETDIR)/lib/*.so*
439 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
441 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
442 # separated/copied extra stuff
443 @rm -rf $(PLATFORMDIR)/extras
444 @mkdir $(PLATFORMDIR)/extras
445 @mkdir $(PLATFORMDIR)/extras/ipsec
446 @mkdir $(PLATFORMDIR)/extras/raid
447 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
448 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
450 $(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
451 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
453 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
454 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
455 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
457 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
458 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
459 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
460 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
461 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
462 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
463 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
464 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
465 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
466 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
467 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
468 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
469 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
470 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
471 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
472 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
473 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
475 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
476 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
477 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
478 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
479 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
480 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
481 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
482 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/huawei_ether.*o $(PLATFORMDIR)/extras/ || true
483 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_*.*o $(PLATFORMDIR)/extras/ || true
484 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
485 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/huawei_ether.*o $(PLATFORMDIR)/extras/ || true
486 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
487 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
488 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/class/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
489 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
490 $(if $(NEED_SD_MODULES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
491 $(if $(NEED_SD_MODULES),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
493 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
494 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
495 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
496 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
497 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
498 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
499 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
500 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
501 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
502 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
503 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
504 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
505 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
506 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
507 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
508 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/ipheth.*o $(PLATFORMDIR)/extras/ || true
509 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
510 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
511 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
512 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
513 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
514 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
515 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
516 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
517 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
518 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
519 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
520 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
521 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
522 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
523 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
524 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
525 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
526 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
527 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
528 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
529 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
530 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
531 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
532 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
533 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
534 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
535 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
536 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
538 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
539 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
540 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
541 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
542 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
543 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
544 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
546 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
547 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
548 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
549 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
550 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
551 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
552 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
553 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
554 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
555 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
556 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
557 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
558 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
559 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
561 ifneq ($(TCONFIG_USB),y)
562 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
563 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
564 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
565 endif
567 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
568 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
569 ifneq ($(TCONFIG_USB_EXTRAS),y)
570 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
571 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
572 endif
573 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
574 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
575 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
576 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
577 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
578 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
579 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
581 @mkdir -p $(PLATFORMDIR)/extras/apps
582 @mkdir -p $(PLATFORMDIR)/extras/lib
584 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
585 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
586 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
588 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
589 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
590 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
591 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
592 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
593 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
594 ifneq ($(NEED_EX_USB),y)
595 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
596 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
597 endif
598 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
600 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
601 ifeq ($(TCONFIG_L7PAT),y)
602 @cd layer7 && ./squish.sh
603 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
604 endif
606 ifeq ($(TCONFIG_PPTPD),y)
607 @mkdir -p $(TARGETDIR)/rom/etc/vpn
608 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
609 chmod +x $(TARGETDIR)/rom/etc/vpn/*
610 endif
612 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
613 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
614 @echo ---
616 @rm -f $(TARGETDIR)/lib/modules/*/build
618 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
619 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
621 # Package kernel and filesystem
622 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
623 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
624 # $(MAKE) -C $(LINUXDIR) zImage ; \
625 # else \
626 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
627 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
628 # fi
630 # Pad self-booting Linux to a 64 KB boundary
631 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
632 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
633 # Append filesystem to self-booting Linux
634 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
637 libc: $(LIBDIR)/ld-uClibc.so.0
638 # $(MAKE) -C ../../../tools-src/uClibc all
639 # $(MAKE) -C ../../../tools-src/uClibc install
643 # cleaners
646 clean: clean-build $(obj-clean)
647 rm -rf layer7/squished
648 rm -f .ipv6-y .ipv6-n
649 rm -f .fullssl-y .fullssl-n
650 make -C config clean
652 clean-build: dummy
653 rm -rf $(TARGETDIR)
654 rm -rf $(INSTALLDIR)
655 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
656 rm -rf $(PLATFORMDIR)/extras
658 distclean: clean
659 ifneq ($(INSIDE_MAK),1)
660 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
661 endif
662 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
665 # configuration
668 CONFIG_IN := config/config.in
670 config/conf config/mconf:
671 @$(MAKE) -C config
673 rconf: config/conf
674 @config/conf $(CONFIG_IN)
676 rmconf: config/mconf
677 @config/mconf $(CONFIG_IN)
679 roldconf: config/conf
680 @config/conf -o $(CONFIG_IN)
681 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
683 kconf:
684 @$(MAKE) -C $(LINUXDIR) config
686 kmconf:
687 @$(MAKE) -C $(LINUXDIR) menuconfig
689 koldconf:
690 @$(MAKE) -C $(LINUXDIR) oldconfig
691 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
693 bboldconf:
694 @$(MAKE) -C busybox oldconfig
696 config conf: rconf kconf
698 menuconfig mconf: rmconf kmconf
700 .ipv6-y .ipv6-n:
701 @rm -f .ipv6-y .ipv6-n
702 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
703 @touch $@
705 .fullssl-y .fullssl-n:
706 @rm -f .fullssl-y .fullssl-n
707 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
708 @touch $@
710 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
712 oldconfig oldconf: koldconf roldconf dependconf bboldconf
716 # overrides and extra dependencies
719 busybox: dummy
720 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
722 busybox-install:
723 rm -rf $(INSTALLDIR)/busybox
724 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
726 busybox-clean:
727 -@$(MAKE) -C busybox distclean
729 busybox-config:
730 $(MAKE) -C busybox menuconfig
733 httpd: shared nvram mssl
734 @$(SEP)
735 @$(MAKE) -C httpd
737 www-install:
738 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
740 matrixssl:
741 @$(SEP)
742 @$(MAKE) -C matrixssl/src
744 matrixssl-install:
745 @true
747 matrixssl-clean:
748 -@$(MAKE) -C matrixssl/src clean
750 cyassl/stamp-h1:
751 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
752 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
753 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
754 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
755 PTHREAD_LIBS="-lpthread" \
756 $(CONFIGURE)
757 @touch cyassl/stamp-h1
759 cyassl: cyassl/stamp-h1
760 @$(SEP)
761 @$(MAKE) -C cyassl
763 cyassl-clean:
764 -@$(MAKE) -C cyassl clean
765 @rm -f cyassl/stamp-h1
767 cyassl-install:
768 @true
770 ifeq ($(FULL_OPENSSL),y)
771 OPENSSL_CIPHERS:=enable-rc5
772 else
773 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
774 endif
776 openssl/stamp-h1:
777 cd openssl && \
778 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
779 -ffunction-sections -fdata-sections -Wl,--gc-sections \
780 shared $(OPENSSL_CIPHERS) no-ssl2 no-ssl3 \
781 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
782 no-seed no-capieng no-gms no-gmp no-rfc3779 \
783 no-err no-hw no-jpake \
784 no-zlib no-engines no-sse2 no-libunbound no-ssl-trace \
785 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
787 @$(MAKE) -C openssl clean
788 @touch openssl/stamp-h1
790 openssl: openssl/stamp-h1
792 openssl-clean:
793 -@$(MAKE) -C openssl clean
794 @rm -f openssl/stamp-h1
796 openssl-install: openssl
797 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
798 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
799 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
801 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
802 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
803 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
805 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
807 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
808 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
810 ifeq ($(FULL_OPENSSL),y)
811 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
812 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
813 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
814 endif
816 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
818 mdu: shared mssl
820 rc: nvram shared
822 bridge/Makefile:
823 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
824 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
826 bridge: bridge/Makefile
827 @$(SEP)
828 @$(MAKE) -C bridge
830 bridge-clean:
831 -@$(MAKE) -C bridge clean
832 @rm -f bridge/Makefile
834 bridge-install:
835 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
836 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
838 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
839 @$(SEP)
840 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
841 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
842 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
843 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
844 -DNO_INOTIFY -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
845 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
846 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
848 dnsmasq-install:
849 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
850 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
852 nettle/stamp-h1: gmp
853 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
854 CPPFLAGS="-I$(TOP)/gmp" \
855 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
856 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
857 $(CONFIGURE) prefix=$(TOP)/nettle
858 @touch nettle/stamp-h1
860 nettle: nettle/stamp-h1
861 @$(SEP)
862 @$(MAKE) -C nettle
863 @$(MAKE) -C nettle install
865 nettle-clean:
866 -@$(MAKE) -C nettle clean
867 @rm -f nettle/stamp-h1
868 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
870 gmp/stamp-h1:
871 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
872 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
873 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
874 $(CONFIGURE)
875 @touch gmp/stamp-h1
877 gmp: gmp/stamp-h1
878 @$(SEP)
879 @$(MAKE) -C gmp
881 gmp-clean:
882 @$(MAKE) -C gmp clean
883 @rm -f gmp/stamp-h1
885 iptables:
886 ifeq ($(CONFIG_LINUX26),y)
887 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
888 else
889 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
890 endif
891 @$(SEP)
892 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
894 iptables-install:
895 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
896 cd $(INSTALLDIR)/iptables/usr/sbin && \
897 ln -sf iptables iptables-restore && \
898 ln -sf iptables iptables-save
900 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
901 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
903 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
905 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
906 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
907 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
909 ifeq ($(TCONFIG_IPV6),y)
910 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
911 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
912 cd $(INSTALLDIR)/iptables/usr/sbin && \
913 ln -sf ip6tables ip6tables-restore && \
914 ln -sf ip6tables ip6tables-save
915 endif
917 iptables-clean:
918 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
920 ppp:
921 @$(SEP)
922 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
923 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
925 ppp-%:
926 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
928 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
929 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
930 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
931 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
932 @touch rp-pppoe/src/stamp-h1
934 rp-pppoe: pppd rp-pppoe/src/stamp-h1
935 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
937 rp-pppoe-clean:
938 -@$(MAKE) -C rp-pppoe/src clean
939 @rm -f rp-pppoe/src/pppoe-relay
940 @rm -f rp-pppoe/src/stamp-h1
942 rp-pppoe-install: rp-pppoe
943 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
944 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
945 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
946 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
949 upnp: nvram shared iptables
951 libnfnetlink/stamp-h1:
952 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
953 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
954 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
955 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
956 touch libnfnetlink/stamp-h1
958 libnfnetlink: libnfnetlink/stamp-h1
959 @$(SEP)
960 $(MAKE) -C libnfnetlink
962 libnfnetlink-install:
963 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
964 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
965 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
966 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
967 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
969 miniupnpd-config:
970 #ifeq ($(TCONFIG_IPV6),y)
971 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
972 #else
973 @cd miniupnpd && ./genconfig.sh --leasefile --vendorcfg
974 #endif
976 miniupnpd: iptables miniupnpd-config
977 @$(SEP)
978 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
979 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
980 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
982 miniupnpd-clean:
983 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
984 @rm -f miniupnpd/config.h
986 miniupnpd-install:
987 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
988 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
990 # !!TB
991 shared: busybox
993 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
994 @$(SEP)
995 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
997 vsftpd-install: vsftpd
998 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
999 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
1001 ufsd: kernel_header kernel
1002 @$(MAKE) -C ufsd all
1004 ufsd-install: ufsd
1005 @$(MAKE) -C ufsd install INSTALLDIR=$(INSTALLDIR)/ufsd
1007 ntfs-3g/Makefile:
1008 cd ntfs-3g && \
1009 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1010 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1011 $(CONFIGURE) --enable-shared=no --enable-static=no \
1012 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
1013 --disable-ntfsprogs --disable-crypto --without-uuid \
1014 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
1016 ntfs-3g: ntfs-3g/Makefile
1017 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
1019 ntfs-3g-clean:
1020 -@$(MAKE) -C ntfs-3g clean
1021 @rm -f ntfs-3g/Makefile
1023 ntfs-3g-install: ntfs-3g
1024 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1025 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1026 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
1027 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
1028 ln -sf ../bin/ntfs-3g mount.ntfs
1030 libusb10/Makefile: libusb10/Makefile.in
1031 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
1032 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
1034 libusb10: libusb10/Makefile
1035 $(MAKE) -C $@
1037 libusb10-install: libusb10
1038 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
1039 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1041 libusb10-clean:
1042 -@$(MAKE) -C $@ clean
1043 @rm -rf libusb10/Makefile
1045 libusb/Makefile: libusb/Makefile.in
1046 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1047 $(CONFIGURE) --prefix=/usr \
1048 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1049 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1050 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1052 libusb: libusb10 libusb/Makefile
1053 $(MAKE) -C $@
1055 libusb-install: libusb
1056 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1057 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1059 libusb-clean:
1060 -@$(MAKE) -C $@ clean
1061 @rm -rf libusb/Makefile
1063 usbmodeswitch: libusb10
1064 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1065 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1066 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1068 usbmodeswitchdb-install:
1069 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1070 # compress whitespace
1071 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1072 F=`basename $$D`; \
1073 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1074 done
1076 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1077 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1078 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1079 @mkdir -p $(TARGETDIR)/rom/etc
1080 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1082 #libdaemon: libdaemon/Makefile
1083 #$(MAKE) -C $@
1085 #libdaemon/Makefile: libdaemon/Makefile.in
1086 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1087 # --disable-dependency-tracking
1089 #libdaemon-install: libdaemon
1090 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1091 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1092 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1093 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1094 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1096 #libdaemon-clean:
1097 # -@$(MAKE) -C libdaemon distclean
1099 #radvd/stamp-h1:
1100 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1101 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1102 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1103 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1104 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1105 # @$(MAKE) -C radvd clean
1106 # @touch radvd/stamp-h1
1108 #radvd: libdaemon radvd/stamp-h1
1110 #radvd-clean:
1111 # -@$(MAKE) -C radvd distclean
1112 # @rm -f radvd/stamp-h1
1114 #radvd-install: radvd
1115 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1116 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1118 dhcpv6/stamp-h1:
1119 @cd dhcpv6 && \
1120 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1121 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1122 ac_cv_func_setpgrp_void=yes \
1123 $(CONFIGURE) --prefix= --with-localdbdir=/var
1124 @$(MAKE) -C dhcpv6 clean
1125 @touch dhcpv6/stamp-h1
1127 dhcpv6: dhcpv6/stamp-h1
1128 @$(SEP)
1129 @$(MAKE) -C dhcpv6 dhcp6c
1131 dhcpv6-install: dhcpv6
1132 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1133 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1135 dhcpv6-clean:
1136 -@$(MAKE) -C dhcpv6 clean
1137 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1140 p910nd:
1141 samba:
1142 samba3:
1144 nvram: shared
1146 prebuilt: shared libbcmcrypto
1148 vlan:
1149 @$(SEP)
1150 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1152 vlan-install:
1153 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1154 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1157 pptp-client-install:
1158 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1159 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1162 accel-pptp: pppd accel-pptp/Makefile
1163 @$(MAKE) -C accel-pptp
1165 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1166 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1167 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1169 accel-pptp-clean:
1170 -@$(MAKE) -C accel-pptp clean
1171 @rm -f accel-pptp/Makefile
1173 accel-pptp-install: accel-pptp
1174 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1175 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1177 pptpd/stamp-h1:
1178 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1179 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1180 touch pptpd/stamp-h1
1182 pptpd: pptpd/stamp-h1
1184 pptpd-install: pptpd
1185 @echo pptpd
1186 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1187 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1188 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1189 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1190 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1191 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1193 pptpd-clean:
1194 -@$(MAKE) -C pptpd clean
1195 rm -rf pptpd/stamp-h1 pptpd/.deps
1197 pppd/Makefile: pppd/linux/Makefile.top
1198 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1200 pppd: pppd/Makefile
1201 @$(SEP)
1202 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1204 pppd-clean:
1205 -@$(MAKE) -C pppd clean
1206 @rm -f pppd/Makefile
1208 pppd-install: pppd
1209 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1210 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1211 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1212 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1213 ifeq ($(TCONFIG_L2TP),y)
1214 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1215 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1216 endif
1218 # ipupdate-install:
1219 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1220 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1222 zebra/stamp-h1:
1223 @cd zebra && rm -f config.cache && \
1224 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1225 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1226 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1227 $(CONFIGURE) --sysconfdir=/etc \
1228 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1229 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1230 @touch zebra/stamp-h1
1232 zebra: zebra/stamp-h1
1233 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1235 zebra-clean:
1236 -@$(MAKE) -C zebra clean
1237 @rm -f zebra/stamp-h1
1239 zebra-install: zebra
1240 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1241 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1242 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1243 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1244 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1245 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1248 rp-l2tp-install:
1249 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1250 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1251 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1252 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1253 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1254 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1255 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1257 xl2tpd: pppd
1258 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1260 xl2tpd-install: xl2tpd
1261 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1262 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1265 bpalogin-install:
1266 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1267 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1270 # libnet:
1271 # @$(SEP)
1272 # @-mkdir -p libnet/lib
1273 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1275 # libpcap:
1276 # @$(SEP)
1277 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1279 libbcm:
1280 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1282 libbcm-install:
1283 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1284 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1287 iproute2:
1288 @$(SEP)
1289 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1291 iproute2-install: iproute2
1292 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1293 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1294 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1295 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1298 ntpc: nvram shared
1301 dropbear: dropbear/config.h
1302 @$(SEP)
1303 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1305 dropbear-install:
1306 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1307 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1308 cd $(INSTALLDIR)/dropbear/usr/bin && \
1309 ln -sf dropbearmulti dropbear && \
1310 ln -sf dropbearmulti dropbearconvert && \
1311 ln -sf dropbearmulti dropbearkey && \
1312 ln -sf dropbearmulti dbclient && \
1313 ln -sf dropbearmulti ssh && \
1314 ln -sf dropbearmulti scp
1316 dropbear-clean:
1317 -@$(MAKE) -C dropbear clean
1318 @rm -f dropbear/config.h
1320 dropbear/config.h:
1321 cd dropbear && \
1322 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1323 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1324 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1325 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1326 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1327 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1328 @$(MAKE) -C dropbear clean
1330 # Media libraries
1332 sqlite/stamp-h1:
1333 cd sqlite && \
1334 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1335 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1336 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1337 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1338 touch sqlite/stamp-h1
1340 sqlite: sqlite/stamp-h1
1341 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1343 sqlite-clean:
1344 -@$(MAKE) -C sqlite clean
1345 @rm -f sqlite/stamp-h1
1347 sqlite-install: sqlite
1348 @$(SEP)
1349 ifeq ($(TCONFIG_NGINX),y)
1350 install -D sqlite/.libs/libsqlite3.so.0.8.6 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1351 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1352 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1353 ln -sf libsqlite3.so.0.8.6 libsqlite3.so.0 && \
1354 ln -sf libsqlite3.so.0.8.6 libsqlite3.so
1355 endif
1357 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1359 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1360 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1362 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1363 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1365 FFMPEG_PROTOCOLS:=file
1366 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1368 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
1369 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1371 ffmpeg/stamp-h1: zlib
1372 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1373 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1374 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1375 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1376 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1377 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1378 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1379 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1380 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1381 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1382 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1383 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1384 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1385 --extra-libs="-L$(TOP)/zlib -lz" \
1386 --enable-zlib --disable-debug --prefix=''
1387 touch ffmpeg/stamp-h1
1389 ffmpeg: ffmpeg/stamp-h1 zlib
1390 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1392 ffmpeg-clean:
1393 -@$(MAKE) -C ffmpeg clean
1394 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1396 ffmpeg-install: ffmpeg
1397 @$(SEP)
1398 ifneq ($(MEDIA_SERVER_STATIC),y)
1399 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1400 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1401 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1402 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1403 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1404 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1405 endif
1407 libogg/stamp-h1:
1408 cd libogg && \
1409 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1410 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1411 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1412 touch libogg/stamp-h1
1414 libogg: libogg/stamp-h1
1415 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1417 libogg-clean:
1418 -@$(MAKE) -C libogg clean
1419 @rm -f libogg/stamp-h1
1421 libogg-install: libogg
1422 @$(SEP)
1423 ifneq ($(MEDIA_SERVER_STATIC),y)
1424 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1425 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1426 endif
1428 flac/stamp-h1: libogg
1429 cd flac && \
1430 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1431 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1432 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1433 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1434 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1435 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1436 touch flac/stamp-h1
1438 flac: flac/stamp-h1 libogg
1439 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1441 flac-clean:
1442 -@$(MAKE) -C flac clean
1443 @rm -f flac/stamp-h1
1445 flac-install: flac
1446 @$(SEP)
1447 ifneq ($(MEDIA_SERVER_STATIC),y)
1448 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1449 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1450 endif
1452 jpeg/stamp-h1:
1453 cd jpeg && \
1454 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1455 touch jpeg/stamp-h1
1457 jpeg: jpeg/stamp-h1
1458 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1459 install -d $(TOP)/jpeg/staged/include
1460 install -d $(TOP)/jpeg/staged/lib
1461 install -d $(TOP)/jpeg/staged/bin
1462 install -d $(TOP)/jpeg/staged/man/man1
1463 @$(MAKE) -C jpeg LIBTOOL="" prefix=$(TOP)/jpeg/staged install
1464 install -D jpeg/libjpeg.so $(TOP)/jpeg/staged/lib/libjpeg.so
1465 rm -f $(TOP)/jpeg/staged/lib/libjpeg.la
1467 jpeg-clean:
1468 -@$(MAKE) -C jpeg clean
1469 @rm -f jpeg/stamp-h1 jpeg/Makefile
1470 @rm -rf jpeg/staged
1472 jpeg-install: jpeg
1473 @$(SEP)
1474 ifneq ($(MEDIA_SERVER_STATIC),y)
1475 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1476 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1477 endif
1478 ifeq ($(TCONFIG_NGINX),y)
1479 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1480 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1481 endif
1483 libexif/stamp-h1:
1484 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1485 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1486 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1487 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1488 touch libexif/stamp-h1
1490 libexif: libexif/stamp-h1
1491 @$(MAKE) -C libexif all
1493 libexif-clean:
1494 -@$(MAKE) -C libexif clean
1495 @rm -f libexif/stamp-h1
1497 libexif-install: libexif
1498 @$(SEP)
1499 ifneq ($(MEDIA_SERVER_STATIC),y)
1500 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1501 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1502 endif
1504 zlib/stamp-h1:
1505 cd zlib && \
1506 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC" LDSHAREDLIBC="$(EXTRALDFLAGS)" \
1507 ./configure --shared --prefix=/usr --libdir=/usr/lib
1508 touch zlib/stamp-h1
1510 zlib: zlib/stamp-h1
1511 @$(MAKE) -C zlib all
1512 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1514 zlib-clean:
1515 -@$(MAKE) -C zlib clean
1516 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1517 @rm -rf zlib/staged
1519 zlib-install: zlib
1520 @$(SEP)
1521 ifneq ($(MEDIA_SERVER_STATIC),y)
1522 install -d $(INSTALLDIR)/zlib/usr/lib
1523 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1524 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1525 endif
1526 ifeq ($(TCONFIG_BT),y)
1527 install -d $(INSTALLDIR)/zlib/usr/lib
1528 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1529 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1530 endif
1531 ifeq ($(TCONFIG_TOR),y)
1532 install -d $(INSTALLDIR)/zlib/usr/lib
1533 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1534 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1535 endif
1536 ifeq ($(TCONFIG_NGINX),y)
1537 install -d $(INSTALLDIR)/zlib/usr/lib
1538 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1539 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1540 endif
1542 libid3tag/stamp-h1: zlib
1543 cd libid3tag && \
1544 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1545 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1546 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1547 --disable-debugging --disable-profiling
1548 touch libid3tag/stamp-h1
1550 libid3tag: libid3tag/stamp-h1 zlib
1551 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1553 libid3tag-clean:
1554 -@$(MAKE) -C libid3tag clean
1555 @rm -f libid3tag/stamp-h1
1557 libid3tag-install: libid3tag
1558 @$(SEP)
1559 ifneq ($(MEDIA_SERVER_STATIC),y)
1560 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1561 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1562 endif
1564 libvorbis/stamp-h1: libogg
1565 cd libvorbis && \
1566 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1567 CPPFLAGS="-I$(TOP)/libogg/include" \
1568 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1569 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1570 --with-ogg-includes="$(TOP)/libogg/include" \
1571 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1572 touch libvorbis/stamp-h1
1574 libvorbis: libvorbis/stamp-h1
1575 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1577 libvorbis-clean:
1578 -@$(MAKE) -C libvorbis clean
1579 @rm -f libvorbis/stamp-h1
1581 libvorbis-install: libvorbis
1582 @$(SEP)
1583 ifneq ($(MEDIA_SERVER_STATIC),y)
1584 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1585 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1586 endif
1588 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1589 @$(SEP)
1590 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1592 minidlna-clean:
1593 -@$(MAKE) -C minidlna clean
1594 @rm -f minidlna/stamp-h1
1596 minidlna-install: minidlan
1597 @$(SEP)
1598 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1599 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1601 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1602 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1603 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1604 $(CONFIGURE) --prefix=/usr
1606 igmpproxy: igmpproxy/src/Makefile
1607 @$(SEP)
1608 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1610 igmpproxy-install: igmpproxy
1611 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1612 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1614 igmpproxy-clean:
1615 -@$(MAKE) -C igmpproxy/src clean
1616 @rm -f igmpproxy/src/Makefile
1618 udev:
1619 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1620 PROGRAMS=udevtrigger
1622 udev-install: udev
1623 install -d $(INSTALLDIR)
1624 install -d $(TARGETDIR)
1625 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1627 hotplug2:
1628 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1630 hotplug2-install: hotplug2
1631 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1632 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1634 emf:
1635 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1637 emf-install: emf
1638 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1640 igs:
1641 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1643 igs-install: igs
1644 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1646 wanuptime: nvram shared
1647 @$(SEP)
1648 @$(MAKE) -C wanuptime
1650 wanuptime-clean:
1651 -@$(MAKE) -C wanuptime clean
1653 wanuptime-install:
1654 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1655 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1657 ebtables: dummy
1658 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1659 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1660 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1661 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1663 ebtables-install: ebtables
1664 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1666 @mkdir -p $(TARGETDIR)/rom/etc
1667 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1668 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1670 install -d $(INSTALLDIR)/ebtables/usr/lib
1671 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1672 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1673 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1675 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1676 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1677 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1679 ebtables-clean:
1680 -@$(MAKE) -C ebtables clean
1682 #Roadkill
1683 spawn-fcgi/stamp-h1:
1684 cd spawn-fcgi && CC=$(CC) \
1685 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1686 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1687 ac_cv_func_malloc_0_nonnull=yes \
1688 $(CONFIGURE) --prefix=/usr
1689 touch spawn-fcgi/stamp-h1
1691 spawn-fcgi: spawn-fcgi/stamp-h1
1692 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1694 spawn-fcgi-clean:
1695 -@$(MAKE) -C spawn-fcgi clean
1696 rm -f spawn-fcgi/stamp-h1
1698 spawn-fcgi-install: spawn-fcgi
1699 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1700 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1701 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1703 #Roadkill
1704 glib/stamp-h1:
1705 @$(SEP)
1706 @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 \
1707 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 \
1708 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 \
1709 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 \
1710 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
1711 @$(MAKE) -C glib
1712 touch glib/stamp-h1
1714 glib: glib/stamp-h1
1715 @$(MAKE) -C glib $(PARALLEL_BUILD)
1717 glib-clean:
1718 -@$(MAKE) -C glib clean
1719 rm -f glib/stamp-h1
1721 glib-install: glib
1722 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1724 nocat/stamp-h1: glib-install
1725 @$(SEP)
1726 @cd nocat && \
1727 NC_CONF_PATH="/" \
1728 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1729 @$(MAKE) -C nocat
1731 echo *** integrate glib to nocat installdir
1732 install -d $(INSTALLDIR)/nocat/usr/lib
1733 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1734 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1735 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1736 touch nocat/stamp-h1
1738 nocat: nocat/stamp-h1
1739 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1741 nocat-clean:
1742 -@$(MAKE) -C nocat clean
1743 rm -f nocat/stamp-h1
1745 nocat-install:
1746 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1747 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1748 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1749 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1751 #Tomato RAF
1752 pcre/stamp-h1:
1753 $(SEP)
1754 cd pcre && autoreconf && \
1755 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1756 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1757 @touch pcre/stamp-h1
1758 [ -d pcre/m4 ] || mkdir pcre/m4
1760 pcre: pcre/stamp-h1
1762 pcre-install: pcre
1763 @$(SEP)
1764 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1765 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1766 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1767 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1768 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1769 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1770 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1772 pcre-clean:
1773 ( if [ -f pcre/Makefile ]; then \
1774 $(MAKE) -C pcre clean; \
1775 rm -rf pcre/stamp-h1; \
1776 fi )
1778 libxml2/stamp-h1:
1779 cd libxml2 && \
1780 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1781 $(CONFIGURE) --prefix=/usr --without-python --enable-static --enable-shared
1782 touch $@
1784 libxml2: libxml2/stamp-h1
1785 @$(MAKE) -C libxml2 all $(PARALLEL_BUILD)
1786 @$(MAKE) -C libxml2 DESTDIR=$(TOP)/libxml2/staged install
1788 libxml2-install: libxml2
1789 @$(SEP)
1790 install -D libxml2/.libs/libxml2.so.2.9.1 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1791 $(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1792 cd $(INSTALLDIR)/libxml2/usr/lib && \
1793 ln -sf libxml2.so.2.9.1 libxml2.so.2 && \
1794 ln -sf libxml2.so.2.9.1 libxml2.so
1796 libxml2-clean:
1797 -@$(MAKE) -C libxml2 clean
1798 @rm -f libxml2/stamp-h1
1799 @rm -rf libxml2/staged
1801 libpng/stamp-h1: zlib
1802 cd libpng && \
1803 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" LDFLAGS="-L$(TOP)/zlib" \
1804 $(CONFIGURE) --prefix=/usr --enable-static --enable-shared
1805 touch $@
1807 libpng: libpng/stamp-h1
1808 @$(MAKE) -C libpng all $(PARALLEL_BUILD)
1809 @$(MAKE) -C libpng DESTDIR=$(TOP)/libpng/staged install
1811 libpng-install: libpng
1812 @$(SEP)
1813 install -D libpng/.libs/libpng.so.3.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1814 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1815 cd $(INSTALLDIR)/libpng/usr/lib && \
1816 ln -sf libpng.so.3.51.0 libpng.so && \
1817 ln -sf libpng.so.3.51.0 libpng.so.3
1818 install -D libpng/.libs/libpng12.so.0.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1819 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1820 cd $(INSTALLDIR)/libpng/usr/lib && \
1821 ln -sf libpng12.so.0.51.0 libpng12.so && \
1822 ln -sf libpng12.so.0.51.0 libpng12.so.0
1824 libpng-clean:
1825 -@$(MAKE) -C libpng clean
1826 @rm -f libpng/stamp-h1
1827 @rm -rf libpng/staged
1829 php/stamp-h1: pcre zlib libiconv sqlite libxml2 libpng jpeg libcurl
1830 @$(SEP)
1831 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1832 CFLAGS="-Os -Wall -I$(TOP)/zlib -I$(TOP)/libxml2/include/libxml -I$(TOP)/libxml2/include -I$(TOP)/pcre -I$(TOP)/libiconv/include \
1833 -I$(TOP)/libpng/staged/usr/include -I$(TOP)/libcurl/staged/include" \
1834 LDFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs \
1835 -L$(TOP)/libpng/.libs -L$(TOP)/libcurl/staged/lib" \
1836 CPPFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs -L$(TOP)/libpng/.libs" \
1837 LIBS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs -L$(TOP)/libpng/.libs -lz \
1838 -lsqlite3 -ldl -lpthread -liconv -lxml2 -lstdc++ -lcurl" \
1839 PHP_FCGI_LIBXML_DIR="$(TOP)/libxml2/staged/usr" \
1840 ac_cv_func_memcmp_working=yes \
1841 cv_php_mbstring_stdarg=yes \
1842 $(CONFIGURE) --prefix=/usr \
1843 --enable-shared \
1844 --disable-static \
1845 --disable-rpath \
1846 --disable-debug \
1847 --without-pear \
1848 --with-config-file-path=/etc \
1849 --with-config-file-scan-dir=/etc/php5 \
1850 --disable-short-tags \
1851 --with-zlib \
1852 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1853 --disable-phar \
1854 --enable-cli \
1855 --enable-cgi \
1856 --disable-calendar \
1857 --enable-ctype \
1858 --with-curl="$(TOP)/libcurl/staged" \
1859 --enable-fileinfo \
1860 --without-gettext \
1861 --enable-dom \
1862 --enable-exif \
1863 --disable-ftp \
1864 --without-gmp \
1865 --with-gd \
1866 --with-png-dir="$(TOP)/libpng/staged/usr" \
1867 --with-jpeg-dir="$(TOP)/jpeg/staged" \
1868 --enable-hash \
1869 --with-iconv="$(TOP)/libiconv/staged/usr" \
1870 --with-iconv-dir="$(TOP)/libiconv/staged/usr" \
1871 --enable-json \
1872 --without-ldap \
1873 --enable-mbstring \
1874 --without-mcrypt \
1875 --without-openssl \
1876 --disable-pcntl \
1877 --without-mysqli \
1878 --with-mysql \
1879 --with-mysql-sock="/var/run/mysqld.sock" \
1880 --with-pdo-mysql \
1881 --without-pdo-pgsql \
1882 --with-pdo-sqlite \
1883 --enable-pdo \
1884 --without-pgsql \
1885 --enable-session \
1886 --disable-shmop \
1887 --enable-simplexml \
1888 --disable-soap \
1889 --disable-sockets \
1890 --with-sqlite3 \
1891 --disable-sysvmsg \
1892 --disable-sysvsem \
1893 --disable-sysvshm \
1894 --disable-tokenizer \
1895 --enable-xml \
1896 --enable-xmlreader \
1897 --enable-xmlwriter \
1898 --enable-zip \
1899 --disable-filter \
1900 --with-libxml-dir="$(TOP)/libxml2/staged/usr"
1901 @touch php/stamp-h1
1903 php: php/stamp-h1
1904 @$(SEP)
1905 @$(MAKE) -C php
1907 php-clean:
1908 -@$(MAKE) -C php clean
1909 -@rm php/stamp-h1
1911 php-install: php
1912 @$(SEP)
1913 install -d $(INSTALLDIR)/php/usr/sbin
1914 install -D php/sapi/cli/.libs/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1915 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1916 install -D php/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1917 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1918 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1920 nginx/stamp-h1: openssl zlib pcre
1921 @$(SEP)
1922 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1923 --prefix=/usr \
1924 --sbin-path=/usr/sbin \
1925 --conf-path=/etc/nginx/nginx.conf \
1926 --error-log-path=/tmp/var/log/nginx/error.log \
1927 --http-log-path=/tmp/var/log/nginx/access.log \
1928 --pid-path=/tmp/var/run/nginx.pid \
1929 --lock-path=/tmp/var/run/nginx.lock.accept \
1930 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1931 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1932 --with-http_flv_module \
1933 --with-http_ssl_module \
1934 --with-http_gzip_static_module \
1935 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1936 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1937 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1938 --with-cc="$(CC)" \
1939 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1940 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1941 $(ADDITIONAL_MODULES)
1943 nginx: nginx/stamp-h1
1944 @$(SEP)
1945 @$(MAKE) -C nginx
1947 nginx-clean:
1948 -@$(MAKE) -C nginx clean
1949 -@rm -f nginx/stamp-h1
1951 nginx-install: nginx
1952 install -d $(INSTALLDIR)/nginx/usr/sbin
1953 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1954 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1956 libncurses/stamp-h1:
1957 cd libncurses && CC=$(CC) \
1958 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC" \
1959 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1960 LIBS="-lstdc++" \
1961 $(CONFIGURE) --prefix=/usr --with-shared --with-normal --disable-debug --without-ada --without-manpages --without-progs --without-tests
1962 touch libncurses/stamp-h1
1964 libncurses: libncurses/stamp-h1
1965 @$(SEP)
1966 $(MAKE) -C libncurses $(PARALLEL_BUILD)
1967 $(MAKE) -C libncurses DESTDIR=$(TOP)/libncurses/staged install
1969 libncurses-clean:
1970 -@$(MAKE) -C libncurses clean
1971 @rm -f libncurses/stamp-h1 libncurses/Makefile
1972 @rm -rf libncurses/staged
1974 libncurses-install: libncurses
1975 install -d $(INSTALLDIR)/libncurses/usr/lib
1976 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo
1977 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1978 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1979 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1980 install -D -m 0644 libncurses/staged/usr/share/terminfo/l/linux $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1981 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt100 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1982 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt220 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1983 install -D -m 0644 libncurses/staged/usr/share/terminfo/x/xterm $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1984 cd $(INSTALLDIR)/libncurses/usr/lib && ln -sf ../share/terminfo terminfo
1985 install libncurses/lib/libncurses.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1986 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1987 install libncurses/lib/libpanel.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1988 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1989 install libncurses/lib/libform.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1990 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1991 install libncurses/lib/libmenu.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1992 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1993 cd $(INSTALLDIR)/libncurses/usr/lib/ && \
1994 ln -sf libncurses.so.5 libncurses.so && \
1995 ln -sf libpanel.so.5 libpanel.so && \
1996 ln -sf libform.so.5 libform.so && \
1997 ln -sf libmenu.so.5 libmenu.so
1999 mysql/stamp-h1: openssl zlib libncurses
2000 @$(SEP)
2001 cd mysql && cp -f configure.mipsel configure && \
2002 CFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
2003 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
2004 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
2005 CPPFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
2006 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
2007 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
2008 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/zlib/staged/usr/lib -L$(TOP)/libncurses/lib -fPIC -EL" \
2009 LIBS="-lcrypt -lz -lstdc++ -lssl -lcrypto -lncurses" \
2010 $(CONFIGURE) --prefix=/usr \
2011 --without-debug --without-docs --without-man --with-charset=utf8 --with-extra-charsets=ascii,latin1,gb2312,gbk \
2012 --enable-shared --disable-static \
2013 --without-mysqlmanager \
2014 --with-pthread \
2015 --with-ssl \
2016 --without-docs \
2017 --with-geometry \
2018 --with-low-memory \
2019 --enable-assembler \
2020 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
2021 ac_cv_c_stack_direction=-1
2022 cd mysql && tar xvfz .host.tgz
2023 # Update time of config.status to avoid run 'config.status --recheck'
2024 touch mysql/config.status
2025 # Update time of Makefile to avoid regenerate it when do make
2026 sleep 5
2027 -find mysql -name Makefile -print | xargs -i touch {}
2028 touch mysql/stamp-h1
2030 mysql: mysql/stamp-h1
2031 @$(SEP)
2032 @$(MAKE) -C mysql
2033 @$(MAKE) -C mysql DESTDIR=$(TOP)/mysql/staged install
2035 mysql-clean:
2036 -@$(MAKE) -C mysql clean
2037 -@rm -f mysql/stamp-h1
2038 -@rm -rf mysql/staged mysql/host
2040 mysql-install:
2041 install -d $(INSTALLDIR)/mysql/usr/bin
2042 install -d $(INSTALLDIR)/mysql/usr/lib
2043 install -d $(INSTALLDIR)/mysql/usr/libexec
2044 install -d $(INSTALLDIR)/mysql/usr/lib/mysql
2045 install -d $(INSTALLDIR)/mysql/usr/lib/mysql/plugin
2046 install -d $(INSTALLDIR)/mysql/usr/share
2047 install -d $(INSTALLDIR)/mysql/usr/share/mysql
2048 install -D -m 755 mysql/mycheck $(INSTALLDIR)/mysql/usr/bin
2049 install -D -m 755 mysql/staged/usr/bin/my_print_defaults $(INSTALLDIR)/mysql/usr/bin
2050 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/my_print_defaults
2051 install -D -m 755 mysql/staged/usr/bin/myisamchk $(INSTALLDIR)/mysql/usr/bin
2052 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/myisamchk
2053 install -D -m 755 mysql/staged/usr/bin/mysql $(INSTALLDIR)/mysql/usr/bin
2054 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysql
2055 install -D -m 755 mysql/staged/usr/bin/mysql_install_db $(INSTALLDIR)/mysql/usr/bin
2056 install -D -m 755 mysql/staged/usr/bin/mysqladmin $(INSTALLDIR)/mysql/usr/bin
2057 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqladmin
2058 install -D -m 755 mysql/staged/usr/bin/mysqldump $(INSTALLDIR)/mysql/usr/bin
2059 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqldump
2060 install -D -m 755 mysql/staged/usr/libexec/mysqld $(INSTALLDIR)/mysql/usr/libexec
2061 $(STRIP) $(INSTALLDIR)/mysql/usr/libexec/mysqld
2062 cd $(INSTALLDIR)/mysql/usr/bin && ln -sf ../libexec/mysqld mysqld
2063 # install -D -m 755 mysql/staged/usr/bin/mysqld_safe $(INSTALLDIR)/mysql/usr/bin
2064 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2065 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient.so.16.0.0
2066 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2067 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so.16 && \
2068 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so
2069 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient_r.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2070 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient_r.so.16.0.0
2071 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2072 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so.16 && \
2073 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
2074 # -@cd $(INSTALLDIR)/mysql/usr/lib/mysql/plugin && cp -arfpu $(TOP)/mysql/staged/usr/lib/mysql/plugin/* . && \
2075 # rm -f *.la *.a && \
2076 # $(STRIP) *.so.*
2077 -@cd $(INSTALLDIR)/mysql/usr/share/mysql && \
2078 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/english . && \
2079 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/fill_help_tables.sql . && \
2080 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables.sql . && \
2081 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables_data.sql .
2083 lzo/stamp-h1:
2084 cd lzo && \
2085 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
2086 touch lzo/stamp-h1
2088 lzo: lzo/stamp-h1
2089 @$(MAKE) -C lzo $(PARALLEL_BUILD)
2091 lzo-clean:
2092 -@$(MAKE) -C lzo clean
2093 @rm -f lzo/stamp-h1
2095 lzo-install: lzo
2096 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2097 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2098 cd $(INSTALLDIR)/lzo/usr/lib && \
2099 ln -sf liblzo2.so.2.0.0 liblzo2.so.2 && \
2100 ln -sf liblzo2.so.2.0.0 liblzo2.so
2102 openvpn/.conf: openssl lzo
2103 cd openvpn && autoreconf && \
2104 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2105 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
2106 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
2107 $(CONFIGURE) --prefix= \
2108 --with-crypto-library=openssl \
2109 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --disable-small \
2110 --disable-selinux --disable-socks --enable-password-save \
2111 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
2112 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
2113 ac_cv_lib_resolv_gethostbyname=no
2114 touch openvpn/.conf
2116 openvpn: openvpn/.conf
2117 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
2119 openvpn-clean:
2120 -@$(MAKE) -C openvpn clean
2121 @rm -f openvpn/.conf
2123 openvpn-install: openvpn
2124 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2125 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2126 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2128 openvpn_plugin_auth_nvram:nvram
2130 #shibby
2131 nano/stamp-h1: libncurses
2132 cd nano && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2133 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2134 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2135 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libncurses/staged/usr/lib -fPIC" \
2136 ac_cv_lib_ncursesw_get_wch=no \
2137 $(CONFIGURE) --prefix=/usr --disable-nls --enable-all --without-libiconv-prefix --disable-utf8
2138 touch nano/stamp-h1
2140 nano: nano/stamp-h1
2141 @$(MAKE) -C nano $(PARALLEL_BUILD)
2143 nano-clean:
2144 -@$(MAKE) -C nano clean
2145 @rm -f nano/stamp-h1 nano/Makefile nano/src/Makefile
2147 nano-install: nano
2148 install -d $(INSTALLDIR)/nano/usr/sbin
2149 install -D nano/src/nano $(INSTALLDIR)/nano/usr/sbin/nano
2150 $(STRIP) -s $(INSTALLDIR)/nano/usr/sbin/nano
2152 libcurl/stamp-h1: zlib openssl
2153 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2154 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
2155 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2156 $(CONFIGURE) --prefix=$(TOP)/libcurl/staged --disable-thread --enable-shared --enable-static \
2157 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
2158 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
2159 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
2160 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
2161 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
2162 --without-gnutls --without-krb4 --without-libidn \
2163 --with-linux-headers=$(LINUXDIR)/include \
2164 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2165 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
2166 touch libcurl/stamp-h1
2168 libcurl: libcurl/stamp-h1
2169 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
2170 @$(MAKE) -C libcurl install
2172 libcurl-clean:
2173 -@$(MAKE) -C libcurl clean
2174 @rm -f libcurl/stamp-h1 libcurl/Makefile
2175 @rm -rf libcurl/staged
2177 libcurl-install: libcurl
2178 install -d $(INSTALLDIR)/libcurl/usr/sbin
2179 install -D libcurl/src/.libs/curl $(INSTALLDIR)/libcurl/usr/sbin/curl
2180 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/sbin/curl
2181 install -d $(INSTALLDIR)/libcurl/usr/lib
2182 install -D libcurl/lib/.libs/libcurl.so.4.3.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2183 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2184 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
2185 ln -sf libcurl.so.4.3.0 libcurl.so.4 && \
2186 ln -sf libcurl.so.4.3.0 libcurl.so
2188 libevent/stamp-h1:
2189 cd libevent && CC=$(CC) \
2190 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2191 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2192 $(CONFIGURE)
2193 touch libevent/stamp-h1
2195 libevent: libevent/stamp-h1
2196 @$(SEP)
2197 $(MAKE) -C libevent $(PARALLEL_BUILD)
2198 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
2200 libevent-clean:
2201 -@$(MAKE) -C libevent clean
2202 @rm -f libevent/stamp-h1 libevent/Makefile
2203 @rm -rf libevent/staged
2205 libevent-install: libevent
2206 install -d $(INSTALLDIR)/libevent/usr/lib
2207 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2208 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2210 libiconv/stamp-h1:
2211 cd libiconv && CC=$(CC) \
2212 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2213 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2214 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
2215 touch libiconv/stamp-h1
2217 libiconv: libiconv/stamp-h1
2218 @$(SEP)
2219 $(MAKE) -C libiconv $(PARALLEL_BUILD)
2220 $(MAKE) -C libiconv DESTDIR=$(TOP)/libiconv/staged install
2222 libiconv-clean:
2223 -@$(MAKE) -C libiconv clean
2224 @rm -rf libiconv/stamp-h1 libiconv/Makefile
2225 @rm -rf libiconv/staged
2227 libiconv-install: libiconv
2228 install -d $(INSTALLDIR)/libiconv/usr/lib
2229 install libiconv/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2230 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2231 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
2232 ln -sf libiconv.so.2.5.1 libiconv.so.2 && \
2233 ln -sf libiconv.so.2.5.1 libiconv.so
2235 transmission/stamp-h1: openssl libcurl libevent zlib
2236 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2237 autoreconf && \
2238 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2239 --param large-function-growth=800 --param max-inline-insns-single=3000 \
2240 -ffunction-sections -fdata-sections" \
2241 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
2242 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
2243 HAVE_CXX=yes \
2244 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
2245 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
2246 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
2247 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
2248 LIBCURL_LIBS="-lcurl" \
2249 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
2250 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
2251 LIBEVENT_LIBS="-levent" \
2252 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2253 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
2254 OPENSSL_LIBS="-lcrypto -lssl" \
2255 ZLIB_CFLAGS="-I$(TOP)/zlib" \
2256 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
2257 ZLIB_LIBS="-lz"
2258 touch transmission/stamp-h1
2260 transmission: transmission/stamp-h1
2261 @$(SEP)
2262 $(MAKE) -C transmission $(PARALLEL_BUILD)
2264 transmission-clean:
2265 -@$(MAKE) -C transmission clean
2266 @rm -f transmission/stamp-h1 transmission/Makefile
2268 transmission-install: transmission
2269 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
2270 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
2271 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
2272 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
2273 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
2274 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
2275 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
2276 ifeq ($(TCONFIG_TR_EXTRAS),y)
2277 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2278 else
2279 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2280 endif
2282 btgui:
2283 @$(SEP)
2285 btgui-install: btgui
2286 install -d $(INSTALLDIR)/btgui/usr/bin
2287 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2289 libnfsidmap/stamp-h1:
2290 cd libnfsidmap && \
2291 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2292 ac_cv_func_malloc_0_nonnull=yes \
2293 ac_cv_func_realloc_0_nonnull=yes \
2294 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2295 touch libnfsidmap/stamp-h1
2297 libnfsidmap: libnfsidmap/stamp-h1
2298 @$(SEP)
2299 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2301 libnfsidmap-clean:
2302 -@$(MAKE) -C libnfsidmap clean
2303 @rm -f libnfsidmap/stamp-h1
2304 @rm -rf libnfsidmap/staged
2306 libnfsidmap-install: libnfsidmap
2307 install -d $(TOP)/libnfsidmap/staged
2308 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2310 portmap/stamp-h1:
2311 cd portmap \
2312 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2313 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2314 touch portmap/stamp-h1
2316 portmap: portmap/stamp-h1
2317 @$(SEP)
2318 $(MAKE) -C portmap $(PARALLEL_BUILD)
2320 portmap-clean:
2321 -@$(MAKE) -C portmap clean
2322 @rm -f portmap/stamp-h1
2324 portmap-install: portmap
2325 install -d $(INSTALLDIR)/portmap/usr/sbin
2326 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2327 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2329 e2fsprogs/stamp-h1:
2330 cd e2fsprogs && \
2331 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2332 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2333 touch e2fsprogs/stamp-h1
2335 e2fsprogs: e2fsprogs/stamp-h1
2336 @$(SEP)
2337 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2339 e2fsprogs-clean:
2340 -@$(MAKE) -C e2fsprogs clean
2341 @rm -f e2fsprogs/stamp-h1
2342 @rm -f e2fsprogs/Makefile
2343 @rm -rf e2fsprogs/staged
2345 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2346 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2347 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2348 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2349 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2350 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2351 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2352 ac_cv_func_malloc_0_nonnull=yes \
2353 ac_cv_func_realloc_0_nonnull=yes \
2354 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2355 --enable-nfsv4 --enable-nfsv3
2356 touch nfs-utils/stamp-h1
2358 nfs-utils: nfs-utils/stamp-h1
2359 @$(SEP)
2360 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2362 nfs-utils-clean:
2363 -@$(MAKE) -C nfs-utils clean
2364 @rm -f nfs-utils/stamp-h1
2366 nfs-utils-install: nfs-utils
2367 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2368 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2369 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2370 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2371 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2372 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2373 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2374 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2375 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2376 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2377 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2378 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2379 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2380 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2382 tinc/stamp-h1: openssl zlib lzo
2383 @cd tinc && autoreconf -fsi && \
2384 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2385 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
2386 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2387 $(CONFIGURE) \
2388 --prefix=/usr \
2389 --sysconfdir=/etc \
2390 --localstatedir=/var \
2391 --with-zlib-include="$(TOP)/zlib" \
2392 --with-zlib-lib="$(TOP)/zlib" \
2393 --with-lzo-include="$(TOP)/lzo/include" \
2394 --with-lzo-lib="$(TOP)/lzo/src/.libs" \
2395 --with-openssl-include="$(TOP)/openssl/include" \
2396 --with-openssl-lib="$(TOP)/openssl" \
2397 --disable-curses \
2398 --disable-readline
2399 @touch tinc/stamp-h1
2401 tinc: tinc/stamp-h1
2402 @$(SEP)
2403 @$(MAKE) -C tinc LIBS="-lcrypto $(TOP)/zlib/libz.a -llzo2" $(PARALLEL_BUILD)
2405 tinc-clean:
2406 -@$(MAKE) -C tinc clean
2407 @rm -f tinc/stamp-h1
2409 tinc-install:
2410 install -D tinc/src/tinc $(INSTALLDIR)/tinc/usr/sbin/tinc
2411 install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
2412 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tinc
2413 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tincd
2415 sd-idle/stamp-h1:
2416 cd sd-idle \
2417 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2418 $(MAKE) -C sd-idle
2419 chmod 0755 sd-idle/sd-idle
2420 touch sd-idle/stamp-h1
2422 sd-idle-clean:
2423 -@$(MAKE) -C sd-idle clean
2424 @rm -f sd-idle/stamp-h1
2426 sd-idle-install: sd-idle/stamp-h1
2427 install -d $(INSTALLDIR)/sd-idle/usr/bin
2428 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2429 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2431 snmp/stamp-h1:
2432 cd snmp && \
2433 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2434 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2435 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2436 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2437 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2438 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2439 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2440 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2441 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2442 touch snmp/stamp-h1
2444 snmp: snmp/stamp-h1
2445 @$(SEP)
2446 $(MAKE) -C snmp
2448 snmp-clean:
2449 -@$(MAKE) -C snmp clean
2450 @rm -f snmp/stamp-h1
2452 snmp-install: snmp
2453 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2454 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2456 apcupsd/stamp-h1:
2457 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2458 $(MAKE) configure && \
2459 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2460 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2461 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2462 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2463 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2464 touch apcupsd/stamp-h1
2466 apcupsd: apcupsd/stamp-h1
2467 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2469 apcupsd-clean:
2470 -@$(MAKE) -C apcupsd clean
2471 @rm -f apcupsd/stamp-h1
2472 @rm -f apcupsd/config*
2474 apcupsd-install: apcupsd
2475 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2476 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2477 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2478 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2479 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2481 libsodium/stamp-h1:
2482 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2483 $(CONFIGURE) --prefix=/usr --disable-ssp --enable-minimal
2484 touch libsodium/stamp-h1
2486 libsodium: libsodium/stamp-h1
2487 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2489 libsodium-install: libsodium
2490 install -d $(INSTALLDIR)/libsodium/usr/lib
2491 install -D libsodium/src/libsodium/.libs/libsodium.so.18.0.1 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.0.1
2492 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.0.1
2493 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2494 ln -sf libsodium.so.18.0.1 libsodium.so.18 && \
2495 ln -sf libsodium.so.18.0.1 libsodium.so
2497 libsodium-clean:
2498 -$(MAKE) -C libsodium clean
2499 @rm -rf libsodium/stamp-h1
2501 dnscrypt/stamp-h1: libsodium
2502 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2503 autoreconf && \
2504 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2505 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2506 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2507 $(CONFIGURE) --prefix=/usr --disable-ssp
2508 touch dnscrypt/stamp-h1
2510 dnscrypt: dnscrypt/stamp-h1
2511 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2513 dnscrypt-install: dnscrypt
2514 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2515 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2516 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2517 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2519 dnscrypt-clean:
2520 -@$(MAKE) -C dnscrypt clean
2521 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2523 tor/stamp-h1: openssl zlib libevent
2524 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2525 autoreconf && \
2526 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2527 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2528 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2529 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2530 --disable-asciidoc --disable-tool-name-check
2531 touch tor/stamp-h1
2533 tor: tor/stamp-h1
2534 $(MAKE) -C tor $(PARALLEL_BUILD)
2536 tor-install: tor
2537 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2538 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2540 tor-clean:
2541 -@$(MAKE) -C tor clean
2542 @rm -rf tor/stamp-h1 tor/Makefile
2544 udpxy/stamp-h1:
2545 cd udpxy \
2546 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2547 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2548 touch udpxy/stamp-h1
2550 udpxy-clean:
2551 -@$(MAKE) -C udpxy clean
2552 @rm -f udpxy/stamp-h1
2554 udpxy-install: udpxy/stamp-h1
2555 install -d $(INSTALLDIR)/udpxy/usr/bin
2556 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2557 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2559 mdadm:
2560 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2562 mdadm-install: mdadm
2563 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2564 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2566 mdadm-clean:
2567 -@$(MAKE) -C mdadm clean
2569 ipset:
2570 $(MAKE) -C ipset binaries
2572 ipset-install: ipset
2573 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2574 install -d $(INSTALLDIR)/ipset/usr/lib/
2575 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2576 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2577 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2579 ipset-clean:
2580 -@$(MAKE) -C ipset clean
2582 libjson-c/stamp-h1:
2583 cd $(TOP)/libjson-c && CC=$(CC) STRIP=$(CROSS_COMPILE)strip \
2584 ./autogen.sh && \
2585 $(CONFIGURE) --prefix=/usr
2586 touch libjson-c/stamp-h1
2588 libjson-c: libjson-c/stamp-h1
2589 $(MAKE) -C libjson-c $(PARALLEL_BUILD)
2591 libjson-c-clean:
2592 -@$(MAKE) -C libjson-c clean
2593 @rm -rf libjson-c/stamp-h1
2595 uqmi: libjson-c
2596 $(MAKE) -C uqmi/libubox
2597 $(MAKE) -C uqmi SHARED=0 CC='$(CC) -static'
2599 uqmi-install: uqmi
2600 install -D uqmi/uqmi $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2601 $(STRIP) $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2603 uqmi-clean: libjson-c-clean
2604 -@$(MAKE) -C uqmi/libubox clean
2605 -@$(MAKE) -C uqmi clean
2607 comgt:
2608 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2610 comgt-install: comgt
2611 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2612 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2613 ln -sf comgt gcom
2614 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2615 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2616 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2618 comgt-clean:
2619 -@$(MAKE) -C comgt clean
2622 # Generic rules
2626 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2629 %-clean:
2630 @-[ ! -d $* ] || $(MAKE) -C $* clean
2632 %-distclean:
2633 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2635 %-install: %
2636 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2638 %-build:
2639 $(MAKE) $*-clean $*
2641 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2643 .PHONY: all clean distclean mrproper install package
2644 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2645 .PHONY: dummy libnet libpcap