fix some compilation issue
[tomato.git] / release / src / router / Makefile
blob3bfd96991d74266e9c4317a524e9bd9563f1b0cb
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
85 obj-$(TCONFIG_UPS) += apcupsd
87 ifeq ($(CONFIG_LINUX26),y)
88 obj-$(TCONFIG_USB) += sd-idle
89 else
90 obj-$(TCONFIG_USB) += scsi-idle
91 endif
93 obj-y += libusb10
94 #obj-y += libusb
95 obj-y += usbmodeswitch
96 obj-$(TCONFIG_FTP) += vsftpd
98 ifeq ($(CONFIG_LINUX26),y)
99 ifeq ($(TCONFIG_SAMBASRV),y)
100 NEED_EX_NLS = y
101 endif
102 ifeq ($(TCONFIG_USB_EXTRAS),y)
103 NEED_EX_USB = y
104 endif
105 endif
107 ifeq ($(TCONFIG_SAMBASRV),y)
108 ifeq ($(TCONFIG_SAMBA3),y)
109 NEED_SAMBA3 = y
110 else
111 NEED_SAMBA2 = y
112 endif
113 endif
115 ifeq ($(TCONFIG_IPV6),y)
116 export TCONFIG_IPV6 := y
117 else
118 TCONFIG_IPV6 :=
119 endif
121 ifeq ($(TCONFIG_IPSEC),y)
122 export TCONFIG_IPSEC := y
123 else
124 TCONFIG_IPSEC :=
125 endif
127 ifeq ($(TCONFIG_RAID),y)
128 export TCONFIG_RAID := y
129 else
130 TCONFIG_RAID :=
131 endif
133 obj-$(NEED_SAMBA2) += samba
134 obj-$(NEED_SAMBA3) += samba3
135 obj-$(TCONFIG_NTFS) += ntfs-3g
136 obj-$(TCONFIG_EBTABLES) += ebtables
137 #obj-$(TCONFIG_IPV6) += libdaemon
138 #obj-$(TCONFIG_IPV6) += radvd
139 obj-$(TCONFIG_IPV6) += dhcpv6
141 obj-$(TCONFIG_MEDIA_SERVER) += zlib
142 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
143 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
144 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
145 obj-$(TCONFIG_MEDIA_SERVER) += libogg
146 obj-$(TCONFIG_MEDIA_SERVER) += flac
147 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
148 obj-$(TCONFIG_MEDIA_SERVER) += libexif
149 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
150 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
151 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
152 MEDIA_SERVER_STATIC=y
153 #MEDIA_SERVER_STATIC :=
155 #obj-y += libnfnetlink
156 obj-y += miniupnpd
157 # obj-y += upnp
158 obj-$(CONFIG_LINUX26) += ipset
162 # configurable packages
164 obj-$(TCONFIG_L2TP) += xl2tpd
165 obj-$(TCONFIG_PPTP) += accel-pptp
166 obj-$(TCONFIG_PPTPD) += pptpd
167 obj-$(TCONFIG_HTTPS) += openssl
168 obj-$(TCONFIG_SSH) += dropbear
169 obj-$(TCONFIG_ZEBRA) += zebra
170 # obj-$(TCONFIG_IPP2P) += ipp2p
171 obj-$(TCONFIG_LZO) += lzo
172 obj-$(TCONFIG_OPENVPN) += openvpn
173 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
174 obj-$(TCONFIG_TINC) += tinc
175 obj-$(TCONFIG_EMF) += emf
176 obj-$(TCONFIG_EMF) += igs
178 # Tomato RAF
179 # additional modules for nginx
180 ifeq (obj-$(TCONFIG_NGINX),y)
181 ifndef ($(ADDITIONAL_MODULES))
182 ADDITIONAL_MODULES:=
183 else
184 ifeq ($(TCONFIG_IPV6),y)
185 ADDITIONAL_MODULES += --with-ipv6
186 endif
187 endif
188 endif
189 obj-$(TCONFIG_NGINX) += libncurses
190 obj-$(TCONFIG_NGINX) += mysql
191 obj-$(TCONFIG_NGINX) += openssl
192 obj-$(TCONFIG_NGINX) += spawn-fcgi
193 obj-$(TCONFIG_NGINX) += pcre
194 obj-$(TCONFIG_NGINX) += sqlite
195 obj-$(TCONFIG_NGINX) += libiconv
196 obj-$(TCONFIG_NGINX) += libxml2
197 obj-$(TCONFIG_NGINX) += libpng
198 obj-$(TCONFIG_NGINX) += jpeg
199 obj-$(TCONFIG_NGINX) += php
200 obj-$(TCONFIG_NGINX) += nginx
202 obj-$(TCONFIG_NANO) += libncurses
203 obj-$(TCONFIG_NANO) += nano
205 obj-$(TCONFIG_BBT) += openssl
206 obj-$(TCONFIG_BBT) += libevent
207 obj-$(TCONFIG_BBT) += libcurl
208 obj-$(TCONFIG_BBT) += transmission
209 obj-$(TCONFIG_BT) += btgui
210 obj-$(TCONFIG_BBT) += zlib
211 #obj-$(TCONFIG_BBT) += libiconv
213 obj-$(CONFIG_LINUX26) += hotplug2
214 obj-$(CONFIG_LINUX26) += udevtrigger
216 ifeq ($(TCONFIG_OPENVPN),y)
217 export FULL_OPENSSL := y
218 else
219 ifeq ($(TCONFIG_FTP_SSL),y)
220 export FULL_OPENSSL := y
221 else
222 ifeq ($(TCONFIG_BBT),y)
223 export FULL_OPENSSL := y
224 else
225 ifeq ($(TCONFIG_TOR),y)
226 export FULL_OPENSSL := y
227 else
228 ifeq ($(TCONFIG_TOR),y)
229 export FULL_OPENSSL := y
230 else
231 ifeq ($(TCONFIG_TINC),y)
232 export FULL_OPENSSL := y
233 else
234 FULL_OPENSSL :=
235 endif
236 endif
237 endif
238 endif
239 endif
240 endif
242 obj-y += wanuptime
244 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
245 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
250 # Basic rules
253 all: clean-build libc $(obj-y) kernel
256 kernel: $(LINUXDIR)/.config
257 @$(SEP)
259 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
260 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
262 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
263 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
265 ifeq ($(CONFIG_LINUX26),y)
266 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
267 endif
270 lzma-loader:
271 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
273 lzma-loader-install: lzma-loader
274 @$(SEP)
277 kmod: dummy
278 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
280 testfind:
281 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
282 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
284 install package: $(obj-install) $(LINUXDIR)/.config
285 @$(SEP)
287 install -d $(TARGETDIR)
290 # kernel modules
291 $(MAKE) -C $(LINUXDIR) modules_install \
292 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" \
293 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
295 ifneq ($(CONFIG_LINUX26),y)
296 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
297 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
298 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
299 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
300 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
301 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
302 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
304 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
305 endif
307 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
309 # nice and clean
310 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
311 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
312 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
313 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
314 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
315 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
317 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
318 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
319 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
321 ##!!TB
322 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
323 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
324 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
325 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
326 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
327 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
328 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
329 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
330 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
332 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
333 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
334 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
335 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
336 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
337 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
338 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
346 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
352 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
353 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
354 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
355 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
356 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
357 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
358 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
359 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
360 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
361 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
362 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
363 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
364 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
365 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
366 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
368 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
369 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
370 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
371 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
372 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
373 cd $(TARGETDIR)/lib/modules && rm -f */source || true
375 # misc
376 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
377 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
378 done
380 ifneq ($(TCONFIG_L7),y)
381 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
382 endif
384 # uClibc
385 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
386 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
387 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
388 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
389 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
390 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
391 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
392 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
393 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
394 ifeq ($(TCONFIG_SSH),y)
395 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
396 endif
397 ifeq ($(TCONFIG_BBT),y)
398 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
399 endif
400 ifeq ($(TCONFIG_NGINX),y)
401 install $(LIBDIR)/libstdc++.so.6 $(TARGETDIR)/lib/libstdc++.so.6
402 cd $(TARGETDIR)/lib && ln -sf libstdc++.so.6 libstdc++.so
403 $(STRIP) $(TARGETDIR)/lib/libstdc++.so.6
404 endif
405 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
406 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
407 $(STRIP) $(TARGETDIR)/lib/*.so.0
408 endif
410 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
412 @echo ---
414 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
415 @$(SRCBASE)/btools/libfoo.pl
416 else
417 @$(SRCBASE)/btools/libfoo.pl --noopt
418 endif
419 @chmod 0555 $(TARGETDIR)/lib/*.so*
420 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
422 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
423 # separated/copied extra stuff
424 @rm -rf $(PLATFORMDIR)/extras
425 @mkdir $(PLATFORMDIR)/extras
426 @mkdir $(PLATFORMDIR)/extras/ipsec
427 @mkdir $(PLATFORMDIR)/extras/raid
428 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
429 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
431 $(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
432 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
435 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
436 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
438 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
439 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
440 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
441 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
442 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
443 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
444 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
445 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
446 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
447 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
448 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
449 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
450 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
451 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
452 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
453 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
454 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
456 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
457 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
458 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*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/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
461 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
462 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
463 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
464 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
465 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
467 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
468 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
469 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
470 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
471 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
472 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
473 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
474 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
475 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
476 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
477 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
478 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
479 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
480 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
481 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
482 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
483 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
484 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
485 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
486 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
487 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
488 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
489 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
490 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
491 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
492 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
493 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
494 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
495 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
496 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
497 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
498 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
499 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
500 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
501 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
502 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
503 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
504 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
505 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
506 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
507 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
508 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
509 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
511 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
512 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
513 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
514 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
515 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
516 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
517 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
519 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
520 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
521 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
522 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
523 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
524 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
525 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
526 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
527 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
528 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
529 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
530 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
531 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
532 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
534 ifneq ($(TCONFIG_USB),y)
535 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
536 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
537 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
538 endif
540 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
541 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
542 ifneq ($(TCONFIG_USB_EXTRAS),y)
543 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
544 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
545 endif
546 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
547 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
548 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
549 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
550 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
551 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
552 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
554 @mkdir -p $(PLATFORMDIR)/extras/apps
555 @mkdir -p $(PLATFORMDIR)/extras/lib
557 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
558 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
559 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
561 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
562 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
563 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
564 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
565 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
566 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
567 ifneq ($(NEED_EX_USB),y)
568 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
569 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
570 endif
571 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
573 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
574 ifeq ($(TCONFIG_L7PAT),y)
575 @cd layer7 && ./squish.sh
576 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
577 endif
579 ifeq ($(TCONFIG_PPTPD),y)
580 @mkdir -p $(TARGETDIR)/rom/etc/vpn
581 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
582 chmod +x $(TARGETDIR)/rom/etc/vpn/*
583 endif
585 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
586 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
587 @echo ---
589 @rm -f $(TARGETDIR)/lib/modules/*/build
591 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
592 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
594 # Package kernel and filesystem
595 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
596 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
597 # $(MAKE) -C $(LINUXDIR) zImage ; \
598 # else \
599 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
600 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
601 # fi
603 # Pad self-booting Linux to a 64 KB boundary
604 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
605 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
606 # Append filesystem to self-booting Linux
607 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
610 libc: $(LIBDIR)/ld-uClibc.so.0
611 # $(MAKE) -C ../../../tools-src/uClibc all
612 # $(MAKE) -C ../../../tools-src/uClibc install
616 # cleaners
619 clean: clean-build $(obj-clean)
620 rm -rf layer7/squished
621 rm -f .ipv6-y .ipv6-n
622 rm -f .fullssl-y .fullssl-n
623 make -C config clean
625 clean-build: dummy
626 rm -rf $(TARGETDIR)
627 rm -rf $(INSTALLDIR)
628 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
629 rm -rf $(PLATFORMDIR)/extras
631 distclean: clean
632 ifneq ($(INSIDE_MAK),1)
633 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
634 endif
635 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
638 # configuration
641 CONFIG_IN := config/config.in
643 config/conf config/mconf:
644 @$(MAKE) -C config
646 rconf: config/conf
647 @config/conf $(CONFIG_IN)
649 rmconf: config/mconf
650 @config/mconf $(CONFIG_IN)
652 roldconf: config/conf
653 @config/conf -o $(CONFIG_IN)
654 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
656 kconf:
657 @$(MAKE) -C $(LINUXDIR) config
659 kmconf:
660 @$(MAKE) -C $(LINUXDIR) menuconfig
662 koldconf:
663 @$(MAKE) -C $(LINUXDIR) oldconfig
664 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
666 bboldconf:
667 @$(MAKE) -C busybox oldconfig
669 config conf: rconf kconf
671 menuconfig mconf: rmconf kmconf
673 .ipv6-y .ipv6-n:
674 @rm -f .ipv6-y .ipv6-n
675 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
676 @touch $@
678 .fullssl-y .fullssl-n:
679 @rm -f .fullssl-y .fullssl-n
680 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
681 @touch $@
683 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
685 oldconfig oldconf: koldconf roldconf dependconf bboldconf
689 # overrides and extra dependencies
692 busybox: dummy
693 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
695 busybox-install:
696 rm -rf $(INSTALLDIR)/busybox
697 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
699 busybox-clean:
700 -@$(MAKE) -C busybox distclean
702 busybox-config:
703 $(MAKE) -C busybox menuconfig
706 httpd: shared nvram mssl
707 @$(SEP)
708 @$(MAKE) -C httpd
710 www-install:
711 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
713 matrixssl:
714 @$(SEP)
715 @$(MAKE) -C matrixssl/src
717 matrixssl-install:
718 @true
720 matrixssl-clean:
721 -@$(MAKE) -C matrixssl/src clean
723 cyassl/stamp-h1:
724 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
725 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
726 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
727 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
728 PTHREAD_LIBS="-lpthread" \
729 $(CONFIGURE)
730 @touch cyassl/stamp-h1
732 cyassl: cyassl/stamp-h1
733 @$(SEP)
734 @$(MAKE) -C cyassl
736 cyassl-clean:
737 -@$(MAKE) -C cyassl clean
738 @rm -f cyassl/stamp-h1
740 cyassl-install:
741 @true
743 ifeq ($(FULL_OPENSSL),y)
744 OPENSSL_CIPHERS:=enable-rc5
745 else
746 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
747 endif
749 openssl/stamp-h1:
750 cd openssl && \
751 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
752 -ffunction-sections -fdata-sections -Wl,--gc-sections \
753 shared $(OPENSSL_CIPHERS) no-ssl2 no-ssl3 \
754 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
755 no-seed no-capieng no-gms no-gmp no-rfc3779 \
756 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake \
757 no-zlib no-engines no-sse2 no-libunbound no-ssl-trace \
758 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
760 @$(MAKE) -C openssl clean
761 @touch openssl/stamp-h1
763 openssl: openssl/stamp-h1
765 openssl-clean:
766 -@$(MAKE) -C openssl clean
767 @rm -f openssl/stamp-h1
769 openssl-install: openssl
770 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
771 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
772 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
774 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
775 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
776 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
778 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
780 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
781 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
783 ifeq ($(FULL_OPENSSL),y)
784 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
785 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
786 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
787 endif
789 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
791 mdu: shared mssl
793 rc: nvram shared
795 bridge/Makefile:
796 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
797 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
799 bridge: bridge/Makefile
800 @$(SEP)
801 @$(MAKE) -C bridge
803 bridge-clean:
804 -@$(MAKE) -C bridge clean
805 @rm -f bridge/Makefile
807 bridge-install:
808 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
809 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
811 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
812 @$(SEP)
813 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
814 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
815 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
816 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
817 -DNO_INOTIFY -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
818 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
819 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
821 dnsmasq-install:
822 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
823 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
825 nettle/stamp-h1: gmp
826 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
827 CPPFLAGS="-I$(TOP)/gmp" \
828 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
829 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
830 $(CONFIGURE) prefix=$(TOP)/nettle
831 @touch nettle/stamp-h1
833 nettle: nettle/stamp-h1
834 @$(SEP)
835 @$(MAKE) -C nettle
836 @$(MAKE) -C nettle install
838 nettle-clean:
839 -@$(MAKE) -C nettle clean
840 @rm -f nettle/stamp-h1
841 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
843 gmp/stamp-h1:
844 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
845 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
846 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
847 $(CONFIGURE)
848 @touch gmp/stamp-h1
850 gmp: gmp/stamp-h1
851 @$(SEP)
852 @$(MAKE) -C gmp
854 gmp-clean:
855 @$(MAKE) -C gmp clean
856 @rm -f gmp/stamp-h1
858 iptables:
859 ifeq ($(CONFIG_LINUX26),y)
860 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
861 else
862 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
863 endif
864 @$(SEP)
865 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
867 iptables-install:
868 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
869 cd $(INSTALLDIR)/iptables/usr/sbin && \
870 ln -sf iptables iptables-restore && \
871 ln -sf iptables iptables-save
873 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
874 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
876 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
878 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
879 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
880 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
882 ifeq ($(TCONFIG_IPV6),y)
883 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
884 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
885 cd $(INSTALLDIR)/iptables/usr/sbin && \
886 ln -sf ip6tables ip6tables-restore && \
887 ln -sf ip6tables ip6tables-save
888 endif
890 iptables-clean:
891 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
893 ppp:
894 @$(SEP)
895 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
896 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
898 ppp-%:
899 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
901 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
902 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
903 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
904 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
905 @touch rp-pppoe/src/stamp-h1
907 rp-pppoe: pppd rp-pppoe/src/stamp-h1
908 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
910 rp-pppoe-clean:
911 -@$(MAKE) -C rp-pppoe/src clean
912 @rm -f rp-pppoe/src/pppoe-relay
913 @rm -f rp-pppoe/src/stamp-h1
915 rp-pppoe-install: rp-pppoe
916 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
917 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
918 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
919 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
922 upnp: nvram shared iptables
924 libnfnetlink/stamp-h1:
925 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
926 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
927 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
928 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
929 touch libnfnetlink/stamp-h1
931 libnfnetlink: libnfnetlink/stamp-h1
932 @$(SEP)
933 $(MAKE) -C libnfnetlink
935 libnfnetlink-install:
936 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
937 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
938 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
939 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
940 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
942 miniupnpd-config:
943 #ifeq ($(TCONFIG_IPV6),y)
944 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
945 #else
946 @cd miniupnpd && ./genconfig.sh --leasefile --vendorcfg
947 #endif
949 miniupnpd: iptables miniupnpd-config
950 @$(SEP)
951 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
952 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
953 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
955 miniupnpd-clean:
956 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
957 @rm -f miniupnpd/config.h
959 miniupnpd-install:
960 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
961 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
963 # !!TB
964 shared: busybox
966 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
967 @$(SEP)
968 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
970 vsftpd-install: vsftpd
971 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
972 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
974 ntfs-3g/Makefile:
975 cd ntfs-3g && \
976 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
977 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
978 $(CONFIGURE) --enable-shared=no --enable-static=no \
979 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
980 --disable-ntfsprogs --disable-crypto --without-uuid \
981 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
983 ntfs-3g: ntfs-3g/Makefile
984 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
986 ntfs-3g-clean:
987 -@$(MAKE) -C ntfs-3g clean
988 @rm -f ntfs-3g/Makefile
990 ntfs-3g-install: ntfs-3g
991 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
992 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
993 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
994 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
995 ln -sf ../bin/ntfs-3g mount.ntfs
997 libusb10/Makefile: libusb10/Makefile.in
998 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
999 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
1001 libusb10: libusb10/Makefile
1002 $(MAKE) -C $@
1004 libusb10-install: libusb10
1005 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
1006 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1008 libusb10-clean:
1009 -@$(MAKE) -C $@ clean
1010 @rm -rf libusb10/Makefile
1012 libusb/Makefile: libusb/Makefile.in
1013 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1014 $(CONFIGURE) --prefix=/usr \
1015 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1016 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1017 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1019 libusb: libusb10 libusb/Makefile
1020 $(MAKE) -C $@
1022 libusb-install: libusb
1023 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1024 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1026 libusb-clean:
1027 -@$(MAKE) -C $@ clean
1028 @rm -rf libusb/Makefile
1030 usbmodeswitch: libusb10
1031 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1032 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1033 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1035 usbmodeswitchdb-install:
1036 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1037 # compress whitespace
1038 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1039 F=`basename $$D`; \
1040 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1041 done
1043 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1044 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1045 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1046 @mkdir -p $(TARGETDIR)/rom/etc
1047 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1049 #libdaemon: libdaemon/Makefile
1050 #$(MAKE) -C $@
1052 #libdaemon/Makefile: libdaemon/Makefile.in
1053 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1054 # --disable-dependency-tracking
1056 #libdaemon-install: libdaemon
1057 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1058 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1059 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1060 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1061 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1063 #libdaemon-clean:
1064 # -@$(MAKE) -C libdaemon distclean
1066 #radvd/stamp-h1:
1067 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1068 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1069 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1070 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1071 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1072 # @$(MAKE) -C radvd clean
1073 # @touch radvd/stamp-h1
1075 #radvd: libdaemon radvd/stamp-h1
1077 #radvd-clean:
1078 # -@$(MAKE) -C radvd distclean
1079 # @rm -f radvd/stamp-h1
1081 #radvd-install: radvd
1082 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1083 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1085 dhcpv6/stamp-h1:
1086 @cd dhcpv6 && \
1087 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1088 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1089 ac_cv_func_setpgrp_void=yes \
1090 $(CONFIGURE) --prefix= --with-localdbdir=/var
1091 @$(MAKE) -C dhcpv6 clean
1092 @touch dhcpv6/stamp-h1
1094 dhcpv6: dhcpv6/stamp-h1
1095 @$(SEP)
1096 @$(MAKE) -C dhcpv6 dhcp6c
1098 dhcpv6-install: dhcpv6
1099 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1100 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1102 dhcpv6-clean:
1103 -@$(MAKE) -C dhcpv6 clean
1104 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1107 p910nd:
1108 samba:
1109 samba3:
1111 nvram: shared
1113 prebuilt: shared
1115 vlan:
1116 @$(SEP)
1117 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1119 vlan-install:
1120 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1121 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1124 pptp-client-install:
1125 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1126 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1129 accel-pptp: pppd accel-pptp/Makefile
1130 @$(MAKE) -C accel-pptp
1132 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1133 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1134 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1136 accel-pptp-clean:
1137 -@$(MAKE) -C accel-pptp clean
1138 @rm -f accel-pptp/Makefile
1140 accel-pptp-install: accel-pptp
1141 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1142 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1144 pptpd/stamp-h1:
1145 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1146 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1147 touch pptpd/stamp-h1
1149 pptpd: pptpd/stamp-h1
1151 pptpd-install: pptpd
1152 @echo pptpd
1153 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1154 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1155 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1156 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1157 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1158 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1160 pptpd-clean:
1161 -@$(MAKE) -C pptpd clean
1162 rm -rf pptpd/stamp-h1 pptpd/.deps
1164 pppd/Makefile: pppd/linux/Makefile.top
1165 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1167 pppd: pppd/Makefile
1168 @$(SEP)
1169 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1171 pppd-clean:
1172 -@$(MAKE) -C pppd clean
1173 @rm -f pppd/Makefile
1175 pppd-install: pppd
1176 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1177 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1178 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1179 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1180 ifeq ($(TCONFIG_L2TP),y)
1181 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1182 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1183 endif
1185 # ipupdate-install:
1186 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1187 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1189 zebra/stamp-h1:
1190 @cd zebra && rm -f config.cache && \
1191 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1192 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1193 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1194 $(CONFIGURE) --sysconfdir=/etc \
1195 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1196 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1197 @touch zebra/stamp-h1
1199 zebra: zebra/stamp-h1
1200 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1202 zebra-clean:
1203 -@$(MAKE) -C zebra clean
1204 @rm -f zebra/stamp-h1
1206 zebra-install: zebra
1207 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1208 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1209 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1210 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1211 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1212 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1215 rp-l2tp-install:
1216 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1217 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1218 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1219 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1220 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1221 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1222 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1224 xl2tpd: pppd
1225 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1227 xl2tpd-install: xl2tpd
1228 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1229 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1232 bpalogin-install:
1233 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1234 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1237 # libnet:
1238 # @$(SEP)
1239 # @-mkdir -p libnet/lib
1240 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1242 # libpcap:
1243 # @$(SEP)
1244 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1246 libbcm:
1247 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1249 libbcm-install:
1250 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1251 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1254 iproute2:
1255 @$(SEP)
1256 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1258 iproute2-install: iproute2
1259 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1260 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1261 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1262 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1265 ntpc: nvram shared
1268 dropbear: dropbear/config.h
1269 @$(SEP)
1270 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1272 dropbear-install:
1273 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1274 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1275 cd $(INSTALLDIR)/dropbear/usr/bin && \
1276 ln -sf dropbearmulti dropbear && \
1277 ln -sf dropbearmulti dropbearconvert && \
1278 ln -sf dropbearmulti dropbearkey && \
1279 ln -sf dropbearmulti dbclient && \
1280 ln -sf dropbearmulti ssh && \
1281 ln -sf dropbearmulti scp
1283 dropbear-clean:
1284 -@$(MAKE) -C dropbear clean
1285 @rm -f dropbear/config.h
1287 dropbear/config.h:
1288 cd dropbear && \
1289 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1290 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1291 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1292 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1293 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1294 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1295 @$(MAKE) -C dropbear clean
1297 # Media libraries
1299 sqlite/stamp-h1:
1300 cd sqlite && \
1301 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1302 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1303 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1304 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1305 touch sqlite/stamp-h1
1307 sqlite: sqlite/stamp-h1
1308 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1310 sqlite-clean:
1311 -@$(MAKE) -C sqlite clean
1312 @rm -f sqlite/stamp-h1
1314 sqlite-install: sqlite
1315 @$(SEP)
1316 ifeq ($(TCONFIG_NGINX),y)
1317 install -D sqlite/.libs/libsqlite3.so.0.8.6 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1318 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1319 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1320 ln -sf libsqlite3.so.0.8.6 libsqlite3.so.0 && \
1321 ln -sf libsqlite3.so.0.8.6 libsqlite3.so
1322 endif
1324 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1326 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1327 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1329 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1330 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1332 FFMPEG_PROTOCOLS:=file
1333 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1335 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
1336 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1338 ffmpeg/stamp-h1: zlib
1339 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1340 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1341 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1342 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1343 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1344 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1345 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1346 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1347 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1348 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1349 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1350 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1351 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1352 --extra-libs="-L$(TOP)/zlib -lz" \
1353 --enable-zlib --disable-debug --prefix=''
1354 touch ffmpeg/stamp-h1
1356 ffmpeg: ffmpeg/stamp-h1 zlib
1357 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1359 ffmpeg-clean:
1360 -@$(MAKE) -C ffmpeg clean
1361 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1363 ffmpeg-install: ffmpeg
1364 @$(SEP)
1365 ifneq ($(MEDIA_SERVER_STATIC),y)
1366 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1367 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1368 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1369 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1370 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1371 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1372 endif
1374 libogg/stamp-h1:
1375 cd libogg && \
1376 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1377 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1378 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1379 touch libogg/stamp-h1
1381 libogg: libogg/stamp-h1
1382 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1384 libogg-clean:
1385 -@$(MAKE) -C libogg clean
1386 @rm -f libogg/stamp-h1
1388 libogg-install: libogg
1389 @$(SEP)
1390 ifneq ($(MEDIA_SERVER_STATIC),y)
1391 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1392 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1393 endif
1395 flac/stamp-h1: libogg
1396 cd flac && \
1397 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1398 CPPFLAGS="-I$(TOP)/libogg/include" \
1399 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1400 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1401 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1402 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1403 touch flac/stamp-h1
1405 flac: flac/stamp-h1 libogg
1406 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1408 flac-clean:
1409 -@$(MAKE) -C flac clean
1410 @rm -f flac/stamp-h1
1412 flac-install: flac
1413 @$(SEP)
1414 ifneq ($(MEDIA_SERVER_STATIC),y)
1415 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1416 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1417 endif
1419 jpeg/stamp-h1:
1420 cd jpeg && \
1421 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1422 touch jpeg/stamp-h1
1424 jpeg: jpeg/stamp-h1
1425 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1426 install -d $(TOP)/jpeg/staged/include
1427 install -d $(TOP)/jpeg/staged/lib
1428 install -d $(TOP)/jpeg/staged/bin
1429 install -d $(TOP)/jpeg/staged/man/man1
1430 @$(MAKE) -C jpeg LIBTOOL="" prefix=$(TOP)/jpeg/staged install
1431 install -D jpeg/libjpeg.so $(TOP)/jpeg/staged/lib/libjpeg.so
1432 rm -f $(TOP)/jpeg/staged/lib/libjpeg.la
1434 jpeg-clean:
1435 -@$(MAKE) -C jpeg clean
1436 @rm -f jpeg/stamp-h1 jpeg/Makefile
1437 @rm -rf jpeg/staged
1439 jpeg-install: jpeg
1440 @$(SEP)
1441 ifneq ($(MEDIA_SERVER_STATIC),y)
1442 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1443 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1444 endif
1445 ifeq ($(TCONFIG_NGINX),y)
1446 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1447 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1448 endif
1450 libexif/stamp-h1:
1451 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1452 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1453 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1454 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1455 touch libexif/stamp-h1
1457 libexif: libexif/stamp-h1
1458 @$(MAKE) -C libexif all
1460 libexif-clean:
1461 -@$(MAKE) -C libexif clean
1462 @rm -f libexif/stamp-h1
1464 libexif-install: libexif
1465 @$(SEP)
1466 ifneq ($(MEDIA_SERVER_STATIC),y)
1467 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1468 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1469 endif
1471 zlib/stamp-h1:
1472 cd zlib && \
1473 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC" LDSHAREDLIBC="$(EXTRALDFLAGS)" \
1474 ./configure --shared --prefix=/usr --libdir=/usr/lib
1475 touch zlib/stamp-h1
1477 zlib: zlib/stamp-h1
1478 @$(MAKE) -C zlib all
1479 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1481 zlib-clean:
1482 -@$(MAKE) -C zlib clean
1483 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1484 @rm -rf zlib/staged
1486 zlib-install: zlib
1487 @$(SEP)
1488 ifneq ($(MEDIA_SERVER_STATIC),y)
1489 install -d $(INSTALLDIR)/zlib/usr/lib
1490 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1491 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1492 endif
1493 ifeq ($(TCONFIG_BT),y)
1494 install -d $(INSTALLDIR)/zlib/usr/lib
1495 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1496 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1497 endif
1498 ifeq ($(TCONFIG_TOR),y)
1499 install -d $(INSTALLDIR)/zlib/usr/lib
1500 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1501 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1502 endif
1503 ifeq ($(TCONFIG_NGINX),y)
1504 install -d $(INSTALLDIR)/zlib/usr/lib
1505 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1506 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1507 endif
1509 libid3tag/stamp-h1: zlib
1510 cd libid3tag && \
1511 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1512 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1513 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1514 --disable-debugging --disable-profiling
1515 touch libid3tag/stamp-h1
1517 libid3tag: libid3tag/stamp-h1 zlib
1518 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1520 libid3tag-clean:
1521 -@$(MAKE) -C libid3tag clean
1522 @rm -f libid3tag/stamp-h1
1524 libid3tag-install: libid3tag
1525 @$(SEP)
1526 ifneq ($(MEDIA_SERVER_STATIC),y)
1527 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1528 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1529 endif
1531 libvorbis/stamp-h1: libogg
1532 cd libvorbis && \
1533 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1534 CPPFLAGS="-I$(TOP)/libogg/include" \
1535 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1536 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1537 --with-ogg-includes="$(TOP)/libogg/include" \
1538 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1539 touch libvorbis/stamp-h1
1541 libvorbis: libvorbis/stamp-h1
1542 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1544 libvorbis-clean:
1545 -@$(MAKE) -C libvorbis clean
1546 @rm -f libvorbis/stamp-h1
1548 libvorbis-install: libvorbis
1549 @$(SEP)
1550 ifneq ($(MEDIA_SERVER_STATIC),y)
1551 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1552 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1553 endif
1555 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1556 @$(SEP)
1557 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1559 minidlna-clean:
1560 -@$(MAKE) -C minidlna clean
1561 @rm -f minidlna/stamp-h1
1563 minidlna-install: minidlan
1564 @$(SEP)
1565 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1566 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1568 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1569 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1570 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1571 $(CONFIGURE) --prefix=/usr
1573 igmpproxy: igmpproxy/src/Makefile
1574 @$(SEP)
1575 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1577 igmpproxy-install: igmpproxy
1578 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1579 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1581 igmpproxy-clean:
1582 -@$(MAKE) -C igmpproxy/src clean
1583 @rm -f igmpproxy/src/Makefile
1585 udev:
1586 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1587 PROGRAMS=udevtrigger
1589 udev-install: udev
1590 install -d $(INSTALLDIR)
1591 install -d $(TARGETDIR)
1592 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1594 hotplug2:
1595 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1597 hotplug2-install: hotplug2
1598 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1599 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1601 emf:
1602 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1604 emf-install: emf
1605 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1607 igs:
1608 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1610 igs-install: igs
1611 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1613 wanuptime: nvram shared
1614 @$(SEP)
1615 @$(MAKE) -C wanuptime
1617 wanuptime-clean:
1618 -@$(MAKE) -C wanuptime clean
1620 wanuptime-install:
1621 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1622 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1624 ebtables: dummy
1625 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1626 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1627 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1629 ebtables-install: ebtables
1630 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1632 @mkdir -p $(TARGETDIR)/rom/etc
1633 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1634 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1636 install -d $(INSTALLDIR)/ebtables/usr/lib
1637 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1638 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1639 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1641 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1642 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1643 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1645 ebtables-clean:
1646 -@$(MAKE) -C ebtables clean
1648 #Roadkill
1649 spawn-fcgi/stamp-h1:
1650 cd spawn-fcgi && CC=$(CC) \
1651 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1652 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1653 ac_cv_func_malloc_0_nonnull=yes \
1654 $(CONFIGURE) --prefix=/usr
1655 touch spawn-fcgi/stamp-h1
1657 spawn-fcgi: spawn-fcgi/stamp-h1
1658 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1660 spawn-fcgi-clean:
1661 -@$(MAKE) -C spawn-fcgi clean
1662 rm -f spawn-fcgi/stamp-h1
1664 spawn-fcgi-install: spawn-fcgi
1665 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1666 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1667 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1669 #Roadkill
1670 glib/stamp-h1:
1671 @$(SEP)
1672 @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 \
1673 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 \
1674 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 \
1675 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 \
1676 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
1677 @$(MAKE) -C glib
1678 touch glib/stamp-h1
1680 glib: glib/stamp-h1
1681 @$(MAKE) -C glib $(PARALLEL_BUILD)
1683 glib-clean:
1684 -@$(MAKE) -C glib clean
1685 rm -f glib/stamp-h1
1687 glib-install: glib
1688 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1690 nocat/stamp-h1: glib-install
1691 @$(SEP)
1692 @cd nocat && \
1693 NC_CONF_PATH="/" \
1694 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1695 @$(MAKE) -C nocat
1697 echo *** integrate glib to nocat installdir
1698 install -d $(INSTALLDIR)/nocat/usr/lib
1699 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1700 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1701 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1702 touch nocat/stamp-h1
1704 nocat: nocat/stamp-h1
1705 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1707 nocat-clean:
1708 -@$(MAKE) -C nocat clean
1709 rm -f nocat/stamp-h1
1711 nocat-install:
1712 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1713 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1714 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1715 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1717 #Tomato RAF
1718 pcre/stamp-h1:
1719 $(SEP)
1720 cd pcre && autoreconf && \
1721 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1722 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1723 @touch pcre/stamp-h1
1724 [ -d pcre/m4 ] || mkdir pcre/m4
1726 pcre: pcre/stamp-h1
1728 pcre-install: pcre
1729 @$(SEP)
1730 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1731 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1732 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1733 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1734 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1735 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1736 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1738 pcre-clean:
1739 ( if [ -f pcre/Makefile ]; then \
1740 $(MAKE) -C pcre clean; \
1741 rm -rf pcre/stamp-h1; \
1742 fi )
1744 libxml2/stamp-h1:
1745 cd libxml2 && \
1746 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1747 $(CONFIGURE) --prefix=/usr --without-python --enable-static --enable-shared
1748 touch $@
1750 libxml2: libxml2/stamp-h1
1751 @$(MAKE) -C libxml2 all $(PARALLEL_BUILD)
1752 @$(MAKE) -C libxml2 DESTDIR=$(TOP)/libxml2/staged install
1754 libxml2-install: libxml2
1755 @$(SEP)
1756 install -D libxml2/.libs/libxml2.so.2.9.1 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1757 $(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1758 cd $(INSTALLDIR)/libxml2/usr/lib && \
1759 ln -sf libxml2.so.2.9.1 libxml2.so.2 && \
1760 ln -sf libxml2.so.2.9.1 libxml2.so
1762 libxml2-clean:
1763 -@$(MAKE) -C libxml2 clean
1764 @rm -f libxml2/stamp-h1
1765 @rm -rf libxml2/staged
1767 libpng/stamp-h1: zlib
1768 cd libpng && \
1769 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" LDFLAGS="-L$(TOP)/zlib" \
1770 $(CONFIGURE) --prefix=/usr --enable-static --enable-shared
1771 touch $@
1773 libpng: libpng/stamp-h1
1774 @$(MAKE) -C libpng all $(PARALLEL_BUILD)
1775 @$(MAKE) -C libpng DESTDIR=$(TOP)/libpng/staged install
1777 libpng-install: libpng
1778 @$(SEP)
1779 install -D libpng/.libs/libpng.so.3.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1780 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1781 cd $(INSTALLDIR)/libpng/usr/lib && \
1782 ln -sf libpng.so.3.51.0 libpng.so && \
1783 ln -sf libpng.so.3.51.0 libpng.so.3
1784 install -D libpng/.libs/libpng12.so.0.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1785 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1786 cd $(INSTALLDIR)/libpng/usr/lib && \
1787 ln -sf libpng12.so.0.51.0 libpng12.so && \
1788 ln -sf libpng12.so.0.51.0 libpng12.so.0
1790 libpng-clean:
1791 -@$(MAKE) -C libpng clean
1792 @rm -f libpng/stamp-h1
1793 @rm -rf libpng/staged
1795 php/stamp-h1: pcre zlib libiconv sqlite libxml2 libpng jpeg libcurl
1796 @$(SEP)
1797 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1798 CFLAGS="-Os -Wall -I$(TOP)/zlib -I$(TOP)/libxml2/include/libxml -I$(TOP)/libxml2/include -I$(TOP)/pcre -I$(TOP)/libiconv/include \
1799 -I$(TOP)/libpng/staged/usr/include -I$(TOP)/libcurl/staged/include" \
1800 LDFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs \
1801 -L$(TOP)/libpng/.libs -L$(TOP)/libcurl/staged/lib" \
1802 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" \
1803 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 \
1804 -lsqlite3 -ldl -lpthread -liconv -lxml2 -lstdc++ -lcurl" \
1805 PHP_FCGI_LIBXML_DIR="$(TOP)/libxml2/staged/usr" \
1806 ac_cv_func_memcmp_working=yes \
1807 cv_php_mbstring_stdarg=yes \
1808 $(CONFIGURE) --prefix=/usr \
1809 --enable-shared \
1810 --disable-static \
1811 --disable-rpath \
1812 --disable-debug \
1813 --without-pear \
1814 --with-config-file-path=/etc \
1815 --with-config-file-scan-dir=/etc/php5 \
1816 --disable-short-tags \
1817 --with-zlib \
1818 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1819 --disable-phar \
1820 --enable-cli \
1821 --enable-cgi \
1822 --disable-calendar \
1823 --enable-ctype \
1824 --with-curl="$(TOP)/libcurl/staged" \
1825 --enable-fileinfo \
1826 --without-gettext \
1827 --enable-dom \
1828 --enable-exif \
1829 --disable-ftp \
1830 --without-gmp \
1831 --with-gd \
1832 --with-png-dir="$(TOP)/libpng/staged/usr" \
1833 --with-jpeg-dir="$(TOP)/jpeg/staged" \
1834 --enable-hash \
1835 --with-iconv="$(TOP)/libiconv/staged/usr" \
1836 --with-iconv-dir="$(TOP)/libiconv/staged/usr" \
1837 --enable-json \
1838 --without-ldap \
1839 --enable-mbstring \
1840 --without-mcrypt \
1841 --without-openssl \
1842 --disable-pcntl \
1843 --without-mysqli \
1844 --with-mysql \
1845 --with-mysql-sock="/var/run/mysqld.sock" \
1846 --with-pdo-mysql \
1847 --without-pdo-pgsql \
1848 --with-pdo-sqlite \
1849 --enable-pdo \
1850 --without-pgsql \
1851 --enable-session \
1852 --disable-shmop \
1853 --enable-simplexml \
1854 --disable-soap \
1855 --disable-sockets \
1856 --with-sqlite3 \
1857 --disable-sysvmsg \
1858 --disable-sysvsem \
1859 --disable-sysvshm \
1860 --disable-tokenizer \
1861 --enable-xml \
1862 --enable-xmlreader \
1863 --enable-xmlwriter \
1864 --enable-zip \
1865 --disable-filter \
1866 --with-libxml-dir="$(TOP)/libxml2/staged/usr"
1867 @touch php/stamp-h1
1869 php: php/stamp-h1
1870 @$(SEP)
1871 @$(MAKE) -C php
1873 php-clean:
1874 -@$(MAKE) -C php clean
1875 -@rm php/stamp-h1
1877 php-install: php
1878 @$(SEP)
1879 install -d $(INSTALLDIR)/php/usr/sbin
1880 install -D php/sapi/cli/.libs/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1881 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1882 install -D php/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1883 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1884 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1886 nginx/stamp-h1: openssl zlib pcre
1887 @$(SEP)
1888 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1889 --prefix=/usr \
1890 --sbin-path=/usr/sbin \
1891 --conf-path=/etc/nginx/nginx.conf \
1892 --error-log-path=/tmp/var/log/nginx/error.log \
1893 --http-log-path=/tmp/var/log/nginx/access.log \
1894 --pid-path=/tmp/var/run/nginx.pid \
1895 --lock-path=/tmp/var/run/nginx.lock.accept \
1896 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1897 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1898 --with-http_flv_module \
1899 --with-http_ssl_module \
1900 --with-http_gzip_static_module \
1901 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1902 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1903 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1904 --with-cc="$(CC)" \
1905 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1906 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1907 $(ADDITIONAL_MODULES)
1909 nginx: nginx/stamp-h1
1910 @$(SEP)
1911 @$(MAKE) -C nginx
1913 nginx-clean:
1914 -@$(MAKE) -C nginx clean
1915 -@rm -f nginx/stamp-h1
1917 nginx-install: nginx
1918 install -d $(INSTALLDIR)/nginx/usr/sbin
1919 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1920 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1922 libncurses/stamp-h1:
1923 cd libncurses && CC=$(CC) \
1924 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC" \
1925 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1926 LIBS="-lstdc++" \
1927 $(CONFIGURE) --prefix=/usr --with-shared --with-normal --disable-debug --without-ada --without-manpages --without-progs --without-tests
1928 touch libncurses/stamp-h1
1930 libncurses: libncurses/stamp-h1
1931 @$(SEP)
1932 $(MAKE) -C libncurses $(PARALLEL_BUILD)
1933 $(MAKE) -C libncurses DESTDIR=$(TOP)/libncurses/staged install
1935 libncurses-clean:
1936 -@$(MAKE) -C libncurses clean
1937 @rm -f libncurses/stamp-h1 libncurses/Makefile
1938 @rm -rf libncurses/staged
1940 libncurses-install: libncurses
1941 install -d $(INSTALLDIR)/libncurses/usr/lib
1942 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo
1943 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1944 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1945 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1946 install -D -m 0644 libncurses/staged/usr/share/terminfo/l/linux $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1947 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt100 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1948 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt220 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1949 install -D -m 0644 libncurses/staged/usr/share/terminfo/x/xterm $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1950 cd $(INSTALLDIR)/libncurses/usr/lib && ln -sf ../share/terminfo terminfo
1951 install libncurses/lib/libncurses.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1952 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1953 install libncurses/lib/libpanel.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1954 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1955 install libncurses/lib/libform.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1956 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1957 install libncurses/lib/libmenu.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1958 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1959 cd $(INSTALLDIR)/libncurses/usr/lib/ && \
1960 ln -sf libncurses.so.5 libncurses.so && \
1961 ln -sf libpanel.so.5 libpanel.so && \
1962 ln -sf libform.so.5 libform.so && \
1963 ln -sf libmenu.so.5 libmenu.so
1965 mysql/stamp-h1: openssl zlib libncurses
1966 @$(SEP)
1967 cd mysql && cp -f configure.mipsel configure && \
1968 CFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1969 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1970 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1971 CPPFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1972 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1973 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1974 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/zlib/staged/usr/lib -L$(TOP)/libncurses/lib -fPIC -EL" \
1975 LIBS="-lcrypt -lz -lstdc++ -lssl -lcrypto -lncurses" \
1976 $(CONFIGURE) --prefix=/usr \
1977 --without-debug --without-docs --without-man --with-charset=utf8 --with-extra-charsets=ascii,latin1,gb2312,gbk \
1978 --enable-shared --disable-static \
1979 --without-mysqlmanager \
1980 --with-pthread \
1981 --with-ssl \
1982 --without-docs \
1983 --with-geometry \
1984 --with-low-memory \
1985 --enable-assembler \
1986 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1987 ac_cv_c_stack_direction=-1
1988 cd mysql && tar xvfz .host.tgz
1989 # Update time of config.status to avoid run 'config.status --recheck'
1990 touch mysql/config.status
1991 # Update time of Makefile to avoid regenerate it when do make
1992 sleep 5
1993 -find mysql -name Makefile -print | xargs -i touch {}
1994 touch mysql/stamp-h1
1996 mysql: mysql/stamp-h1
1997 @$(SEP)
1998 @$(MAKE) -C mysql
1999 @$(MAKE) -C mysql DESTDIR=$(TOP)/mysql/staged install
2001 mysql-clean:
2002 -@$(MAKE) -C mysql clean
2003 -@rm -f mysql/stamp-h1
2004 -@rm -rf mysql/staged mysql/host
2006 mysql-install:
2007 install -d $(INSTALLDIR)/mysql/usr/bin
2008 install -d $(INSTALLDIR)/mysql/usr/lib
2009 install -d $(INSTALLDIR)/mysql/usr/libexec
2010 install -d $(INSTALLDIR)/mysql/usr/lib/mysql
2011 install -d $(INSTALLDIR)/mysql/usr/lib/mysql/plugin
2012 install -d $(INSTALLDIR)/mysql/usr/share
2013 install -d $(INSTALLDIR)/mysql/usr/share/mysql
2014 install -D -m 755 mysql/mycheck $(INSTALLDIR)/mysql/usr/bin
2015 install -D -m 755 mysql/staged/usr/bin/my_print_defaults $(INSTALLDIR)/mysql/usr/bin
2016 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/my_print_defaults
2017 install -D -m 755 mysql/staged/usr/bin/myisamchk $(INSTALLDIR)/mysql/usr/bin
2018 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/myisamchk
2019 install -D -m 755 mysql/staged/usr/bin/mysql $(INSTALLDIR)/mysql/usr/bin
2020 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysql
2021 install -D -m 755 mysql/staged/usr/bin/mysql_install_db $(INSTALLDIR)/mysql/usr/bin
2022 install -D -m 755 mysql/staged/usr/bin/mysqladmin $(INSTALLDIR)/mysql/usr/bin
2023 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqladmin
2024 install -D -m 755 mysql/staged/usr/bin/mysqldump $(INSTALLDIR)/mysql/usr/bin
2025 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqldump
2026 install -D -m 755 mysql/staged/usr/libexec/mysqld $(INSTALLDIR)/mysql/usr/libexec
2027 $(STRIP) $(INSTALLDIR)/mysql/usr/libexec/mysqld
2028 cd $(INSTALLDIR)/mysql/usr/bin && ln -sf ../libexec/mysqld mysqld
2029 # install -D -m 755 mysql/staged/usr/bin/mysqld_safe $(INSTALLDIR)/mysql/usr/bin
2030 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2031 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient.so.16.0.0
2032 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2033 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so.16 && \
2034 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so
2035 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient_r.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2036 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient_r.so.16.0.0
2037 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2038 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so.16 && \
2039 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
2040 # -@cd $(INSTALLDIR)/mysql/usr/lib/mysql/plugin && cp -arfpu $(TOP)/mysql/staged/usr/lib/mysql/plugin/* . && \
2041 # rm -f *.la *.a && \
2042 # $(STRIP) *.so.*
2043 -@cd $(INSTALLDIR)/mysql/usr/share/mysql && \
2044 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/english . && \
2045 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/fill_help_tables.sql . && \
2046 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables.sql . && \
2047 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables_data.sql .
2049 lzo/stamp-h1:
2050 cd lzo && \
2051 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
2052 touch lzo/stamp-h1
2054 lzo: lzo/stamp-h1
2055 @$(MAKE) -C lzo $(PARALLEL_BUILD)
2057 lzo-clean:
2058 -@$(MAKE) -C lzo clean
2059 @rm -f lzo/stamp-h1
2061 lzo-install: lzo
2062 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2063 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2064 cd $(INSTALLDIR)/lzo/usr/lib && \
2065 ln -sf liblzo2.so.2.0.0 liblzo2.so.2 && \
2066 ln -sf liblzo2.so.2.0.0 liblzo2.so
2068 openvpn/.conf: openssl lzo
2069 cd openvpn && \
2070 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2071 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
2072 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
2073 $(CONFIGURE) --prefix= \
2074 --with-crypto-library=openssl \
2075 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --disable-small \
2076 --disable-selinux --disable-socks --enable-password-save \
2077 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
2078 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
2079 ac_cv_lib_resolv_gethostbyname=no
2080 touch openvpn/.conf
2082 openvpn: openvpn/.conf
2083 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
2085 openvpn-clean:
2086 -@$(MAKE) -C openvpn clean
2087 @rm -f openvpn/.conf
2089 openvpn-install: openvpn
2090 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2091 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2092 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2094 openvpn_plugin_auth_nvram:nvram
2096 #shibby
2097 nano/stamp-h1: libncurses
2098 cd nano && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2099 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2100 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2101 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libncurses/staged/usr/lib -fPIC" \
2102 ac_cv_lib_ncursesw_get_wch=no \
2103 $(CONFIGURE) --prefix=/usr --disable-nls --enable-all --without-libiconv-prefix --disable-utf8
2104 touch nano/stamp-h1
2106 nano: nano/stamp-h1
2107 @$(MAKE) -C nano $(PARALLEL_BUILD)
2109 nano-clean:
2110 -@$(MAKE) -C nano clean
2111 @rm -f nano/stamp-h1 nano/Makefile nano/src/Makefile
2113 nano-install: nano
2114 install -d $(INSTALLDIR)/nano/usr/sbin
2115 install -D nano/src/nano $(INSTALLDIR)/nano/usr/sbin/nano
2116 $(STRIP) -s $(INSTALLDIR)/nano/usr/sbin/nano
2118 libcurl/stamp-h1: zlib openssl
2119 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2120 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
2121 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2122 $(CONFIGURE) --prefix=$(TOP)/libcurl/staged --disable-thread --enable-shared --enable-static \
2123 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
2124 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
2125 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
2126 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
2127 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
2128 --without-gnutls --without-krb4 --without-libidn \
2129 --with-linux-headers=$(LINUXDIR)/include \
2130 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2131 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
2132 touch libcurl/stamp-h1
2134 libcurl: libcurl/stamp-h1
2135 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
2136 @$(MAKE) -C libcurl install
2138 libcurl-clean:
2139 -@$(MAKE) -C libcurl clean
2140 @rm -f libcurl/stamp-h1 libcurl/Makefile
2141 @rm -rf libcurl/staged
2143 libcurl-install: libcurl
2144 install -d $(INSTALLDIR)/libcurl/usr/sbin
2145 install -D libcurl/src/.libs/curl $(INSTALLDIR)/libcurl/usr/sbin/curl
2146 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/sbin/curl
2147 install -d $(INSTALLDIR)/libcurl/usr/lib
2148 install -D libcurl/lib/.libs/libcurl.so.4.3.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2149 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2150 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
2151 ln -sf libcurl.so.4.3.0 libcurl.so.4 && \
2152 ln -sf libcurl.so.4.3.0 libcurl.so
2154 libevent/stamp-h1:
2155 cd libevent && CC=$(CC) \
2156 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2157 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2158 $(CONFIGURE)
2159 touch libevent/stamp-h1
2161 libevent: libevent/stamp-h1
2162 @$(SEP)
2163 $(MAKE) -C libevent $(PARALLEL_BUILD)
2164 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
2166 libevent-clean:
2167 -@$(MAKE) -C libevent clean
2168 @rm -f libevent/stamp-h1 libevent/Makefile
2169 @rm -rf libevent/staged
2171 libevent-install: libevent
2172 install -d $(INSTALLDIR)/libevent/usr/lib
2173 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2174 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2176 libiconv/stamp-h1:
2177 cd libiconv && CC=$(CC) \
2178 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2179 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2180 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
2181 touch libiconv/stamp-h1
2183 libiconv: libiconv/stamp-h1
2184 @$(SEP)
2185 $(MAKE) -C libiconv $(PARALLEL_BUILD)
2186 $(MAKE) -C libiconv DESTDIR=$(TOP)/libiconv/staged install
2188 libiconv-clean:
2189 -@$(MAKE) -C libiconv clean
2190 @rm -rf libiconv/stamp-h1 libiconv/Makefile
2191 @rm -rf libiconv/staged
2193 libiconv-install: libiconv
2194 install -d $(INSTALLDIR)/libiconv/usr/lib
2195 install libiconv/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2196 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2197 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
2198 ln -sf libiconv.so.2.5.1 libiconv.so.2 && \
2199 ln -sf libiconv.so.2.5.1 libiconv.so
2201 transmission/stamp-h1: openssl libcurl libevent zlib
2202 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2203 autoreconf && \
2204 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2205 --param large-function-growth=800 --param max-inline-insns-single=3000 \
2206 -ffunction-sections -fdata-sections" \
2207 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
2208 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
2209 HAVE_CXX=yes \
2210 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
2211 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
2212 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
2213 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
2214 LIBCURL_LIBS="-lcurl" \
2215 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
2216 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
2217 LIBEVENT_LIBS="-levent" \
2218 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2219 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
2220 OPENSSL_LIBS="-lcrypto -lssl" \
2221 ZLIB_CFLAGS="-I$(TOP)/zlib" \
2222 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
2223 ZLIB_LIBS="-lz"
2224 touch transmission/stamp-h1
2226 transmission: transmission/stamp-h1
2227 @$(SEP)
2228 $(MAKE) -C transmission $(PARALLEL_BUILD)
2230 transmission-clean:
2231 -@$(MAKE) -C transmission clean
2232 @rm -f transmission/stamp-h1 transmission/Makefile
2234 transmission-install: transmission
2235 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
2236 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
2237 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
2238 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
2239 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
2240 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
2241 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
2242 ifeq ($(TCONFIG_TR_EXTRAS),y)
2243 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2244 else
2245 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2246 endif
2248 btgui:
2249 @$(SEP)
2251 btgui-install: btgui
2252 install -d $(INSTALLDIR)/btgui/usr/bin
2253 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2255 libnfsidmap/stamp-h1:
2256 cd libnfsidmap && \
2257 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2258 ac_cv_func_malloc_0_nonnull=yes \
2259 ac_cv_func_realloc_0_nonnull=yes \
2260 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2261 touch libnfsidmap/stamp-h1
2263 libnfsidmap: libnfsidmap/stamp-h1
2264 @$(SEP)
2265 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2267 libnfsidmap-clean:
2268 -@$(MAKE) -C libnfsidmap clean
2269 @rm -f libnfsidmap/stamp-h1
2270 @rm -rf libnfsidmap/staged
2272 libnfsidmap-install: libnfsidmap
2273 install -d $(TOP)/libnfsidmap/staged
2274 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2276 portmap/stamp-h1:
2277 cd portmap \
2278 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2279 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2280 touch portmap/stamp-h1
2282 portmap: portmap/stamp-h1
2283 @$(SEP)
2284 $(MAKE) -C portmap $(PARALLEL_BUILD)
2286 portmap-clean:
2287 -@$(MAKE) -C portmap clean
2288 @rm -f portmap/stamp-h1
2290 portmap-install: portmap
2291 install -d $(INSTALLDIR)/portmap/usr/sbin
2292 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2293 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2295 e2fsprogs/stamp-h1:
2296 cd e2fsprogs && \
2297 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2298 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2299 touch e2fsprogs/stamp-h1
2301 e2fsprogs: e2fsprogs/stamp-h1
2302 @$(SEP)
2303 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2305 e2fsprogs-clean:
2306 -@$(MAKE) -C e2fsprogs clean
2307 @rm -f e2fsprogs/stamp-h1
2308 @rm -f e2fsprogs/Makefile
2309 @rm -rf e2fsprogs/staged
2311 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2312 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2313 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2314 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2315 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2316 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2317 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2318 ac_cv_func_malloc_0_nonnull=yes \
2319 ac_cv_func_realloc_0_nonnull=yes \
2320 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2321 --enable-nfsv4 --enable-nfsv3
2322 touch nfs-utils/stamp-h1
2324 nfs-utils: nfs-utils/stamp-h1
2325 @$(SEP)
2326 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2328 nfs-utils-clean:
2329 -@$(MAKE) -C nfs-utils clean
2330 @rm -f nfs-utils/stamp-h1
2332 nfs-utils-install: nfs-utils
2333 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2334 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2335 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2336 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2337 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2338 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2339 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2340 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2341 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2342 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2343 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2344 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2345 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2346 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2348 tinc/stamp-h1: openssl zlib lzo
2349 @cd tinc && autoreconf -fsi && \
2350 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2351 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
2352 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2353 $(CONFIGURE) \
2354 --prefix=/usr \
2355 --sysconfdir=/etc \
2356 --localstatedir=/var \
2357 --with-zlib-include="$(TOP)/zlib" \
2358 --with-zlib-lib="$(TOP)/zlib" \
2359 --with-lzo-include="$(TOP)/lzo/include" \
2360 --with-lzo-lib="$(TOP)/lzo/src/.libs" \
2361 --with-openssl-include="$(TOP)/openssl/include" \
2362 --with-openssl-lib="$(TOP)/openssl" \
2363 --disable-curses \
2364 --disable-readline
2365 @touch tinc/stamp-h1
2367 tinc: tinc/stamp-h1
2368 @$(SEP)
2369 @$(MAKE) -C tinc LIBS="-lcrypto $(TOP)/zlib/libz.a -llzo2" $(PARALLEL_BUILD)
2371 tinc-clean:
2372 -@$(MAKE) -C tinc clean
2373 @rm -f tinc/stamp-h1
2375 tinc-install:
2376 install -D tinc/src/tinc $(INSTALLDIR)/tinc/usr/sbin/tinc
2377 install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
2378 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tinc
2379 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tincd
2381 sd-idle/stamp-h1:
2382 cd sd-idle \
2383 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2384 $(MAKE) -C sd-idle
2385 chmod 0755 sd-idle/sd-idle
2386 touch sd-idle/stamp-h1
2388 sd-idle-clean:
2389 -@$(MAKE) -C sd-idle clean
2390 @rm -f sd-idle/stamp-h1
2392 sd-idle-install: sd-idle/stamp-h1
2393 install -d $(INSTALLDIR)/sd-idle/usr/bin
2394 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2395 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2397 snmp/stamp-h1:
2398 cd snmp && \
2399 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2400 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2401 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2402 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2403 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2404 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2405 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2406 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2407 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2408 touch snmp/stamp-h1
2410 snmp: snmp/stamp-h1
2411 @$(SEP)
2412 $(MAKE) -C snmp
2414 snmp-clean:
2415 -@$(MAKE) -C snmp clean
2416 @rm -f snmp/stamp-h1
2418 snmp-install: snmp
2419 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2420 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2422 apcupsd/stamp-h1:
2423 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2424 $(MAKE) configure && \
2425 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2426 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2427 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2428 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2429 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2430 touch apcupsd/stamp-h1
2432 apcupsd: apcupsd/stamp-h1
2433 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2435 apcupsd-clean:
2436 -@$(MAKE) -C apcupsd clean
2437 @rm -f apcupsd/stamp-h1
2438 @rm -f apcupsd/config*
2440 apcupsd-install: apcupsd
2441 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2442 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2443 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2444 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2445 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2447 libsodium/stamp-h1:
2448 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2449 $(CONFIGURE) --prefix=/usr --disable-ssp --enable-minimal
2450 touch libsodium/stamp-h1
2452 libsodium: libsodium/stamp-h1
2453 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2455 libsodium-install: libsodium
2456 install -d $(INSTALLDIR)/libsodium/usr/lib
2457 install -D libsodium/src/libsodium/.libs/libsodium.so.13.0.2 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.13.0.2
2458 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.13.0.2
2459 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2460 ln -sf libsodium.so.13.0.2 libsodium.so.13 && \
2461 ln -sf libsodium.so.13.0.2 libsodium.so
2463 libsodium-clean:
2464 -$(MAKE) -C libsodium clean
2465 @rm -rf libsodium/stamp-h1
2467 dnscrypt/stamp-h1: libsodium
2468 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2469 autoreconf && \
2470 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2471 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2472 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2473 $(CONFIGURE) --prefix=/usr --disable-ssp
2474 touch dnscrypt/stamp-h1
2476 dnscrypt: dnscrypt/stamp-h1
2477 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2479 dnscrypt-install: dnscrypt
2480 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2481 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2482 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2483 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2485 dnscrypt-clean:
2486 -@$(MAKE) -C dnscrypt clean
2487 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2489 tor/stamp-h1: openssl zlib libevent
2490 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2491 autoreconf && \
2492 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2493 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2494 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2495 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2496 --disable-asciidoc --disable-tool-name-check
2497 touch tor/stamp-h1
2499 tor: tor/stamp-h1
2500 $(MAKE) -C tor $(PARALLEL_BUILD)
2502 tor-install: tor
2503 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2504 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2506 tor-clean:
2507 -@$(MAKE) -C tor clean
2508 @rm -rf tor/stamp-h1 tor/Makefile
2510 udpxy/stamp-h1:
2511 cd udpxy \
2512 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2513 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2514 touch udpxy/stamp-h1
2516 udpxy-clean:
2517 -@$(MAKE) -C udpxy clean
2518 @rm -f udpxy/stamp-h1
2520 udpxy-install: udpxy/stamp-h1
2521 install -d $(INSTALLDIR)/udpxy/usr/bin
2522 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2523 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2525 mdadm:
2526 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2528 mdadm-install: mdadm
2529 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2530 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2532 mdadm-clean:
2533 -@$(MAKE) -C mdadm clean
2535 ipset:
2536 $(MAKE) -C ipset binaries
2538 ipset-install: ipset
2539 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2540 install -d $(INSTALLDIR)/ipset/usr/lib/
2541 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2542 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2543 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2545 ipset-clean:
2546 -@$(MAKE) -C ipset clean
2548 comgt:
2549 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2551 comgt-install: comgt
2552 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2553 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2554 ln -sf comgt gcom
2555 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2556 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2557 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2559 comgt-clean:
2560 -@$(MAKE) -C comgt clean
2563 # Generic rules
2567 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2570 %-clean:
2571 @-[ ! -d $* ] || $(MAKE) -C $* clean
2573 %-distclean:
2574 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2576 %-install: %
2577 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2579 %-build:
2580 $(MAKE) $*-clean $*
2582 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2584 .PHONY: all clean distclean mrproper install package
2585 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2586 .PHONY: dummy libnet libpcap