fix spawn-fcgi compilation
[tomato.git] / release / src / router / Makefile
blob0b4e248b64e0d28851f41b353f345f55d809449a
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 endif
108 ifeq ($(TCONFIG_SAMBASRV),y)
109 ifeq ($(TCONFIG_SAMBA3),y)
110 NEED_SAMBA3 = y
111 else
112 NEED_SAMBA2 = y
113 endif
114 endif
116 ifeq ($(TCONFIG_IPV6),y)
117 export TCONFIG_IPV6 := y
118 else
119 TCONFIG_IPV6 :=
120 endif
122 ifeq ($(TCONFIG_IPSEC),y)
123 export TCONFIG_IPSEC := y
124 else
125 TCONFIG_IPSEC :=
126 endif
128 ifeq ($(TCONFIG_RAID),y)
129 export TCONFIG_RAID := y
130 else
131 TCONFIG_RAID :=
132 endif
134 obj-$(NEED_SAMBA2) += samba
135 obj-$(NEED_SAMBA3) += samba3
136 obj-$(TCONFIG_NTFS) += ntfs-3g
137 obj-$(TCONFIG_EBTABLES) += ebtables
138 #obj-$(TCONFIG_IPV6) += libdaemon
139 #obj-$(TCONFIG_IPV6) += radvd
140 obj-$(TCONFIG_IPV6) += dhcpv6
142 obj-$(TCONFIG_MEDIA_SERVER) += zlib
143 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
144 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
145 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
146 obj-$(TCONFIG_MEDIA_SERVER) += libogg
147 obj-$(TCONFIG_MEDIA_SERVER) += flac
148 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
149 obj-$(TCONFIG_MEDIA_SERVER) += libexif
150 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
151 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
152 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
153 MEDIA_SERVER_STATIC=y
154 #MEDIA_SERVER_STATIC :=
156 #obj-y += libnfnetlink
157 obj-y += miniupnpd
158 # obj-y += upnp
159 obj-$(CONFIG_LINUX26) += ipset
163 # configurable packages
165 obj-$(TCONFIG_L2TP) += xl2tpd
166 obj-$(TCONFIG_PPTP) += accel-pptp
167 obj-$(TCONFIG_PPTPD) += pptpd
168 obj-$(TCONFIG_HTTPS) += openssl
169 obj-$(TCONFIG_SSH) += dropbear
170 obj-$(TCONFIG_ZEBRA) += zebra
171 # obj-$(TCONFIG_IPP2P) += ipp2p
172 obj-$(TCONFIG_LZO) += lzo
173 obj-$(TCONFIG_OPENVPN) += openvpn
174 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
175 obj-$(TCONFIG_TINC) += tinc
176 obj-$(TCONFIG_EMF) += emf
177 obj-$(TCONFIG_EMF) += igs
179 # Tomato RAF
180 # additional modules for nginx
181 ifeq (obj-$(TCONFIG_NGINX),y)
182 ifndef ($(ADDITIONAL_MODULES))
183 ADDITIONAL_MODULES:=
184 else
185 ifeq ($(TCONFIG_IPV6),y)
186 ADDITIONAL_MODULES += --with-ipv6
187 endif
188 endif
189 endif
190 obj-$(TCONFIG_NGINX) += libncurses
191 obj-$(TCONFIG_NGINX) += mysql
192 obj-$(TCONFIG_NGINX) += openssl
193 obj-$(TCONFIG_NGINX) += spawn-fcgi
194 obj-$(TCONFIG_NGINX) += pcre
195 obj-$(TCONFIG_NGINX) += sqlite
196 obj-$(TCONFIG_NGINX) += libiconv
197 obj-$(TCONFIG_NGINX) += libxml2
198 obj-$(TCONFIG_NGINX) += libpng
199 obj-$(TCONFIG_NGINX) += jpeg
200 obj-$(TCONFIG_NGINX) += php
201 obj-$(TCONFIG_NGINX) += nginx
203 obj-$(TCONFIG_NANO) += libncurses
204 obj-$(TCONFIG_NANO) += nano
206 obj-$(TCONFIG_BBT) += openssl
207 obj-$(TCONFIG_BBT) += libevent
208 obj-$(TCONFIG_BBT) += libcurl
209 obj-$(TCONFIG_BBT) += transmission
210 obj-$(TCONFIG_BT) += btgui
211 obj-$(TCONFIG_BBT) += zlib
212 #obj-$(TCONFIG_BBT) += libiconv
214 obj-$(CONFIG_LINUX26) += hotplug2
215 obj-$(CONFIG_LINUX26) += udevtrigger
217 ifeq ($(TCONFIG_OPENVPN),y)
218 export FULL_OPENSSL := y
219 else
220 ifeq ($(TCONFIG_FTP_SSL),y)
221 export FULL_OPENSSL := y
222 else
223 ifeq ($(TCONFIG_BBT),y)
224 export FULL_OPENSSL := y
225 else
226 ifeq ($(TCONFIG_TOR),y)
227 export FULL_OPENSSL := y
228 else
229 ifeq ($(TCONFIG_TOR),y)
230 export FULL_OPENSSL := y
231 else
232 ifeq ($(TCONFIG_TINC),y)
233 export FULL_OPENSSL := y
234 else
235 FULL_OPENSSL :=
236 endif
237 endif
238 endif
239 endif
240 endif
241 endif
243 obj-y += wanuptime
245 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
246 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
251 # Basic rules
254 all: clean-build libc $(obj-y) kernel
257 kernel: $(LINUXDIR)/.config
258 @$(SEP)
260 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
261 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
263 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
264 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
266 ifeq ($(CONFIG_LINUX26),y)
267 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
268 endif
271 lzma-loader:
272 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
274 lzma-loader-install: lzma-loader
275 @$(SEP)
278 kmod: dummy
279 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
281 testfind:
282 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
283 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
285 install package: $(obj-install) $(LINUXDIR)/.config
286 @$(SEP)
288 install -d $(TARGETDIR)
291 # kernel modules
292 $(MAKE) -C $(LINUXDIR) modules_install \
293 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" \
294 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
296 ifneq ($(CONFIG_LINUX26),y)
297 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
298 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
299 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
300 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
301 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
302 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
303 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
305 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
306 endif
308 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
310 # nice and clean
311 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
312 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
313 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
314 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
315 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
317 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
318 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
319 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
320 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
322 ##!!TB
323 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
324 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
325 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
326 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
327 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
328 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
329 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
330 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
332 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
333 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
334 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
335 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
336 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
337 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
338 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
346 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
352 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
353 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
354 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
355 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
356 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
357 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
358 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
359 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
360 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
361 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
362 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
363 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
364 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
365 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
366 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
367 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
369 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
370 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
371 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
372 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
373 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
374 cd $(TARGETDIR)/lib/modules && rm -f */source || true
376 # misc
377 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
378 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
379 done
381 ifneq ($(TCONFIG_L7),y)
382 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
383 endif
385 # uClibc
386 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
387 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
388 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
389 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
390 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
391 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
392 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
393 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
394 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
395 ifeq ($(TCONFIG_SSH),y)
396 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
397 endif
398 ifeq ($(TCONFIG_BBT),y)
399 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
400 endif
401 ifeq ($(TCONFIG_NGINX),y)
402 install $(LIBDIR)/libstdc++.so.6 $(TARGETDIR)/lib/libstdc++.so.6
403 cd $(TARGETDIR)/lib && ln -sf libstdc++.so.6 libstdc++.so
404 $(STRIP) $(TARGETDIR)/lib/libstdc++.so.6
405 endif
406 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
407 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
408 $(STRIP) $(TARGETDIR)/lib/*.so.0
409 endif
411 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
413 @echo ---
415 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
416 @$(SRCBASE)/btools/libfoo.pl
417 else
418 @$(SRCBASE)/btools/libfoo.pl --noopt
419 endif
420 @chmod 0555 $(TARGETDIR)/lib/*.so*
421 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
423 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
424 # separated/copied extra stuff
425 @rm -rf $(PLATFORMDIR)/extras
426 @mkdir $(PLATFORMDIR)/extras
427 @mkdir $(PLATFORMDIR)/extras/ipsec
428 @mkdir $(PLATFORMDIR)/extras/raid
429 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
430 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
432 $(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
433 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
436 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
437 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
439 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
440 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
441 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
442 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
443 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
444 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
445 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
446 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
447 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
448 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
449 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
450 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
451 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
452 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
453 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
454 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
455 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
457 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
458 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
459 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
460 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
461 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
462 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
463 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
464 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
465 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
466 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
467 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
468 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
470 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
471 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
472 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
473 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
474 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
475 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
476 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
477 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
478 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
479 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
480 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
481 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
482 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
483 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
484 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
485 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
486 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
487 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
488 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
489 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
490 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
491 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
492 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
493 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
494 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
495 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
496 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
497 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
498 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
499 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
500 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
501 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
502 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
503 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
504 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
505 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
506 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
507 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
508 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
509 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
510 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
512 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
513 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
514 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
515 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
516 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
517 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
518 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
520 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
521 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
522 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
523 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
524 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
525 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
526 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
527 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
528 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
529 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
530 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
531 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
532 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
533 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
535 ifneq ($(TCONFIG_USB),y)
536 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
537 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
538 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
539 endif
541 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
542 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
543 ifneq ($(TCONFIG_USB_EXTRAS),y)
544 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
545 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
546 endif
547 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
548 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
549 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
550 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
551 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
552 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
553 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
555 @mkdir -p $(PLATFORMDIR)/extras/apps
556 @mkdir -p $(PLATFORMDIR)/extras/lib
558 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
559 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
560 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
562 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
563 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
564 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
565 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
566 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
567 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
568 ifneq ($(NEED_EX_USB),y)
569 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
570 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
571 endif
572 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
574 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
575 ifeq ($(TCONFIG_L7PAT),y)
576 @cd layer7 && ./squish.sh
577 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
578 endif
580 ifeq ($(TCONFIG_PPTPD),y)
581 @mkdir -p $(TARGETDIR)/rom/etc/vpn
582 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
583 chmod +x $(TARGETDIR)/rom/etc/vpn/*
584 endif
586 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
587 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
588 @echo ---
590 @rm -f $(TARGETDIR)/lib/modules/*/build
592 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
593 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
595 # Package kernel and filesystem
596 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
597 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
598 # $(MAKE) -C $(LINUXDIR) zImage ; \
599 # else \
600 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
601 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
602 # fi
604 # Pad self-booting Linux to a 64 KB boundary
605 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
606 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
607 # Append filesystem to self-booting Linux
608 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
611 libc: $(LIBDIR)/ld-uClibc.so.0
612 # $(MAKE) -C ../../../tools-src/uClibc all
613 # $(MAKE) -C ../../../tools-src/uClibc install
617 # cleaners
620 clean: clean-build $(obj-clean)
621 rm -rf layer7/squished
622 rm -f .ipv6-y .ipv6-n
623 rm -f .fullssl-y .fullssl-n
624 make -C config clean
626 clean-build: dummy
627 rm -rf $(TARGETDIR)
628 rm -rf $(INSTALLDIR)
629 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
630 rm -rf $(PLATFORMDIR)/extras
632 distclean: clean
633 ifneq ($(INSIDE_MAK),1)
634 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
635 endif
636 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
639 # configuration
642 CONFIG_IN := config/config.in
644 config/conf config/mconf:
645 @$(MAKE) -C config
647 rconf: config/conf
648 @config/conf $(CONFIG_IN)
650 rmconf: config/mconf
651 @config/mconf $(CONFIG_IN)
653 roldconf: config/conf
654 @config/conf -o $(CONFIG_IN)
655 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
657 kconf:
658 @$(MAKE) -C $(LINUXDIR) config
660 kmconf:
661 @$(MAKE) -C $(LINUXDIR) menuconfig
663 koldconf:
664 @$(MAKE) -C $(LINUXDIR) oldconfig
665 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
667 bboldconf:
668 @$(MAKE) -C busybox oldconfig
670 config conf: rconf kconf
672 menuconfig mconf: rmconf kmconf
674 .ipv6-y .ipv6-n:
675 @rm -f .ipv6-y .ipv6-n
676 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
677 @touch $@
679 .fullssl-y .fullssl-n:
680 @rm -f .fullssl-y .fullssl-n
681 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
682 @touch $@
684 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
686 oldconfig oldconf: koldconf roldconf dependconf bboldconf
690 # overrides and extra dependencies
693 busybox: dummy
694 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
696 busybox-install:
697 rm -rf $(INSTALLDIR)/busybox
698 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
700 busybox-clean:
701 -@$(MAKE) -C busybox distclean
703 busybox-config:
704 $(MAKE) -C busybox menuconfig
707 httpd: shared nvram mssl
708 @$(SEP)
709 @$(MAKE) -C httpd
711 www-install:
712 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
714 matrixssl:
715 @$(SEP)
716 @$(MAKE) -C matrixssl/src
718 matrixssl-install:
719 @true
721 matrixssl-clean:
722 -@$(MAKE) -C matrixssl/src clean
724 cyassl/stamp-h1:
725 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
726 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
727 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
728 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
729 PTHREAD_LIBS="-lpthread" \
730 $(CONFIGURE)
731 @touch cyassl/stamp-h1
733 cyassl: cyassl/stamp-h1
734 @$(SEP)
735 @$(MAKE) -C cyassl
737 cyassl-clean:
738 -@$(MAKE) -C cyassl clean
739 @rm -f cyassl/stamp-h1
741 cyassl-install:
742 @true
744 ifeq ($(FULL_OPENSSL),y)
745 OPENSSL_CIPHERS:=enable-rc5
746 else
747 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
748 endif
750 openssl/stamp-h1:
751 cd openssl && \
752 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
753 -ffunction-sections -fdata-sections -Wl,--gc-sections \
754 shared $(OPENSSL_CIPHERS) \
755 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
756 no-seed no-capieng no-gms no-gmp no-rfc3779 \
757 no-err no-hw no-jpake \
758 no-zlib no-engines no-sse2 no-libunbound no-ssl-trace \
759 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
761 @$(MAKE) -C openssl clean
762 @touch openssl/stamp-h1
764 openssl: openssl/stamp-h1
766 openssl-clean:
767 -@$(MAKE) -C openssl clean
768 @rm -f openssl/stamp-h1
770 openssl-install: openssl
771 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
772 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
773 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
775 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
776 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
777 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
779 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
781 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
782 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
784 #ifeq ($(FULL_OPENSSL),y)
785 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
786 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
787 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
788 #endif
790 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
792 mdu: shared mssl
794 rc: nvram shared
796 bridge/Makefile:
797 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
798 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
800 bridge: bridge/Makefile
801 @$(SEP)
802 @$(MAKE) -C bridge
804 bridge-clean:
805 -@$(MAKE) -C bridge clean
806 @rm -f bridge/Makefile
808 bridge-install:
809 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
810 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
812 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
813 @$(SEP)
814 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
815 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
816 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
817 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
818 -DNO_INOTIFY -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
819 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
820 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
822 dnsmasq-install:
823 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
824 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
826 nettle/stamp-h1: gmp
827 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
828 CPPFLAGS="-I$(TOP)/gmp" \
829 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
830 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
831 $(CONFIGURE) prefix=$(TOP)/nettle
832 @touch nettle/stamp-h1
834 nettle: nettle/stamp-h1
835 @$(SEP)
836 @$(MAKE) -C nettle
837 @$(MAKE) -C nettle install
839 nettle-clean:
840 -@$(MAKE) -C nettle clean
841 @rm -f nettle/stamp-h1
842 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
844 gmp/stamp-h1:
845 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
846 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
847 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
848 $(CONFIGURE)
849 @touch gmp/stamp-h1
851 gmp: gmp/stamp-h1
852 @$(SEP)
853 @$(MAKE) -C gmp
855 gmp-clean:
856 @$(MAKE) -C gmp clean
857 @rm -f gmp/stamp-h1
859 iptables:
860 ifeq ($(CONFIG_LINUX26),y)
861 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
862 else
863 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
864 endif
865 @$(SEP)
866 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
868 iptables-install:
869 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
870 cd $(INSTALLDIR)/iptables/usr/sbin && \
871 ln -sf iptables iptables-restore && \
872 ln -sf iptables iptables-save
874 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
875 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
877 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
879 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
880 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
881 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
883 ifeq ($(TCONFIG_IPV6),y)
884 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
885 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
886 cd $(INSTALLDIR)/iptables/usr/sbin && \
887 ln -sf ip6tables ip6tables-restore && \
888 ln -sf ip6tables ip6tables-save
889 endif
891 iptables-clean:
892 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
894 ppp:
895 @$(SEP)
896 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
897 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
899 ppp-%:
900 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
902 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
903 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
904 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
905 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
906 @touch rp-pppoe/src/stamp-h1
908 rp-pppoe: pppd rp-pppoe/src/stamp-h1
909 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
911 rp-pppoe-clean:
912 -@$(MAKE) -C rp-pppoe/src clean
913 @rm -f rp-pppoe/src/pppoe-relay
914 @rm -f rp-pppoe/src/stamp-h1
916 rp-pppoe-install: rp-pppoe
917 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
918 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
919 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
920 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
923 upnp: nvram shared iptables
925 libnfnetlink/stamp-h1:
926 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
927 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
928 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
929 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
930 touch libnfnetlink/stamp-h1
932 libnfnetlink: libnfnetlink/stamp-h1
933 @$(SEP)
934 $(MAKE) -C libnfnetlink
936 libnfnetlink-install:
937 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
938 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
939 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
940 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
941 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
943 miniupnpd-config:
944 #ifeq ($(TCONFIG_IPV6),y)
945 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
946 #else
947 @cd miniupnpd && ./genconfig.sh --leasefile --vendorcfg
948 #endif
950 miniupnpd: iptables miniupnpd-config
951 @$(SEP)
952 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
953 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
954 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
956 miniupnpd-clean:
957 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
958 @rm -f miniupnpd/config.h
960 miniupnpd-install:
961 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
962 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
964 # !!TB
965 shared: busybox
967 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
968 @$(SEP)
969 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
971 vsftpd-install: vsftpd
972 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
973 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
975 ntfs-3g/Makefile:
976 cd ntfs-3g && \
977 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
978 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
979 $(CONFIGURE) --enable-shared=no --enable-static=no \
980 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
981 --disable-ntfsprogs --disable-crypto --without-uuid \
982 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
984 ntfs-3g: ntfs-3g/Makefile
985 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
987 ntfs-3g-clean:
988 -@$(MAKE) -C ntfs-3g clean
989 @rm -f ntfs-3g/Makefile
991 ntfs-3g-install: ntfs-3g
992 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
993 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
994 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
995 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
996 ln -sf ../bin/ntfs-3g mount.ntfs
998 libusb10/Makefile: libusb10/Makefile.in
999 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
1000 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
1002 libusb10: libusb10/Makefile
1003 $(MAKE) -C $@
1005 libusb10-install: libusb10
1006 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
1007 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1009 libusb10-clean:
1010 -@$(MAKE) -C $@ clean
1011 @rm -rf libusb10/Makefile
1013 libusb/Makefile: libusb/Makefile.in
1014 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1015 $(CONFIGURE) --prefix=/usr \
1016 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1017 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1018 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1020 libusb: libusb10 libusb/Makefile
1021 $(MAKE) -C $@
1023 libusb-install: libusb
1024 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1025 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1027 libusb-clean:
1028 -@$(MAKE) -C $@ clean
1029 @rm -rf libusb/Makefile
1031 usbmodeswitch: libusb10
1032 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1033 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1034 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1036 usbmodeswitchdb-install:
1037 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1038 # compress whitespace
1039 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1040 F=`basename $$D`; \
1041 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1042 done
1044 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1045 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1046 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1047 @mkdir -p $(TARGETDIR)/rom/etc
1048 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1050 #libdaemon: libdaemon/Makefile
1051 #$(MAKE) -C $@
1053 #libdaemon/Makefile: libdaemon/Makefile.in
1054 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1055 # --disable-dependency-tracking
1057 #libdaemon-install: libdaemon
1058 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1059 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1060 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1061 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1062 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1064 #libdaemon-clean:
1065 # -@$(MAKE) -C libdaemon distclean
1067 #radvd/stamp-h1:
1068 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1069 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1070 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1071 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1072 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1073 # @$(MAKE) -C radvd clean
1074 # @touch radvd/stamp-h1
1076 #radvd: libdaemon radvd/stamp-h1
1078 #radvd-clean:
1079 # -@$(MAKE) -C radvd distclean
1080 # @rm -f radvd/stamp-h1
1082 #radvd-install: radvd
1083 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1084 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1086 dhcpv6/stamp-h1:
1087 @cd dhcpv6 && \
1088 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1089 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1090 ac_cv_func_setpgrp_void=yes \
1091 $(CONFIGURE) --prefix= --with-localdbdir=/var
1092 @$(MAKE) -C dhcpv6 clean
1093 @touch dhcpv6/stamp-h1
1095 dhcpv6: dhcpv6/stamp-h1
1096 @$(SEP)
1097 @$(MAKE) -C dhcpv6 dhcp6c
1099 dhcpv6-install: dhcpv6
1100 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1101 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1103 dhcpv6-clean:
1104 -@$(MAKE) -C dhcpv6 clean
1105 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1108 p910nd:
1109 samba:
1110 samba3:
1112 nvram: shared
1114 prebuilt: shared
1116 vlan:
1117 @$(SEP)
1118 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1120 vlan-install:
1121 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1122 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1125 pptp-client-install:
1126 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1127 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1130 accel-pptp: pppd accel-pptp/Makefile
1131 @$(MAKE) -C accel-pptp
1133 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1134 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1135 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1137 accel-pptp-clean:
1138 -@$(MAKE) -C accel-pptp clean
1139 @rm -f accel-pptp/Makefile
1141 accel-pptp-install: accel-pptp
1142 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1143 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1145 pptpd/stamp-h1:
1146 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1147 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1148 touch pptpd/stamp-h1
1150 pptpd: pptpd/stamp-h1
1152 pptpd-install: pptpd
1153 @echo pptpd
1154 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1155 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1156 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1157 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1158 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1159 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1161 pptpd-clean:
1162 -@$(MAKE) -C pptpd clean
1163 rm -rf pptpd/stamp-h1 pptpd/.deps
1165 pppd/Makefile: pppd/linux/Makefile.top
1166 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1168 pppd: pppd/Makefile
1169 @$(SEP)
1170 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1172 pppd-clean:
1173 -@$(MAKE) -C pppd clean
1174 @rm -f pppd/Makefile
1176 pppd-install: pppd
1177 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1178 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1179 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1180 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1181 ifeq ($(TCONFIG_L2TP),y)
1182 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1183 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1184 endif
1186 # ipupdate-install:
1187 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1188 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1190 zebra/stamp-h1:
1191 @cd zebra && rm -f config.cache && \
1192 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1193 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1194 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1195 $(CONFIGURE) --sysconfdir=/etc \
1196 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1197 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1198 @touch zebra/stamp-h1
1200 zebra: zebra/stamp-h1
1201 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1203 zebra-clean:
1204 -@$(MAKE) -C zebra clean
1205 @rm -f zebra/stamp-h1
1207 zebra-install: zebra
1208 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1209 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1210 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1211 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1212 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1213 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1216 rp-l2tp-install:
1217 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1218 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1219 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1220 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1221 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1222 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1223 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1225 xl2tpd: pppd
1226 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1228 xl2tpd-install: xl2tpd
1229 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1230 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1233 bpalogin-install:
1234 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1235 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1238 # libnet:
1239 # @$(SEP)
1240 # @-mkdir -p libnet/lib
1241 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1243 # libpcap:
1244 # @$(SEP)
1245 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1247 libbcm:
1248 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1250 libbcm-install:
1251 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1252 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1255 iproute2:
1256 @$(SEP)
1257 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1259 iproute2-install: iproute2
1260 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1261 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1262 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1263 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1266 ntpc: nvram shared
1269 dropbear: dropbear/config.h
1270 @$(SEP)
1271 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1273 dropbear-install:
1274 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1275 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1276 cd $(INSTALLDIR)/dropbear/usr/bin && \
1277 ln -sf dropbearmulti dropbear && \
1278 ln -sf dropbearmulti dropbearconvert && \
1279 ln -sf dropbearmulti dropbearkey && \
1280 ln -sf dropbearmulti dbclient && \
1281 ln -sf dropbearmulti ssh && \
1282 ln -sf dropbearmulti scp
1284 dropbear-clean:
1285 -@$(MAKE) -C dropbear clean
1286 @rm -f dropbear/config.h
1288 dropbear/config.h:
1289 cd dropbear && \
1290 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1291 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1292 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1293 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1294 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1295 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1296 @$(MAKE) -C dropbear clean
1298 # Media libraries
1300 sqlite/stamp-h1:
1301 cd sqlite && \
1302 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1303 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1304 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1305 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1306 touch sqlite/stamp-h1
1308 sqlite: sqlite/stamp-h1
1309 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1311 sqlite-clean:
1312 -@$(MAKE) -C sqlite clean
1313 @rm -f sqlite/stamp-h1
1315 sqlite-install: sqlite
1316 @$(SEP)
1317 ifeq ($(TCONFIG_NGINX),y)
1318 install -D sqlite/.libs/libsqlite3.so.0.8.6 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1319 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1320 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1321 ln -sf libsqlite3.so.0.8.6 libsqlite3.so.0 && \
1322 ln -sf libsqlite3.so.0.8.6 libsqlite3.so
1323 endif
1325 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1327 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1328 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1330 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1331 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1333 FFMPEG_PROTOCOLS:=file
1334 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1336 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
1337 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1339 ffmpeg/stamp-h1: zlib
1340 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1341 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1342 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1343 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1344 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1345 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1346 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1347 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1348 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1349 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1350 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1351 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1352 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1353 --extra-libs="-L$(TOP)/zlib -lz" \
1354 --enable-zlib --disable-debug --prefix=''
1355 touch ffmpeg/stamp-h1
1357 ffmpeg: ffmpeg/stamp-h1 zlib
1358 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1360 ffmpeg-clean:
1361 -@$(MAKE) -C ffmpeg clean
1362 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1364 ffmpeg-install: ffmpeg
1365 @$(SEP)
1366 ifneq ($(MEDIA_SERVER_STATIC),y)
1367 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1368 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1369 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1370 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1371 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1372 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1373 endif
1375 libogg/stamp-h1:
1376 cd libogg && \
1377 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1378 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1379 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1380 touch libogg/stamp-h1
1382 libogg: libogg/stamp-h1
1383 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1385 libogg-clean:
1386 -@$(MAKE) -C libogg clean
1387 @rm -f libogg/stamp-h1
1389 libogg-install: libogg
1390 @$(SEP)
1391 ifneq ($(MEDIA_SERVER_STATIC),y)
1392 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1393 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1394 endif
1396 flac/stamp-h1: libogg
1397 cd flac && \
1398 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1399 CPPFLAGS="-I$(TOP)/libogg/include" \
1400 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1401 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1402 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1403 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1404 touch flac/stamp-h1
1406 flac: flac/stamp-h1 libogg
1407 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1409 flac-clean:
1410 -@$(MAKE) -C flac clean
1411 @rm -f flac/stamp-h1
1413 flac-install: flac
1414 @$(SEP)
1415 ifneq ($(MEDIA_SERVER_STATIC),y)
1416 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1417 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1418 endif
1420 jpeg/stamp-h1:
1421 cd jpeg && \
1422 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1423 touch jpeg/stamp-h1
1425 jpeg: jpeg/stamp-h1
1426 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1427 install -d $(TOP)/jpeg/staged/include
1428 install -d $(TOP)/jpeg/staged/lib
1429 install -d $(TOP)/jpeg/staged/bin
1430 install -d $(TOP)/jpeg/staged/man/man1
1431 @$(MAKE) -C jpeg LIBTOOL="" prefix=$(TOP)/jpeg/staged install
1432 install -D jpeg/libjpeg.so $(TOP)/jpeg/staged/lib/libjpeg.so
1433 rm -f $(TOP)/jpeg/staged/lib/libjpeg.la
1435 jpeg-clean:
1436 -@$(MAKE) -C jpeg clean
1437 @rm -f jpeg/stamp-h1 jpeg/Makefile
1438 @rm -rf jpeg/staged
1440 jpeg-install: jpeg
1441 @$(SEP)
1442 ifneq ($(MEDIA_SERVER_STATIC),y)
1443 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1444 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1445 endif
1446 ifeq ($(TCONFIG_NGINX),y)
1447 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1448 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1449 endif
1451 libexif/stamp-h1:
1452 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1453 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1454 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1455 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1456 touch libexif/stamp-h1
1458 libexif: libexif/stamp-h1
1459 @$(MAKE) -C libexif all
1461 libexif-clean:
1462 -@$(MAKE) -C libexif clean
1463 @rm -f libexif/stamp-h1
1465 libexif-install: libexif
1466 @$(SEP)
1467 ifneq ($(MEDIA_SERVER_STATIC),y)
1468 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1469 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1470 endif
1472 zlib/stamp-h1:
1473 cd zlib && \
1474 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC" LDSHAREDLIBC="$(EXTRALDFLAGS)" \
1475 ./configure --shared --prefix=/usr --libdir=/usr/lib
1476 touch zlib/stamp-h1
1478 zlib: zlib/stamp-h1
1479 @$(MAKE) -C zlib all
1480 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1482 zlib-clean:
1483 -@$(MAKE) -C zlib clean
1484 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1485 @rm -rf zlib/staged
1487 zlib-install: zlib
1488 @$(SEP)
1489 ifneq ($(MEDIA_SERVER_STATIC),y)
1490 install -d $(INSTALLDIR)/zlib/usr/lib
1491 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1492 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1493 endif
1494 ifeq ($(TCONFIG_BT),y)
1495 install -d $(INSTALLDIR)/zlib/usr/lib
1496 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1497 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1498 endif
1499 ifeq ($(TCONFIG_TOR),y)
1500 install -d $(INSTALLDIR)/zlib/usr/lib
1501 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1502 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1503 endif
1504 ifeq ($(TCONFIG_NGINX),y)
1505 install -d $(INSTALLDIR)/zlib/usr/lib
1506 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1507 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1508 endif
1510 libid3tag/stamp-h1: zlib
1511 cd libid3tag && \
1512 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1513 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1514 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1515 --disable-debugging --disable-profiling
1516 touch libid3tag/stamp-h1
1518 libid3tag: libid3tag/stamp-h1 zlib
1519 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1521 libid3tag-clean:
1522 -@$(MAKE) -C libid3tag clean
1523 @rm -f libid3tag/stamp-h1
1525 libid3tag-install: libid3tag
1526 @$(SEP)
1527 ifneq ($(MEDIA_SERVER_STATIC),y)
1528 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1529 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1530 endif
1532 libvorbis/stamp-h1: libogg
1533 cd libvorbis && \
1534 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1535 CPPFLAGS="-I$(TOP)/libogg/include" \
1536 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1537 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1538 --with-ogg-includes="$(TOP)/libogg/include" \
1539 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1540 touch libvorbis/stamp-h1
1542 libvorbis: libvorbis/stamp-h1
1543 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1545 libvorbis-clean:
1546 -@$(MAKE) -C libvorbis clean
1547 @rm -f libvorbis/stamp-h1
1549 libvorbis-install: libvorbis
1550 @$(SEP)
1551 ifneq ($(MEDIA_SERVER_STATIC),y)
1552 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1553 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1554 endif
1556 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1557 @$(SEP)
1558 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1560 minidlna-clean:
1561 -@$(MAKE) -C minidlna clean
1562 @rm -f minidlna/stamp-h1
1564 minidlna-install: minidlna
1565 @$(SEP)
1566 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1567 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1569 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1570 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1571 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1572 $(CONFIGURE) --prefix=/usr
1574 igmpproxy: igmpproxy/src/Makefile
1575 @$(SEP)
1576 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1578 igmpproxy-install: igmpproxy
1579 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1580 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1582 igmpproxy-clean:
1583 -@$(MAKE) -C igmpproxy/src clean
1584 @rm -f igmpproxy/src/Makefile
1586 udev:
1587 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1588 PROGRAMS=udevtrigger
1590 udev-install: udev
1591 install -d $(INSTALLDIR)
1592 install -d $(TARGETDIR)
1593 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1595 hotplug2:
1596 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1598 hotplug2-install: hotplug2
1599 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1600 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1602 emf:
1603 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1605 emf-install: emf
1606 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1608 igs:
1609 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1611 igs-install: igs
1612 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1614 wanuptime: nvram shared
1615 @$(SEP)
1616 @$(MAKE) -C wanuptime
1618 wanuptime-clean:
1619 -@$(MAKE) -C wanuptime clean
1621 wanuptime-install:
1622 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1623 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1625 ebtables: dummy
1626 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1627 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1628 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1630 ebtables-install: ebtables
1631 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1633 @mkdir -p $(TARGETDIR)/rom/etc
1634 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1635 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1637 install -d $(INSTALLDIR)/ebtables/usr/lib
1638 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1639 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1640 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1642 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1643 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1644 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1646 ebtables-clean:
1647 -@$(MAKE) -C ebtables clean
1649 #Roadkill
1650 spawn-fcgi/stamp-h1:
1651 cd spawn-fcgi && autoreconf && CC=$(CC) \
1652 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1653 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1654 ac_cv_func_malloc_0_nonnull=yes \
1655 $(CONFIGURE) --prefix=/usr
1656 touch spawn-fcgi/stamp-h1
1658 spawn-fcgi: spawn-fcgi/stamp-h1
1659 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1661 spawn-fcgi-clean:
1662 -@$(MAKE) -C spawn-fcgi clean
1663 rm -f spawn-fcgi/stamp-h1
1665 spawn-fcgi-install: spawn-fcgi
1666 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1667 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1668 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1670 #Roadkill
1671 glib/stamp-h1:
1672 @$(SEP)
1673 @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 \
1674 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 \
1675 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 \
1676 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 \
1677 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
1678 @$(MAKE) -C glib
1679 touch glib/stamp-h1
1681 glib: glib/stamp-h1
1682 @$(MAKE) -C glib $(PARALLEL_BUILD)
1684 glib-clean:
1685 -@$(MAKE) -C glib clean
1686 rm -f glib/stamp-h1
1688 glib-install: glib
1689 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1691 nocat/stamp-h1: glib-install
1692 @$(SEP)
1693 @cd nocat && \
1694 NC_CONF_PATH="/" \
1695 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1696 @$(MAKE) -C nocat
1698 echo *** integrate glib to nocat installdir
1699 install -d $(INSTALLDIR)/nocat/usr/lib
1700 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1701 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1702 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1703 touch nocat/stamp-h1
1705 nocat: nocat/stamp-h1
1706 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1708 nocat-clean:
1709 -@$(MAKE) -C nocat clean
1710 rm -f nocat/stamp-h1
1712 nocat-install:
1713 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1714 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1715 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1716 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1718 #Tomato RAF
1719 pcre/stamp-h1:
1720 $(SEP)
1721 cd pcre && autoreconf && \
1722 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1723 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1724 @touch pcre/stamp-h1
1725 [ -d pcre/m4 ] || mkdir pcre/m4
1727 pcre: pcre/stamp-h1
1729 pcre-install: pcre
1730 @$(SEP)
1731 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1732 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1733 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1734 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1735 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1736 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1737 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1739 pcre-clean:
1740 ( if [ -f pcre/Makefile ]; then \
1741 $(MAKE) -C pcre clean; \
1742 rm -rf pcre/stamp-h1; \
1743 fi )
1745 libxml2/stamp-h1:
1746 cd libxml2 && \
1747 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1748 $(CONFIGURE) --prefix=/usr --without-python --enable-static --enable-shared
1749 touch $@
1751 libxml2: libxml2/stamp-h1
1752 @$(MAKE) -C libxml2 all $(PARALLEL_BUILD)
1753 @$(MAKE) -C libxml2 DESTDIR=$(TOP)/libxml2/staged install
1755 libxml2-install: libxml2
1756 @$(SEP)
1757 install -D libxml2/.libs/libxml2.so.2.9.1 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1758 $(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1759 cd $(INSTALLDIR)/libxml2/usr/lib && \
1760 ln -sf libxml2.so.2.9.1 libxml2.so.2 && \
1761 ln -sf libxml2.so.2.9.1 libxml2.so
1763 libxml2-clean:
1764 -@$(MAKE) -C libxml2 clean
1765 @rm -f libxml2/stamp-h1
1766 @rm -rf libxml2/staged
1768 libpng/stamp-h1: zlib
1769 cd libpng && \
1770 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" LDFLAGS="-L$(TOP)/zlib" \
1771 $(CONFIGURE) --prefix=/usr --enable-static --enable-shared
1772 touch $@
1774 libpng: libpng/stamp-h1
1775 @$(MAKE) -C libpng all $(PARALLEL_BUILD)
1776 @$(MAKE) -C libpng DESTDIR=$(TOP)/libpng/staged install
1778 libpng-install: libpng
1779 @$(SEP)
1780 install -D libpng/.libs/libpng.so.3.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1781 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1782 cd $(INSTALLDIR)/libpng/usr/lib && \
1783 ln -sf libpng.so.3.51.0 libpng.so && \
1784 ln -sf libpng.so.3.51.0 libpng.so.3
1785 install -D libpng/.libs/libpng12.so.0.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1786 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1787 cd $(INSTALLDIR)/libpng/usr/lib && \
1788 ln -sf libpng12.so.0.51.0 libpng12.so && \
1789 ln -sf libpng12.so.0.51.0 libpng12.so.0
1791 libpng-clean:
1792 -@$(MAKE) -C libpng clean
1793 @rm -f libpng/stamp-h1
1794 @rm -rf libpng/staged
1796 php/stamp-h1: pcre zlib libiconv sqlite libxml2 libpng jpeg libcurl
1797 @$(SEP)
1798 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1799 CFLAGS="-Os -Wall -I$(TOP)/zlib -I$(TOP)/libxml2/include/libxml -I$(TOP)/libxml2/include -I$(TOP)/pcre -I$(TOP)/libiconv/include \
1800 -I$(TOP)/libpng/staged/usr/include -I$(TOP)/libcurl/staged/include" \
1801 LDFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs \
1802 -L$(TOP)/libpng/.libs -L$(TOP)/libcurl/staged/lib" \
1803 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" \
1804 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 \
1805 -lsqlite3 -ldl -lpthread -liconv -lxml2 -lstdc++ -lcurl" \
1806 PHP_FCGI_LIBXML_DIR="$(TOP)/libxml2/staged/usr" \
1807 ac_cv_func_memcmp_working=yes \
1808 cv_php_mbstring_stdarg=yes \
1809 $(CONFIGURE) --prefix=/usr \
1810 --enable-shared \
1811 --disable-static \
1812 --disable-rpath \
1813 --disable-debug \
1814 --without-pear \
1815 --with-config-file-path=/etc \
1816 --with-config-file-scan-dir=/etc/php5 \
1817 --disable-short-tags \
1818 --with-zlib \
1819 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1820 --disable-phar \
1821 --enable-cli \
1822 --enable-cgi \
1823 --disable-calendar \
1824 --enable-ctype \
1825 --with-curl="$(TOP)/libcurl/staged" \
1826 --enable-fileinfo \
1827 --without-gettext \
1828 --enable-dom \
1829 --enable-exif \
1830 --disable-ftp \
1831 --without-gmp \
1832 --with-gd \
1833 --with-png-dir="$(TOP)/libpng/staged/usr" \
1834 --with-jpeg-dir="$(TOP)/jpeg/staged" \
1835 --enable-hash \
1836 --with-iconv="$(TOP)/libiconv/staged/usr" \
1837 --with-iconv-dir="$(TOP)/libiconv/staged/usr" \
1838 --enable-json \
1839 --without-ldap \
1840 --enable-mbstring \
1841 --without-mcrypt \
1842 --without-openssl \
1843 --disable-pcntl \
1844 --without-mysqli \
1845 --with-mysql \
1846 --with-mysql-sock="/var/run/mysqld.sock" \
1847 --with-pdo-mysql \
1848 --without-pdo-pgsql \
1849 --with-pdo-sqlite \
1850 --enable-pdo \
1851 --without-pgsql \
1852 --enable-session \
1853 --disable-shmop \
1854 --enable-simplexml \
1855 --disable-soap \
1856 --disable-sockets \
1857 --with-sqlite3 \
1858 --disable-sysvmsg \
1859 --disable-sysvsem \
1860 --disable-sysvshm \
1861 --disable-tokenizer \
1862 --enable-xml \
1863 --enable-xmlreader \
1864 --enable-xmlwriter \
1865 --enable-zip \
1866 --disable-filter \
1867 --with-libxml-dir="$(TOP)/libxml2/staged/usr"
1868 @touch php/stamp-h1
1870 php: php/stamp-h1
1871 @$(SEP)
1872 @$(MAKE) -C php
1874 php-clean:
1875 -@$(MAKE) -C php clean
1876 -@rm php/stamp-h1
1878 php-install: php
1879 @$(SEP)
1880 install -d $(INSTALLDIR)/php/usr/sbin
1881 install -D php/sapi/cli/.libs/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1882 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1883 install -D php/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1884 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1885 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1887 nginx/stamp-h1: openssl zlib pcre
1888 @$(SEP)
1889 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1890 --prefix=/usr \
1891 --sbin-path=/usr/sbin \
1892 --conf-path=/etc/nginx/nginx.conf \
1893 --error-log-path=/tmp/var/log/nginx/error.log \
1894 --http-log-path=/tmp/var/log/nginx/access.log \
1895 --pid-path=/tmp/var/run/nginx.pid \
1896 --lock-path=/tmp/var/run/nginx.lock.accept \
1897 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1898 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1899 --with-http_flv_module \
1900 --with-http_ssl_module \
1901 --with-http_gzip_static_module \
1902 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1903 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1904 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1905 --with-cc="$(CC)" \
1906 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1907 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1908 $(ADDITIONAL_MODULES)
1910 nginx: nginx/stamp-h1
1911 @$(SEP)
1912 @$(MAKE) -C nginx
1914 nginx-clean:
1915 -@$(MAKE) -C nginx clean
1916 -@rm -f nginx/stamp-h1
1918 nginx-install: nginx
1919 install -d $(INSTALLDIR)/nginx/usr/sbin
1920 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1921 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1923 libncurses/stamp-h1:
1924 cd libncurses && CC=$(CC) \
1925 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC" \
1926 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1927 LIBS="-lstdc++" \
1928 $(CONFIGURE) --prefix=/usr --with-shared --with-normal --disable-debug --without-ada --without-manpages --without-progs --without-tests
1929 touch libncurses/stamp-h1
1931 libncurses: libncurses/stamp-h1
1932 @$(SEP)
1933 $(MAKE) -C libncurses $(PARALLEL_BUILD)
1934 $(MAKE) -C libncurses DESTDIR=$(TOP)/libncurses/staged install
1936 libncurses-clean:
1937 -@$(MAKE) -C libncurses clean
1938 @rm -f libncurses/stamp-h1 libncurses/Makefile
1939 @rm -rf libncurses/staged
1941 libncurses-install: libncurses
1942 install -d $(INSTALLDIR)/libncurses/usr/lib
1943 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo
1944 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1945 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1946 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1947 install -D -m 0644 libncurses/staged/usr/share/terminfo/l/linux $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1948 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt100 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1949 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt220 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1950 install -D -m 0644 libncurses/staged/usr/share/terminfo/x/xterm $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1951 cd $(INSTALLDIR)/libncurses/usr/lib && ln -sf ../share/terminfo terminfo
1952 install libncurses/lib/libncurses.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.6
1953 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.6
1954 install libncurses/lib/libpanel.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.6
1955 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.6
1956 install libncurses/lib/libform.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libform.so.6
1957 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libform.so.6
1958 install libncurses/lib/libmenu.so.6.0 $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.6
1959 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.6
1960 cd $(INSTALLDIR)/libncurses/usr/lib/ && \
1961 ln -sf libncurses.so.6 libncurses.so && \
1962 ln -sf libpanel.so.6 libpanel.so && \
1963 ln -sf libform.so.6 libform.so && \
1964 ln -sf libmenu.so.6 libmenu.so
1966 mysql/stamp-h1: openssl zlib libncurses
1967 @$(SEP)
1968 cd mysql && cp -f configure.mipsel configure && \
1969 CFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1970 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1971 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1972 CPPFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1973 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1974 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1975 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/zlib/staged/usr/lib -L$(TOP)/libncurses/lib -fPIC -EL" \
1976 LIBS="-lcrypt -lz -lstdc++ -lssl -lcrypto -lncurses" \
1977 $(CONFIGURE) --prefix=/usr \
1978 --without-debug --without-docs --without-man --with-charset=utf8 --with-extra-charsets=ascii,latin1,gb2312,gbk \
1979 --enable-shared --disable-static \
1980 --without-mysqlmanager \
1981 --with-pthread \
1982 --with-ssl \
1983 --without-docs \
1984 --with-geometry \
1985 --with-low-memory \
1986 --enable-assembler \
1987 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1988 ac_cv_c_stack_direction=-1
1989 cd mysql && tar xvfz .host.tgz
1990 # Update time of config.status to avoid run 'config.status --recheck'
1991 touch mysql/config.status
1992 # Update time of Makefile to avoid regenerate it when do make
1993 sleep 5
1994 -find mysql -name Makefile -print | xargs -i touch {}
1995 touch mysql/stamp-h1
1997 mysql: mysql/stamp-h1
1998 @$(SEP)
1999 @$(MAKE) -C mysql
2000 @$(MAKE) -C mysql DESTDIR=$(TOP)/mysql/staged install
2002 mysql-clean:
2003 -@$(MAKE) -C mysql clean
2004 -@rm -f mysql/stamp-h1
2005 -@rm -rf mysql/staged mysql/host
2007 mysql-install:
2008 install -d $(INSTALLDIR)/mysql/usr/bin
2009 install -d $(INSTALLDIR)/mysql/usr/lib
2010 install -d $(INSTALLDIR)/mysql/usr/libexec
2011 install -d $(INSTALLDIR)/mysql/usr/lib/mysql
2012 install -d $(INSTALLDIR)/mysql/usr/lib/mysql/plugin
2013 install -d $(INSTALLDIR)/mysql/usr/share
2014 install -d $(INSTALLDIR)/mysql/usr/share/mysql
2015 install -D -m 755 mysql/mycheck $(INSTALLDIR)/mysql/usr/bin
2016 install -D -m 755 mysql/staged/usr/bin/my_print_defaults $(INSTALLDIR)/mysql/usr/bin
2017 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/my_print_defaults
2018 install -D -m 755 mysql/staged/usr/bin/myisamchk $(INSTALLDIR)/mysql/usr/bin
2019 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/myisamchk
2020 install -D -m 755 mysql/staged/usr/bin/mysql $(INSTALLDIR)/mysql/usr/bin
2021 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysql
2022 install -D -m 755 mysql/staged/usr/bin/mysql_install_db $(INSTALLDIR)/mysql/usr/bin
2023 install -D -m 755 mysql/staged/usr/bin/mysqladmin $(INSTALLDIR)/mysql/usr/bin
2024 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqladmin
2025 install -D -m 755 mysql/staged/usr/bin/mysqldump $(INSTALLDIR)/mysql/usr/bin
2026 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqldump
2027 install -D -m 755 mysql/staged/usr/libexec/mysqld $(INSTALLDIR)/mysql/usr/libexec
2028 $(STRIP) $(INSTALLDIR)/mysql/usr/libexec/mysqld
2029 cd $(INSTALLDIR)/mysql/usr/bin && ln -sf ../libexec/mysqld mysqld
2030 # install -D -m 755 mysql/staged/usr/bin/mysqld_safe $(INSTALLDIR)/mysql/usr/bin
2031 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2032 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient.so.16.0.0
2033 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2034 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so.16 && \
2035 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so
2036 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient_r.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2037 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient_r.so.16.0.0
2038 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2039 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so.16 && \
2040 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
2041 # -@cd $(INSTALLDIR)/mysql/usr/lib/mysql/plugin && cp -arfpu $(TOP)/mysql/staged/usr/lib/mysql/plugin/* . && \
2042 # rm -f *.la *.a && \
2043 # $(STRIP) *.so.*
2044 -@cd $(INSTALLDIR)/mysql/usr/share/mysql && \
2045 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/english . && \
2046 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/fill_help_tables.sql . && \
2047 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables.sql . && \
2048 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables_data.sql .
2050 lzo/stamp-h1:
2051 cd lzo && \
2052 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
2053 touch lzo/stamp-h1
2055 lzo: lzo/stamp-h1
2056 @$(MAKE) -C lzo $(PARALLEL_BUILD)
2058 lzo-clean:
2059 -@$(MAKE) -C lzo clean
2060 @rm -f lzo/stamp-h1
2062 lzo-install: lzo
2063 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2064 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2065 cd $(INSTALLDIR)/lzo/usr/lib && \
2066 ln -sf liblzo2.so.2.0.0 liblzo2.so.2 && \
2067 ln -sf liblzo2.so.2.0.0 liblzo2.so
2069 openvpn/.conf: openssl lzo
2070 cd openvpn && \
2071 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2072 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
2073 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
2074 $(CONFIGURE) --prefix= \
2075 --with-crypto-library=openssl \
2076 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --disable-small \
2077 --disable-selinux --disable-socks \
2078 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
2079 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
2080 ac_cv_lib_resolv_gethostbyname=no
2081 touch openvpn/.conf
2083 openvpn: openvpn/.conf
2084 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
2086 openvpn-clean:
2087 -@$(MAKE) -C openvpn clean
2088 @rm -f openvpn/.conf
2090 openvpn-install: openvpn
2091 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2092 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2093 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2095 openvpn_plugin_auth_nvram:nvram
2097 #shibby
2098 nano/stamp-h1: libncurses
2099 cd nano && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2100 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2101 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2102 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libncurses/staged/usr/lib -fPIC" \
2103 ac_cv_lib_ncursesw_get_wch=no \
2104 $(CONFIGURE) --prefix=/usr --disable-nls --enable-all --without-libiconv-prefix --disable-utf8
2105 touch nano/stamp-h1
2107 nano: nano/stamp-h1
2108 @$(MAKE) -C nano $(PARALLEL_BUILD)
2110 nano-clean:
2111 -@$(MAKE) -C nano clean
2112 @rm -f nano/stamp-h1 nano/Makefile nano/src/Makefile
2114 nano-install: nano
2115 install -d $(INSTALLDIR)/nano/usr/sbin
2116 install -D nano/src/nano $(INSTALLDIR)/nano/usr/sbin/nano
2117 $(STRIP) -s $(INSTALLDIR)/nano/usr/sbin/nano
2119 libcurl/stamp-h1: zlib openssl
2120 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2121 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
2122 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2123 $(CONFIGURE) --prefix=$(TOP)/libcurl/staged --disable-thread --enable-shared --enable-static \
2124 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
2125 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
2126 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
2127 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
2128 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl/ssl" \
2129 --without-gnutls --without-krb4 --without-libidn \
2130 --with-linux-headers=$(LINUXDIR)/include \
2131 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2132 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
2133 touch libcurl/stamp-h1
2135 libcurl: libcurl/stamp-h1
2136 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
2137 @$(MAKE) -C libcurl install
2139 libcurl-clean:
2140 -@$(MAKE) -C libcurl clean
2141 @rm -f libcurl/stamp-h1 libcurl/Makefile
2142 @rm -rf libcurl/staged
2144 libcurl-install: libcurl
2145 install -d $(INSTALLDIR)/libcurl/usr/sbin
2146 install -D libcurl/src/.libs/curl $(INSTALLDIR)/libcurl/usr/sbin/curl
2147 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/sbin/curl
2148 install -d $(INSTALLDIR)/libcurl/usr/lib
2149 install -D libcurl/lib/.libs/libcurl.so.4.4.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.4.0
2150 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.4.0
2151 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
2152 ln -sf libcurl.so.4.4.0 libcurl.so.4 && \
2153 ln -sf libcurl.so.4.4.0 libcurl.so
2155 libevent/stamp-h1:
2156 cd libevent && CC=$(CC) \
2157 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2158 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2159 $(CONFIGURE)
2160 touch libevent/stamp-h1
2162 libevent: libevent/stamp-h1
2163 @$(SEP)
2164 $(MAKE) -C libevent $(PARALLEL_BUILD)
2165 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
2167 libevent-clean:
2168 -@$(MAKE) -C libevent clean
2169 @rm -f libevent/stamp-h1 libevent/Makefile
2170 @rm -rf libevent/staged
2172 libevent-install: libevent
2173 install -d $(INSTALLDIR)/libevent/usr/lib
2174 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2175 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2177 libiconv/stamp-h1:
2178 cd libiconv && CC=$(CC) \
2179 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2180 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2181 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
2182 touch libiconv/stamp-h1
2184 libiconv: libiconv/stamp-h1
2185 @$(SEP)
2186 $(MAKE) -C libiconv $(PARALLEL_BUILD)
2187 $(MAKE) -C libiconv DESTDIR=$(TOP)/libiconv/staged install
2189 libiconv-clean:
2190 -@$(MAKE) -C libiconv clean
2191 @rm -rf libiconv/stamp-h1 libiconv/Makefile
2192 @rm -rf libiconv/staged
2194 libiconv-install: libiconv
2195 install -d $(INSTALLDIR)/libiconv/usr/lib
2196 install libiconv/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2197 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2198 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
2199 ln -sf libiconv.so.2.5.1 libiconv.so.2 && \
2200 ln -sf libiconv.so.2.5.1 libiconv.so
2202 transmission/stamp-h1: openssl libcurl libevent zlib
2203 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2204 autoreconf && \
2205 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2206 --param large-function-growth=800 --param max-inline-insns-single=3000 \
2207 -ffunction-sections -fdata-sections" \
2208 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
2209 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
2210 HAVE_CXX=yes \
2211 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
2212 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
2213 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
2214 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
2215 LIBCURL_LIBS="-lcurl" \
2216 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
2217 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
2218 LIBEVENT_LIBS="-levent" \
2219 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2220 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
2221 OPENSSL_LIBS="-lcrypto -lssl" \
2222 ZLIB_CFLAGS="-I$(TOP)/zlib" \
2223 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
2224 ZLIB_LIBS="-lz"
2225 touch transmission/stamp-h1
2227 transmission: transmission/stamp-h1
2228 @$(SEP)
2229 $(MAKE) -C transmission $(PARALLEL_BUILD)
2231 transmission-clean:
2232 -@$(MAKE) -C transmission clean
2233 @rm -f transmission/stamp-h1 transmission/Makefile
2235 transmission-install: transmission
2236 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
2237 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
2238 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
2239 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
2240 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
2241 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
2242 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
2243 ifeq ($(TCONFIG_TR_EXTRAS),y)
2244 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2245 else
2246 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2247 endif
2249 btgui:
2250 @$(SEP)
2252 btgui-install: btgui
2253 install -d $(INSTALLDIR)/btgui/usr/bin
2254 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2256 libnfsidmap/stamp-h1:
2257 cd libnfsidmap && \
2258 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2259 ac_cv_func_malloc_0_nonnull=yes \
2260 ac_cv_func_realloc_0_nonnull=yes \
2261 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2262 touch libnfsidmap/stamp-h1
2264 libnfsidmap: libnfsidmap/stamp-h1
2265 @$(SEP)
2266 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2268 libnfsidmap-clean:
2269 -@$(MAKE) -C libnfsidmap clean
2270 @rm -f libnfsidmap/stamp-h1
2271 @rm -rf libnfsidmap/staged
2273 libnfsidmap-install: libnfsidmap
2274 install -d $(TOP)/libnfsidmap/staged
2275 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2277 portmap/stamp-h1:
2278 cd portmap \
2279 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2280 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2281 touch portmap/stamp-h1
2283 portmap: portmap/stamp-h1
2284 @$(SEP)
2285 $(MAKE) -C portmap $(PARALLEL_BUILD)
2287 portmap-clean:
2288 -@$(MAKE) -C portmap clean
2289 @rm -f portmap/stamp-h1
2291 portmap-install: portmap
2292 install -d $(INSTALLDIR)/portmap/usr/sbin
2293 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2294 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2296 e2fsprogs/stamp-h1:
2297 cd e2fsprogs && \
2298 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2299 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2300 touch e2fsprogs/stamp-h1
2302 e2fsprogs: e2fsprogs/stamp-h1
2303 @$(SEP)
2304 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2306 e2fsprogs-clean:
2307 -@$(MAKE) -C e2fsprogs clean
2308 @rm -f e2fsprogs/stamp-h1
2309 @rm -f e2fsprogs/Makefile
2310 @rm -rf e2fsprogs/staged
2312 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2313 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2314 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2315 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2316 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2317 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2318 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2319 ac_cv_func_malloc_0_nonnull=yes \
2320 ac_cv_func_realloc_0_nonnull=yes \
2321 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2322 --enable-nfsv4 --enable-nfsv3
2323 touch nfs-utils/stamp-h1
2325 nfs-utils: nfs-utils/stamp-h1
2326 @$(SEP)
2327 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2329 nfs-utils-clean:
2330 -@$(MAKE) -C nfs-utils clean
2331 @rm -f nfs-utils/stamp-h1
2333 nfs-utils-install: nfs-utils
2334 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2335 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2336 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2337 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2338 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2339 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2340 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2341 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2342 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2343 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2344 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2345 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2346 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2347 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2349 tinc/stamp-h1: openssl zlib lzo
2350 @cd tinc && autoreconf -fsi && \
2351 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2352 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
2353 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2354 $(CONFIGURE) \
2355 --prefix=/usr \
2356 --sysconfdir=/etc \
2357 --localstatedir=/var \
2358 --with-zlib-include="$(TOP)/zlib" \
2359 --with-zlib-lib="$(TOP)/zlib" \
2360 --with-lzo-include="$(TOP)/lzo/include" \
2361 --with-lzo-lib="$(TOP)/lzo/src/.libs" \
2362 --with-openssl-include="$(TOP)/openssl/include" \
2363 --with-openssl-lib="$(TOP)/openssl" \
2364 --disable-curses \
2365 --disable-readline
2366 @touch tinc/stamp-h1
2368 tinc: tinc/stamp-h1
2369 @$(SEP)
2370 @$(MAKE) -C tinc LIBS="-lcrypto $(TOP)/zlib/libz.a -llzo2" $(PARALLEL_BUILD)
2372 tinc-clean:
2373 -@$(MAKE) -C tinc clean
2374 @rm -f tinc/stamp-h1
2376 tinc-install:
2377 install -D tinc/src/tinc $(INSTALLDIR)/tinc/usr/sbin/tinc
2378 install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
2379 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tinc
2380 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tincd
2382 sd-idle/stamp-h1:
2383 cd sd-idle \
2384 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2385 $(MAKE) -C sd-idle
2386 chmod 0755 sd-idle/sd-idle
2387 touch sd-idle/stamp-h1
2389 sd-idle-clean:
2390 -@$(MAKE) -C sd-idle clean
2391 @rm -f sd-idle/stamp-h1
2393 sd-idle-install: sd-idle/stamp-h1
2394 install -d $(INSTALLDIR)/sd-idle/usr/bin
2395 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2396 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2398 snmp/stamp-h1:
2399 cd snmp && \
2400 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2401 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2402 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2403 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2404 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2405 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2406 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2407 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2408 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2409 touch snmp/stamp-h1
2411 snmp: snmp/stamp-h1
2412 @$(SEP)
2413 $(MAKE) -C snmp
2415 snmp-clean:
2416 -@$(MAKE) -C snmp clean
2417 @rm -f snmp/stamp-h1
2419 snmp-install: snmp
2420 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2421 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2423 apcupsd/stamp-h1:
2424 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2425 $(MAKE) configure && \
2426 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2427 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2428 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2429 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2430 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2431 touch apcupsd/stamp-h1
2433 apcupsd: apcupsd/stamp-h1
2434 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2436 apcupsd-clean:
2437 -@$(MAKE) -C apcupsd clean
2438 @rm -f apcupsd/stamp-h1
2439 @rm -f apcupsd/config*
2441 apcupsd-install: apcupsd
2442 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2443 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2444 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2445 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2446 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2448 libsodium/stamp-h1:
2449 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2450 $(CONFIGURE) --prefix=/usr --disable-ssp --enable-minimal
2451 touch libsodium/stamp-h1
2453 libsodium: libsodium/stamp-h1
2454 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2456 libsodium-install: libsodium
2457 install -d $(INSTALLDIR)/libsodium/usr/lib
2458 install -D libsodium/src/libsodium/.libs/libsodium.so.18.1.0 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.1.0
2459 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.18.1.0
2460 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2461 ln -sf libsodium.so.18.1.0 libsodium.so.18 && \
2462 ln -sf libsodium.so.18.1.0 libsodium.so
2464 libsodium-clean:
2465 -$(MAKE) -C libsodium clean
2466 @rm -rf libsodium/stamp-h1
2468 dnscrypt/stamp-h1: libsodium
2469 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2470 autoreconf && \
2471 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2472 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2473 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2474 $(CONFIGURE) --prefix=/usr --disable-ssp
2475 touch dnscrypt/stamp-h1
2477 dnscrypt: dnscrypt/stamp-h1
2478 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2480 dnscrypt-install: dnscrypt
2481 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2482 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2483 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2484 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2486 dnscrypt-clean:
2487 -@$(MAKE) -C dnscrypt clean
2488 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2490 tor/stamp-h1: openssl zlib libevent
2491 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2492 autoreconf && \
2493 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2494 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2495 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2496 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2497 --disable-asciidoc --disable-tool-name-check
2498 touch tor/stamp-h1
2500 tor: tor/stamp-h1
2501 $(MAKE) -C tor $(PARALLEL_BUILD)
2503 tor-install: tor
2504 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2505 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2507 tor-clean:
2508 -@$(MAKE) -C tor clean
2509 @rm -rf tor/stamp-h1 tor/Makefile
2511 udpxy/stamp-h1:
2512 cd udpxy \
2513 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2514 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2515 touch udpxy/stamp-h1
2517 udpxy-clean:
2518 -@$(MAKE) -C udpxy clean
2519 @rm -f udpxy/stamp-h1
2521 udpxy-install: udpxy/stamp-h1
2522 install -d $(INSTALLDIR)/udpxy/usr/bin
2523 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2524 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2526 mdadm:
2527 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2529 mdadm-install: mdadm
2530 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2531 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2533 mdadm-clean:
2534 -@$(MAKE) -C mdadm clean
2536 ipset:
2537 $(MAKE) -C ipset binaries
2539 ipset-install: ipset
2540 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2541 install -d $(INSTALLDIR)/ipset/usr/lib/
2542 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2543 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2544 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2546 ipset-clean:
2547 -@$(MAKE) -C ipset clean
2549 libjson-c/stamp-h1:
2550 cd $(TOP)/libjson-c && CC=$(CC) STRIP=$(CROSS_COMPILE)strip \
2551 ./autogen.sh && \
2552 $(CONFIGURE) --prefix=/usr
2553 touch libjson-c/stamp-h1
2555 libjson-c: libjson-c/stamp-h1
2556 $(MAKE) -C libjson-c $(PARALLEL_BUILD)
2558 libjson-c-clean:
2559 -@$(MAKE) -C libjson-c clean
2560 @rm -rf libjson-c/stamp-h1
2562 uqmi: libjson-c
2563 $(MAKE) -C uqmi/libubox
2564 $(MAKE) -C uqmi SHARED=0 CC='$(CC) -static'
2566 uqmi-install: uqmi
2567 install -D uqmi/uqmi $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2568 $(STRIP) $(INSTALLDIR)/uqmi/usr/sbin/uqmi
2570 uqmi-clean: libjson-c-clean
2571 -@$(MAKE) -C uqmi/libubox clean
2572 -@$(MAKE) -C uqmi clean
2574 comgt:
2575 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2577 comgt-install: comgt
2578 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2579 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2580 ln -sf comgt gcom
2581 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2582 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2583 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2585 comgt-clean:
2586 -@$(MAKE) -C comgt clean
2589 # Generic rules
2593 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2596 %-clean:
2597 @-[ ! -d $* ] || $(MAKE) -C $* clean
2599 %-distclean:
2600 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2602 %-install: %
2603 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2605 %-build:
2606 $(MAKE) $*-clean $*
2608 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2610 .PHONY: all clean distclean mrproper install package
2611 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2612 .PHONY: dummy libnet libpcap