make autoreconf before openvpn compilation
[tomato/tomato-dir865l.git] / release / src / router / Makefile
blob742a143832cb1936be998bd62ef198d6f2131ff4
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 ifeq ($(TCONFIG_MICROSD),y)
106 NEED_SD_MODULES = y
107 endif
108 endif
110 ifeq ($(TCONFIG_SAMBASRV),y)
111 ifeq ($(TCONFIG_SAMBA3),y)
112 NEED_SAMBA3 = y
113 else
114 NEED_SAMBA2 = y
115 endif
116 endif
118 ifeq ($(TCONFIG_IPV6),y)
119 export TCONFIG_IPV6 := y
120 else
121 TCONFIG_IPV6 :=
122 endif
124 ifeq ($(TCONFIG_IPSEC),y)
125 export TCONFIG_IPSEC := y
126 else
127 TCONFIG_IPSEC :=
128 endif
130 ifeq ($(TCONFIG_RAID),y)
131 export TCONFIG_RAID := y
132 else
133 TCONFIG_RAID :=
134 endif
136 obj-$(NEED_SAMBA2) += samba
137 obj-$(NEED_SAMBA3) += samba3
139 ifeq ($(CONFIG_BCMWL6),y)
140 ifeq ($(TCONFIG_UFSD),y)
141 obj-$(TCONFIG_NTFS) += ufsd
142 else
143 obj-$(TCONFIG_NTFS) += ntfs-3g
144 endif
145 else
146 obj-$(TCONFIG_NTFS) += ntfs-3g
147 endif
149 obj-$(TCONFIG_EBTABLES) += ebtables
150 #obj-$(TCONFIG_IPV6) += libdaemon
151 #obj-$(TCONFIG_IPV6) += radvd
152 obj-$(TCONFIG_IPV6) += dhcpv6
154 obj-$(TCONFIG_MEDIA_SERVER) += zlib
155 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
156 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
157 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
158 obj-$(TCONFIG_MEDIA_SERVER) += libogg
159 obj-$(TCONFIG_MEDIA_SERVER) += flac
160 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
161 obj-$(TCONFIG_MEDIA_SERVER) += libexif
162 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
163 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
164 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
165 MEDIA_SERVER_STATIC=y
166 #MEDIA_SERVER_STATIC :=
168 #obj-y += libnfnetlink
169 obj-y += miniupnpd
170 # obj-y += upnp
171 obj-$(CONFIG_LINUX26) += ipset
175 # configurable packages
177 obj-$(TCONFIG_L2TP) += xl2tpd
178 obj-$(TCONFIG_PPTP) += accel-pptp
179 obj-$(TCONFIG_PPTPD) += pptpd
180 obj-$(TCONFIG_HTTPS) += openssl
181 obj-$(TCONFIG_SSH) += dropbear
182 obj-$(TCONFIG_ZEBRA) += zebra
183 # obj-$(TCONFIG_IPP2P) += ipp2p
184 obj-$(TCONFIG_LZO) += lzo
185 obj-$(TCONFIG_OPENVPN) += openvpn
186 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
187 obj-$(TCONFIG_TINC) += tinc
188 obj-$(TCONFIG_EMF) += emf
189 obj-$(TCONFIG_EMF) += igs
191 # Tomato RAF
192 # additional modules for nginx
193 ifeq (obj-$(TCONFIG_NGINX),y)
194 ifndef ($(ADDITIONAL_MODULES))
195 ADDITIONAL_MODULES:=
196 else
197 ifeq ($(TCONFIG_IPV6),y)
198 ADDITIONAL_MODULES += --with-ipv6
199 endif
200 endif
201 endif
202 obj-$(TCONFIG_NGINX) += libncurses
203 obj-$(TCONFIG_NGINX) += mysql
204 obj-$(TCONFIG_NGINX) += openssl
205 obj-$(TCONFIG_NGINX) += spawn-fcgi
206 obj-$(TCONFIG_NGINX) += pcre
207 obj-$(TCONFIG_NGINX) += sqlite
208 obj-$(TCONFIG_NGINX) += libiconv
209 obj-$(TCONFIG_NGINX) += libxml2
210 obj-$(TCONFIG_NGINX) += libpng
211 obj-$(TCONFIG_NGINX) += jpeg
212 obj-$(TCONFIG_NGINX) += php
213 obj-$(TCONFIG_NGINX) += nginx
215 obj-$(TCONFIG_NANO) += libncurses
216 obj-$(TCONFIG_NANO) += nano
218 obj-$(TCONFIG_BBT) += openssl
219 obj-$(TCONFIG_BBT) += libevent
220 obj-$(TCONFIG_BBT) += libcurl
221 obj-$(TCONFIG_BBT) += transmission
222 obj-$(TCONFIG_BT) += btgui
223 obj-$(TCONFIG_BBT) += zlib
224 #obj-$(TCONFIG_BBT) += libiconv
226 obj-$(CONFIG_LINUX26) += hotplug2
227 obj-$(CONFIG_LINUX26) += udevtrigger
229 ifeq ($(TCONFIG_OPENVPN),y)
230 export FULL_OPENSSL := y
231 else
232 ifeq ($(TCONFIG_FTP_SSL),y)
233 export FULL_OPENSSL := y
234 else
235 ifeq ($(TCONFIG_BBT),y)
236 export FULL_OPENSSL := y
237 else
238 ifeq ($(TCONFIG_TOR),y)
239 export FULL_OPENSSL := y
240 else
241 ifeq ($(TCONFIG_TOR),y)
242 export FULL_OPENSSL := y
243 else
244 ifeq ($(TCONFIG_TINC),y)
245 export FULL_OPENSSL := y
246 else
247 FULL_OPENSSL :=
248 endif
249 endif
250 endif
251 endif
252 endif
253 endif
255 obj-y += wanuptime
257 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
258 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
263 # Basic rules
266 all: clean-build libc $(obj-y) kernel
269 kernel: $(LINUXDIR)/.config
270 @$(SEP)
272 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
273 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
275 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
276 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
278 ifeq ($(CONFIG_LINUX26),y)
279 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
280 endif
283 lzma-loader:
284 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
286 lzma-loader-install: lzma-loader
287 @$(SEP)
290 kmod: dummy
291 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
293 testfind:
294 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
295 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
297 install package: $(obj-install) $(LINUXDIR)/.config
298 @$(SEP)
300 install -d $(TARGETDIR)
303 # kernel modules
304 $(MAKE) -C $(LINUXDIR) modules_install \
305 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" \
306 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
308 ifneq ($(CONFIG_LINUX26),y)
309 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
310 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
311 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
312 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
313 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
314 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
315 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
317 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
318 endif
320 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
322 # nice and clean
323 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
324 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
325 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
326 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
327 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
328 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
329 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
330 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
332 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
334 ##!!TB
335 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
336 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
337 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
338 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
346 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
352 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
353 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
354 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
355 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
356 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
357 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
358 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
359 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
360 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
361 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
362 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
363 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
364 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
365 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
366 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
367 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
368 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
369 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
370 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
371 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
372 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
373 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
374 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
375 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
376 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
377 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
378 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
379 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
380 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
381 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
382 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
384 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
385 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
386 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
387 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
388 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv usb/* . && rm -rf usb || true
389 cd $(TARGETDIR)/lib/modules && rm -f */source || true
391 # misc
392 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
393 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
394 done
396 ifneq ($(TCONFIG_L7),y)
397 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
398 endif
400 # uClibc
401 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
402 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
403 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
404 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
405 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
406 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
407 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
408 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
409 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
410 ifeq ($(TCONFIG_SSH),y)
411 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
412 endif
413 ifeq ($(TCONFIG_BBT),y)
414 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
415 endif
416 ifeq ($(TCONFIG_NGINX),y)
417 install $(LIBDIR)/libstdc++.so.6 $(TARGETDIR)/lib/libstdc++.so.6
418 cd $(TARGETDIR)/lib && ln -sf libstdc++.so.6 libstdc++.so
419 $(STRIP) $(TARGETDIR)/lib/libstdc++.so.6
420 endif
421 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
422 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
423 $(STRIP) $(TARGETDIR)/lib/*.so.0
424 endif
426 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
428 @echo ---
430 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
431 @$(SRCBASE)/btools/libfoo.pl
432 else
433 @$(SRCBASE)/btools/libfoo.pl --noopt
434 endif
435 @chmod 0555 $(TARGETDIR)/lib/*.so*
436 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
438 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
439 # separated/copied extra stuff
440 @rm -rf $(PLATFORMDIR)/extras
441 @mkdir $(PLATFORMDIR)/extras
442 @mkdir $(PLATFORMDIR)/extras/ipsec
443 @mkdir $(PLATFORMDIR)/extras/raid
444 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
445 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
447 $(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
448 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
450 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
451 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
452 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
454 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
455 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
456 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
457 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
458 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
459 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
460 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
461 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
462 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
463 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
464 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
465 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
466 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
467 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
468 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
469 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
470 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
472 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
473 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
474 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
475 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
476 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-acm.*o $(PLATFORMDIR)/extras/ || true
477 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
478 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_*.*o $(PLATFORMDIR)/extras/ || true
479 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usbnet.*o $(PLATFORMDIR)/extras/ || true
480 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
481 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
482 $(if $(NEED_SD_MODULES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
483 $(if $(NEED_SD_MODULES),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
485 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
486 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
487 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
488 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
489 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
490 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
491 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
492 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
493 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
494 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
495 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/cdc-wdm.*o $(PLATFORMDIR)/extras/ || true
496 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
497 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/rndis_host.*o $(PLATFORMDIR)/extras/ || true
498 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/qmi_wwan.*o $(PLATFORMDIR)/extras/ || true
499 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ipheth.*o $(PLATFORMDIR)/extras/ || true
500 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
501 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
502 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
503 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
504 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
505 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
506 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
507 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
508 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
509 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
510 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
511 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
512 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
513 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
514 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
515 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
516 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
517 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
518 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
519 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
520 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
521 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
522 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
523 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
524 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
525 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
526 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
527 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
529 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
530 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
531 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
532 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
533 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
534 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
535 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
537 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
538 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
539 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
540 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
541 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
542 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
543 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
544 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
545 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
546 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
547 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
548 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
549 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
550 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
552 ifneq ($(TCONFIG_USB),y)
553 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
554 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
555 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
556 endif
558 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
559 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
560 ifneq ($(TCONFIG_USB_EXTRAS),y)
561 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
562 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
563 endif
564 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
565 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
566 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
567 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
568 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
569 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
570 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
572 @mkdir -p $(PLATFORMDIR)/extras/apps
573 @mkdir -p $(PLATFORMDIR)/extras/lib
575 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
576 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
577 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
579 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
580 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
581 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
582 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
583 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
584 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
585 ifneq ($(NEED_EX_USB),y)
586 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
587 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
588 endif
589 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
591 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
592 ifeq ($(TCONFIG_L7PAT),y)
593 @cd layer7 && ./squish.sh
594 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
595 endif
597 ifeq ($(TCONFIG_PPTPD),y)
598 @mkdir -p $(TARGETDIR)/rom/etc/vpn
599 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
600 chmod +x $(TARGETDIR)/rom/etc/vpn/*
601 endif
603 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
604 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
605 @echo ---
607 @rm -f $(TARGETDIR)/lib/modules/*/build
609 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
610 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
612 # Package kernel and filesystem
613 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
614 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
615 # $(MAKE) -C $(LINUXDIR) zImage ; \
616 # else \
617 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
618 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
619 # fi
621 # Pad self-booting Linux to a 64 KB boundary
622 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
623 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
624 # Append filesystem to self-booting Linux
625 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
628 libc: $(LIBDIR)/ld-uClibc.so.0
629 # $(MAKE) -C ../../../tools-src/uClibc all
630 # $(MAKE) -C ../../../tools-src/uClibc install
634 # cleaners
637 clean: clean-build $(obj-clean)
638 rm -rf layer7/squished
639 rm -f .ipv6-y .ipv6-n
640 rm -f .fullssl-y .fullssl-n
641 make -C config clean
643 clean-build: dummy
644 rm -rf $(TARGETDIR)
645 rm -rf $(INSTALLDIR)
646 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
647 rm -rf $(PLATFORMDIR)/extras
649 distclean: clean
650 ifneq ($(INSIDE_MAK),1)
651 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
652 endif
653 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
656 # configuration
659 CONFIG_IN := config/config.in
661 config/conf config/mconf:
662 @$(MAKE) -C config
664 rconf: config/conf
665 @config/conf $(CONFIG_IN)
667 rmconf: config/mconf
668 @config/mconf $(CONFIG_IN)
670 roldconf: config/conf
671 @config/conf -o $(CONFIG_IN)
672 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
674 kconf:
675 @$(MAKE) -C $(LINUXDIR) config
677 kmconf:
678 @$(MAKE) -C $(LINUXDIR) menuconfig
680 koldconf:
681 @$(MAKE) -C $(LINUXDIR) oldconfig
682 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
684 bboldconf:
685 @$(MAKE) -C busybox oldconfig
687 config conf: rconf kconf
689 menuconfig mconf: rmconf kmconf
691 .ipv6-y .ipv6-n:
692 @rm -f .ipv6-y .ipv6-n
693 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
694 @touch $@
696 .fullssl-y .fullssl-n:
697 @rm -f .fullssl-y .fullssl-n
698 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
699 @touch $@
701 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
703 oldconfig oldconf: koldconf roldconf dependconf bboldconf
707 # overrides and extra dependencies
710 busybox: dummy
711 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
713 busybox-install:
714 rm -rf $(INSTALLDIR)/busybox
715 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
717 busybox-clean:
718 -@$(MAKE) -C busybox distclean
720 busybox-config:
721 $(MAKE) -C busybox menuconfig
724 httpd: shared nvram mssl
725 @$(SEP)
726 @$(MAKE) -C httpd
728 www-install:
729 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
731 matrixssl:
732 @$(SEP)
733 @$(MAKE) -C matrixssl/src
735 matrixssl-install:
736 @true
738 matrixssl-clean:
739 -@$(MAKE) -C matrixssl/src clean
741 cyassl/stamp-h1:
742 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
743 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
744 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
745 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
746 PTHREAD_LIBS="-lpthread" \
747 $(CONFIGURE)
748 @touch cyassl/stamp-h1
750 cyassl: cyassl/stamp-h1
751 @$(SEP)
752 @$(MAKE) -C cyassl
754 cyassl-clean:
755 -@$(MAKE) -C cyassl clean
756 @rm -f cyassl/stamp-h1
758 cyassl-install:
759 @true
761 ifeq ($(FULL_OPENSSL),y)
762 OPENSSL_CIPHERS:=enable-rc5
763 else
764 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
765 endif
767 openssl/stamp-h1:
768 cd openssl && \
769 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
770 -ffunction-sections -fdata-sections -Wl,--gc-sections \
771 shared $(OPENSSL_CIPHERS) no-ssl2 no-ssl3 \
772 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
773 no-seed no-capieng no-gms no-gmp no-rfc3779 \
774 no-err no-hw no-jpake \
775 no-zlib no-engines no-sse2 no-libunbound no-ssl-trace \
776 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
778 @$(MAKE) -C openssl clean
779 @touch openssl/stamp-h1
781 openssl: openssl/stamp-h1
783 openssl-clean:
784 -@$(MAKE) -C openssl clean
785 @rm -f openssl/stamp-h1
787 openssl-install: openssl
788 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
789 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
790 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
792 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
793 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
794 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
796 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
798 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
799 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
801 ifeq ($(FULL_OPENSSL),y)
802 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
803 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
804 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
805 endif
807 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
809 mdu: shared mssl
811 rc: nvram shared
813 bridge/Makefile:
814 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
815 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
817 bridge: bridge/Makefile
818 @$(SEP)
819 @$(MAKE) -C bridge
821 bridge-clean:
822 -@$(MAKE) -C bridge clean
823 @rm -f bridge/Makefile
825 bridge-install:
826 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
827 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
829 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
830 @$(SEP)
831 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
832 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
833 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
834 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
835 -DNO_INOTIFY -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
836 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
837 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
839 dnsmasq-install:
840 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
841 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
843 nettle/stamp-h1: gmp
844 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
845 CPPFLAGS="-I$(TOP)/gmp" \
846 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
847 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
848 $(CONFIGURE) prefix=$(TOP)/nettle
849 @touch nettle/stamp-h1
851 nettle: nettle/stamp-h1
852 @$(SEP)
853 @$(MAKE) -C nettle
854 @$(MAKE) -C nettle install
856 nettle-clean:
857 -@$(MAKE) -C nettle clean
858 @rm -f nettle/stamp-h1
859 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
861 gmp/stamp-h1:
862 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
863 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
864 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
865 $(CONFIGURE)
866 @touch gmp/stamp-h1
868 gmp: gmp/stamp-h1
869 @$(SEP)
870 @$(MAKE) -C gmp
872 gmp-clean:
873 @$(MAKE) -C gmp clean
874 @rm -f gmp/stamp-h1
876 iptables:
877 ifeq ($(CONFIG_LINUX26),y)
878 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
879 else
880 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
881 endif
882 @$(SEP)
883 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
885 iptables-install:
886 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
887 cd $(INSTALLDIR)/iptables/usr/sbin && \
888 ln -sf iptables iptables-restore && \
889 ln -sf iptables iptables-save
891 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
892 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
894 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
896 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
897 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
898 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
900 ifeq ($(TCONFIG_IPV6),y)
901 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
902 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
903 cd $(INSTALLDIR)/iptables/usr/sbin && \
904 ln -sf ip6tables ip6tables-restore && \
905 ln -sf ip6tables ip6tables-save
906 endif
908 iptables-clean:
909 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
911 ppp:
912 @$(SEP)
913 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
914 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
916 ppp-%:
917 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
919 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
920 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
921 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
922 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
923 @touch rp-pppoe/src/stamp-h1
925 rp-pppoe: pppd rp-pppoe/src/stamp-h1
926 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
928 rp-pppoe-clean:
929 -@$(MAKE) -C rp-pppoe/src clean
930 @rm -f rp-pppoe/src/pppoe-relay
931 @rm -f rp-pppoe/src/stamp-h1
933 rp-pppoe-install: rp-pppoe
934 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
935 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
936 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
937 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
940 upnp: nvram shared iptables
942 libnfnetlink/stamp-h1:
943 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
944 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
945 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
946 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
947 touch libnfnetlink/stamp-h1
949 libnfnetlink: libnfnetlink/stamp-h1
950 @$(SEP)
951 $(MAKE) -C libnfnetlink
953 libnfnetlink-install:
954 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
955 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
956 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
957 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
958 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
960 miniupnpd-config:
961 #ifeq ($(TCONFIG_IPV6),y)
962 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
963 #else
964 @cd miniupnpd && ./genconfig.sh --leasefile --vendorcfg
965 #endif
967 miniupnpd: iptables miniupnpd-config
968 @$(SEP)
969 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
970 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
971 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
973 miniupnpd-clean:
974 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
975 @rm -f miniupnpd/config.h
977 miniupnpd-install:
978 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
979 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
981 # !!TB
982 shared: busybox
984 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
985 @$(SEP)
986 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
988 vsftpd-install: vsftpd
989 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
990 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
992 ufsd: kernel_header kernel
993 @$(MAKE) -C ufsd all
995 ufsd-install: ufsd
996 @$(MAKE) -C ufsd install INSTALLDIR=$(INSTALLDIR)/ufsd
998 ntfs-3g/Makefile:
999 cd ntfs-3g && \
1000 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1001 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1002 $(CONFIGURE) --enable-shared=no --enable-static=no \
1003 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
1004 --disable-ntfsprogs --disable-crypto --without-uuid \
1005 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
1007 ntfs-3g: ntfs-3g/Makefile
1008 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
1010 ntfs-3g-clean:
1011 -@$(MAKE) -C ntfs-3g clean
1012 @rm -f ntfs-3g/Makefile
1014 ntfs-3g-install: ntfs-3g
1015 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1016 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
1017 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
1018 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
1019 ln -sf ../bin/ntfs-3g mount.ntfs
1021 libusb10/Makefile: libusb10/Makefile.in
1022 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
1023 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
1025 libusb10: libusb10/Makefile
1026 $(MAKE) -C $@
1028 libusb10-install: libusb10
1029 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
1030 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1032 libusb10-clean:
1033 -@$(MAKE) -C $@ clean
1034 @rm -rf libusb10/Makefile
1036 libusb/Makefile: libusb/Makefile.in
1037 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1038 $(CONFIGURE) --prefix=/usr \
1039 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1040 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1041 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1043 libusb: libusb10 libusb/Makefile
1044 $(MAKE) -C $@
1046 libusb-install: libusb
1047 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1048 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1050 libusb-clean:
1051 -@$(MAKE) -C $@ clean
1052 @rm -rf libusb/Makefile
1054 usbmodeswitch: libusb10
1055 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1056 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1057 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1059 usbmodeswitchdb-install:
1060 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1061 # compress whitespace
1062 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1063 F=`basename $$D`; \
1064 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1065 done
1067 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1068 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1069 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1070 @mkdir -p $(TARGETDIR)/rom/etc
1071 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1073 #libdaemon: libdaemon/Makefile
1074 #$(MAKE) -C $@
1076 #libdaemon/Makefile: libdaemon/Makefile.in
1077 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1078 # --disable-dependency-tracking
1080 #libdaemon-install: libdaemon
1081 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1082 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1083 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1084 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1085 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1087 #libdaemon-clean:
1088 # -@$(MAKE) -C libdaemon distclean
1090 #radvd/stamp-h1:
1091 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1092 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1093 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1094 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1095 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1096 # @$(MAKE) -C radvd clean
1097 # @touch radvd/stamp-h1
1099 #radvd: libdaemon radvd/stamp-h1
1101 #radvd-clean:
1102 # -@$(MAKE) -C radvd distclean
1103 # @rm -f radvd/stamp-h1
1105 #radvd-install: radvd
1106 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1107 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1109 dhcpv6/stamp-h1:
1110 @cd dhcpv6 && \
1111 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1112 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1113 ac_cv_func_setpgrp_void=yes \
1114 $(CONFIGURE) --prefix= --with-localdbdir=/var
1115 @$(MAKE) -C dhcpv6 clean
1116 @touch dhcpv6/stamp-h1
1118 dhcpv6: dhcpv6/stamp-h1
1119 @$(SEP)
1120 @$(MAKE) -C dhcpv6 dhcp6c
1122 dhcpv6-install: dhcpv6
1123 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1124 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1126 dhcpv6-clean:
1127 -@$(MAKE) -C dhcpv6 clean
1128 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1131 p910nd:
1132 samba:
1133 samba3:
1135 nvram: shared
1137 prebuilt: shared libbcmcrypto
1139 vlan:
1140 @$(SEP)
1141 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1143 vlan-install:
1144 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1145 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1148 pptp-client-install:
1149 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1150 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1153 accel-pptp: pppd accel-pptp/Makefile
1154 @$(MAKE) -C accel-pptp
1156 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1157 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1158 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1160 accel-pptp-clean:
1161 -@$(MAKE) -C accel-pptp clean
1162 @rm -f accel-pptp/Makefile
1164 accel-pptp-install: accel-pptp
1165 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1166 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1168 pptpd/stamp-h1:
1169 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1170 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1171 touch pptpd/stamp-h1
1173 pptpd: pptpd/stamp-h1
1175 pptpd-install: pptpd
1176 @echo pptpd
1177 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1178 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1179 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1180 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1181 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1182 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1184 pptpd-clean:
1185 -@$(MAKE) -C pptpd clean
1186 rm -rf pptpd/stamp-h1 pptpd/.deps
1188 pppd/Makefile: pppd/linux/Makefile.top
1189 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1191 pppd: pppd/Makefile
1192 @$(SEP)
1193 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1195 pppd-clean:
1196 -@$(MAKE) -C pppd clean
1197 @rm -f pppd/Makefile
1199 pppd-install: pppd
1200 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1201 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1202 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1203 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1204 ifeq ($(TCONFIG_L2TP),y)
1205 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1206 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1207 endif
1209 # ipupdate-install:
1210 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1211 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1213 zebra/stamp-h1:
1214 @cd zebra && rm -f config.cache && \
1215 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1216 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1217 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1218 $(CONFIGURE) --sysconfdir=/etc \
1219 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1220 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1221 @touch zebra/stamp-h1
1223 zebra: zebra/stamp-h1
1224 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1226 zebra-clean:
1227 -@$(MAKE) -C zebra clean
1228 @rm -f zebra/stamp-h1
1230 zebra-install: zebra
1231 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1232 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1233 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1234 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1235 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1236 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1239 rp-l2tp-install:
1240 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1241 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1242 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1243 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1244 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1245 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1246 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1248 xl2tpd: pppd
1249 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1251 xl2tpd-install: xl2tpd
1252 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1253 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1256 bpalogin-install:
1257 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1258 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1261 # libnet:
1262 # @$(SEP)
1263 # @-mkdir -p libnet/lib
1264 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1266 # libpcap:
1267 # @$(SEP)
1268 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1270 libbcm:
1271 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1273 libbcm-install:
1274 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1275 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1278 iproute2:
1279 @$(SEP)
1280 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1282 iproute2-install: iproute2
1283 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1284 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1285 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1286 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1289 ntpc: nvram shared
1292 dropbear: dropbear/config.h
1293 @$(SEP)
1294 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1296 dropbear-install:
1297 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1298 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1299 cd $(INSTALLDIR)/dropbear/usr/bin && \
1300 ln -sf dropbearmulti dropbear && \
1301 ln -sf dropbearmulti dropbearconvert && \
1302 ln -sf dropbearmulti dropbearkey && \
1303 ln -sf dropbearmulti dbclient && \
1304 ln -sf dropbearmulti ssh && \
1305 ln -sf dropbearmulti scp
1307 dropbear-clean:
1308 -@$(MAKE) -C dropbear clean
1309 @rm -f dropbear/config.h
1311 dropbear/config.h:
1312 cd dropbear && \
1313 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1314 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1315 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1316 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1317 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1318 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1319 @$(MAKE) -C dropbear clean
1321 # Media libraries
1323 sqlite/stamp-h1:
1324 cd sqlite && \
1325 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1326 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1327 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1328 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1329 touch sqlite/stamp-h1
1331 sqlite: sqlite/stamp-h1
1332 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1334 sqlite-clean:
1335 -@$(MAKE) -C sqlite clean
1336 @rm -f sqlite/stamp-h1
1338 sqlite-install: sqlite
1339 @$(SEP)
1340 ifeq ($(TCONFIG_NGINX),y)
1341 install -D sqlite/.libs/libsqlite3.so.0.8.6 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1342 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0.8.6
1343 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1344 ln -sf libsqlite3.so.0.8.6 libsqlite3.so.0 && \
1345 ln -sf libsqlite3.so.0.8.6 libsqlite3.so
1346 endif
1348 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1350 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1351 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1353 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1354 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1356 FFMPEG_PROTOCOLS:=file
1357 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1359 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
1360 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1362 ffmpeg/stamp-h1: zlib
1363 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1364 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1365 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1366 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1367 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1368 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1369 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1370 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1371 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1372 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1373 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1374 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1375 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1376 --extra-libs="-L$(TOP)/zlib -lz" \
1377 --enable-zlib --disable-debug --prefix=''
1378 touch ffmpeg/stamp-h1
1380 ffmpeg: ffmpeg/stamp-h1 zlib
1381 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1383 ffmpeg-clean:
1384 -@$(MAKE) -C ffmpeg clean
1385 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1387 ffmpeg-install: ffmpeg
1388 @$(SEP)
1389 ifneq ($(MEDIA_SERVER_STATIC),y)
1390 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1391 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1392 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1393 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1394 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1395 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1396 endif
1398 libogg/stamp-h1:
1399 cd libogg && \
1400 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1401 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1402 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1403 touch libogg/stamp-h1
1405 libogg: libogg/stamp-h1
1406 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1408 libogg-clean:
1409 -@$(MAKE) -C libogg clean
1410 @rm -f libogg/stamp-h1
1412 libogg-install: libogg
1413 @$(SEP)
1414 ifneq ($(MEDIA_SERVER_STATIC),y)
1415 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1416 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1417 endif
1419 flac/stamp-h1: libogg
1420 cd flac && \
1421 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1422 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1423 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1424 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1425 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1426 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1427 touch flac/stamp-h1
1429 flac: flac/stamp-h1 libogg
1430 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1432 flac-clean:
1433 -@$(MAKE) -C flac clean
1434 @rm -f flac/stamp-h1
1436 flac-install: flac
1437 @$(SEP)
1438 ifneq ($(MEDIA_SERVER_STATIC),y)
1439 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1440 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1441 endif
1443 jpeg/stamp-h1:
1444 cd jpeg && \
1445 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1446 touch jpeg/stamp-h1
1448 jpeg: jpeg/stamp-h1
1449 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1450 install -d $(TOP)/jpeg/staged/include
1451 install -d $(TOP)/jpeg/staged/lib
1452 install -d $(TOP)/jpeg/staged/bin
1453 install -d $(TOP)/jpeg/staged/man/man1
1454 @$(MAKE) -C jpeg LIBTOOL="" prefix=$(TOP)/jpeg/staged install
1455 install -D jpeg/libjpeg.so $(TOP)/jpeg/staged/lib/libjpeg.so
1456 rm -f $(TOP)/jpeg/staged/lib/libjpeg.la
1458 jpeg-clean:
1459 -@$(MAKE) -C jpeg clean
1460 @rm -f jpeg/stamp-h1 jpeg/Makefile
1461 @rm -rf jpeg/staged
1463 jpeg-install: jpeg
1464 @$(SEP)
1465 ifneq ($(MEDIA_SERVER_STATIC),y)
1466 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1467 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1468 endif
1469 ifeq ($(TCONFIG_NGINX),y)
1470 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1471 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1472 endif
1474 libexif/stamp-h1:
1475 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1476 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1477 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1478 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1479 touch libexif/stamp-h1
1481 libexif: libexif/stamp-h1
1482 @$(MAKE) -C libexif all
1484 libexif-clean:
1485 -@$(MAKE) -C libexif clean
1486 @rm -f libexif/stamp-h1
1488 libexif-install: libexif
1489 @$(SEP)
1490 ifneq ($(MEDIA_SERVER_STATIC),y)
1491 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1492 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1493 endif
1495 zlib/stamp-h1:
1496 cd zlib && \
1497 CC=$(CC) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC" LDSHAREDLIBC="$(EXTRALDFLAGS)" \
1498 ./configure --shared --prefix=/usr --libdir=/usr/lib
1499 touch zlib/stamp-h1
1501 zlib: zlib/stamp-h1
1502 @$(MAKE) -C zlib all
1503 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1505 zlib-clean:
1506 -@$(MAKE) -C zlib clean
1507 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1508 @rm -rf zlib/staged
1510 zlib-install: zlib
1511 @$(SEP)
1512 ifneq ($(MEDIA_SERVER_STATIC),y)
1513 install -d $(INSTALLDIR)/zlib/usr/lib
1514 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1515 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1516 endif
1517 ifeq ($(TCONFIG_BT),y)
1518 install -d $(INSTALLDIR)/zlib/usr/lib
1519 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1520 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1521 endif
1522 ifeq ($(TCONFIG_TOR),y)
1523 install -d $(INSTALLDIR)/zlib/usr/lib
1524 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1525 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1526 endif
1527 ifeq ($(TCONFIG_NGINX),y)
1528 install -d $(INSTALLDIR)/zlib/usr/lib
1529 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1530 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1531 endif
1533 libid3tag/stamp-h1: zlib
1534 cd libid3tag && \
1535 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1536 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1537 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1538 --disable-debugging --disable-profiling
1539 touch libid3tag/stamp-h1
1541 libid3tag: libid3tag/stamp-h1 zlib
1542 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1544 libid3tag-clean:
1545 -@$(MAKE) -C libid3tag clean
1546 @rm -f libid3tag/stamp-h1
1548 libid3tag-install: libid3tag
1549 @$(SEP)
1550 ifneq ($(MEDIA_SERVER_STATIC),y)
1551 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1552 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1553 endif
1555 libvorbis/stamp-h1: libogg
1556 cd libvorbis && \
1557 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1558 CPPFLAGS="-I$(TOP)/libogg/include" \
1559 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1560 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1561 --with-ogg-includes="$(TOP)/libogg/include" \
1562 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1563 touch libvorbis/stamp-h1
1565 libvorbis: libvorbis/stamp-h1
1566 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1568 libvorbis-clean:
1569 -@$(MAKE) -C libvorbis clean
1570 @rm -f libvorbis/stamp-h1
1572 libvorbis-install: libvorbis
1573 @$(SEP)
1574 ifneq ($(MEDIA_SERVER_STATIC),y)
1575 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1576 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1577 endif
1579 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1580 @$(SEP)
1581 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1583 minidlna-clean:
1584 -@$(MAKE) -C minidlna clean
1585 @rm -f minidlna/stamp-h1
1587 minidlna-install: minidlan
1588 @$(SEP)
1589 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1590 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1592 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1593 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1594 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1595 $(CONFIGURE) --prefix=/usr
1597 igmpproxy: igmpproxy/src/Makefile
1598 @$(SEP)
1599 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1601 igmpproxy-install: igmpproxy
1602 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1603 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1605 igmpproxy-clean:
1606 -@$(MAKE) -C igmpproxy/src clean
1607 @rm -f igmpproxy/src/Makefile
1609 udev:
1610 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1611 PROGRAMS=udevtrigger
1613 udev-install: udev
1614 install -d $(INSTALLDIR)
1615 install -d $(TARGETDIR)
1616 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1618 hotplug2:
1619 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1621 hotplug2-install: hotplug2
1622 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1623 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1625 emf:
1626 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1628 emf-install: emf
1629 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1631 igs:
1632 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1634 igs-install: igs
1635 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1637 wanuptime: nvram shared
1638 @$(SEP)
1639 @$(MAKE) -C wanuptime
1641 wanuptime-clean:
1642 -@$(MAKE) -C wanuptime clean
1644 wanuptime-install:
1645 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1646 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1648 ebtables: dummy
1649 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1650 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1651 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1652 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1654 ebtables-install: ebtables
1655 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1657 @mkdir -p $(TARGETDIR)/rom/etc
1658 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1659 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1661 install -d $(INSTALLDIR)/ebtables/usr/lib
1662 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1663 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1664 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1666 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1667 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1668 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1670 ebtables-clean:
1671 -@$(MAKE) -C ebtables clean
1673 #Roadkill
1674 spawn-fcgi/stamp-h1:
1675 cd spawn-fcgi && CC=$(CC) \
1676 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1677 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1678 ac_cv_func_malloc_0_nonnull=yes \
1679 $(CONFIGURE) --prefix=/usr
1680 touch spawn-fcgi/stamp-h1
1682 spawn-fcgi: spawn-fcgi/stamp-h1
1683 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1685 spawn-fcgi-clean:
1686 -@$(MAKE) -C spawn-fcgi clean
1687 rm -f spawn-fcgi/stamp-h1
1689 spawn-fcgi-install: spawn-fcgi
1690 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1691 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1692 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1694 #Roadkill
1695 glib/stamp-h1:
1696 @$(SEP)
1697 @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 \
1698 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 \
1699 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 \
1700 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 \
1701 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
1702 @$(MAKE) -C glib
1703 touch glib/stamp-h1
1705 glib: glib/stamp-h1
1706 @$(MAKE) -C glib $(PARALLEL_BUILD)
1708 glib-clean:
1709 -@$(MAKE) -C glib clean
1710 rm -f glib/stamp-h1
1712 glib-install: glib
1713 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1715 nocat/stamp-h1: glib-install
1716 @$(SEP)
1717 @cd nocat && \
1718 NC_CONF_PATH="/" \
1719 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1720 @$(MAKE) -C nocat
1722 echo *** integrate glib to nocat installdir
1723 install -d $(INSTALLDIR)/nocat/usr/lib
1724 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1725 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1726 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1727 touch nocat/stamp-h1
1729 nocat: nocat/stamp-h1
1730 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1732 nocat-clean:
1733 -@$(MAKE) -C nocat clean
1734 rm -f nocat/stamp-h1
1736 nocat-install:
1737 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1738 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1739 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1740 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1742 #Tomato RAF
1743 pcre/stamp-h1:
1744 $(SEP)
1745 cd pcre && autoreconf && \
1746 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1747 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1748 @touch pcre/stamp-h1
1749 [ -d pcre/m4 ] || mkdir pcre/m4
1751 pcre: pcre/stamp-h1
1753 pcre-install: pcre
1754 @$(SEP)
1755 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1756 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1757 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1758 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1759 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1760 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1761 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1763 pcre-clean:
1764 ( if [ -f pcre/Makefile ]; then \
1765 $(MAKE) -C pcre clean; \
1766 rm -rf pcre/stamp-h1; \
1767 fi )
1769 libxml2/stamp-h1:
1770 cd libxml2 && \
1771 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1772 $(CONFIGURE) --prefix=/usr --without-python --enable-static --enable-shared
1773 touch $@
1775 libxml2: libxml2/stamp-h1
1776 @$(MAKE) -C libxml2 all $(PARALLEL_BUILD)
1777 @$(MAKE) -C libxml2 DESTDIR=$(TOP)/libxml2/staged install
1779 libxml2-install: libxml2
1780 @$(SEP)
1781 install -D libxml2/.libs/libxml2.so.2.9.1 $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1782 $(STRIP) $(INSTALLDIR)/libxml2/usr/lib/libxml2.so.2.9.1
1783 cd $(INSTALLDIR)/libxml2/usr/lib && \
1784 ln -sf libxml2.so.2.9.1 libxml2.so.2 && \
1785 ln -sf libxml2.so.2.9.1 libxml2.so
1787 libxml2-clean:
1788 -@$(MAKE) -C libxml2 clean
1789 @rm -f libxml2/stamp-h1
1790 @rm -rf libxml2/staged
1792 libpng/stamp-h1: zlib
1793 cd libpng && \
1794 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall -I$(TOP)/zlib $(EXTRACFLAGS)" LDFLAGS="-L$(TOP)/zlib" \
1795 $(CONFIGURE) --prefix=/usr --enable-static --enable-shared
1796 touch $@
1798 libpng: libpng/stamp-h1
1799 @$(MAKE) -C libpng all $(PARALLEL_BUILD)
1800 @$(MAKE) -C libpng DESTDIR=$(TOP)/libpng/staged install
1802 libpng-install: libpng
1803 @$(SEP)
1804 install -D libpng/.libs/libpng.so.3.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1805 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng.so.3.51.0
1806 cd $(INSTALLDIR)/libpng/usr/lib && \
1807 ln -sf libpng.so.3.51.0 libpng.so && \
1808 ln -sf libpng.so.3.51.0 libpng.so.3
1809 install -D libpng/.libs/libpng12.so.0.51.0 $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1810 $(STRIP) $(INSTALLDIR)/libpng/usr/lib/libpng12.so.0.51.0
1811 cd $(INSTALLDIR)/libpng/usr/lib && \
1812 ln -sf libpng12.so.0.51.0 libpng12.so && \
1813 ln -sf libpng12.so.0.51.0 libpng12.so.0
1815 libpng-clean:
1816 -@$(MAKE) -C libpng clean
1817 @rm -f libpng/stamp-h1
1818 @rm -rf libpng/staged
1820 php/stamp-h1: pcre zlib libiconv sqlite libxml2 libpng jpeg libcurl
1821 @$(SEP)
1822 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1823 CFLAGS="-Os -Wall -I$(TOP)/zlib -I$(TOP)/libxml2/include/libxml -I$(TOP)/libxml2/include -I$(TOP)/pcre -I$(TOP)/libiconv/include \
1824 -I$(TOP)/libpng/staged/usr/include -I$(TOP)/libcurl/staged/include" \
1825 LDFLAGS="-L$(TOP)/pcre/.libs -L$(TOP)/sqlite/.libs -L$(TOP)/zlib -L$(TOP)/libxml2/.libs -L$(TOP)/libiconv/lib/.libs \
1826 -L$(TOP)/libpng/.libs -L$(TOP)/libcurl/staged/lib" \
1827 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" \
1828 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 \
1829 -lsqlite3 -ldl -lpthread -liconv -lxml2 -lstdc++ -lcurl" \
1830 PHP_FCGI_LIBXML_DIR="$(TOP)/libxml2/staged/usr" \
1831 ac_cv_func_memcmp_working=yes \
1832 cv_php_mbstring_stdarg=yes \
1833 $(CONFIGURE) --prefix=/usr \
1834 --enable-shared \
1835 --disable-static \
1836 --disable-rpath \
1837 --disable-debug \
1838 --without-pear \
1839 --with-config-file-path=/etc \
1840 --with-config-file-scan-dir=/etc/php5 \
1841 --disable-short-tags \
1842 --with-zlib \
1843 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
1844 --disable-phar \
1845 --enable-cli \
1846 --enable-cgi \
1847 --disable-calendar \
1848 --enable-ctype \
1849 --with-curl="$(TOP)/libcurl/staged" \
1850 --enable-fileinfo \
1851 --without-gettext \
1852 --enable-dom \
1853 --enable-exif \
1854 --disable-ftp \
1855 --without-gmp \
1856 --with-gd \
1857 --with-png-dir="$(TOP)/libpng/staged/usr" \
1858 --with-jpeg-dir="$(TOP)/jpeg/staged" \
1859 --enable-hash \
1860 --with-iconv="$(TOP)/libiconv/staged/usr" \
1861 --with-iconv-dir="$(TOP)/libiconv/staged/usr" \
1862 --enable-json \
1863 --without-ldap \
1864 --enable-mbstring \
1865 --without-mcrypt \
1866 --without-openssl \
1867 --disable-pcntl \
1868 --without-mysqli \
1869 --with-mysql \
1870 --with-mysql-sock="/var/run/mysqld.sock" \
1871 --with-pdo-mysql \
1872 --without-pdo-pgsql \
1873 --with-pdo-sqlite \
1874 --enable-pdo \
1875 --without-pgsql \
1876 --enable-session \
1877 --disable-shmop \
1878 --enable-simplexml \
1879 --disable-soap \
1880 --disable-sockets \
1881 --with-sqlite3 \
1882 --disable-sysvmsg \
1883 --disable-sysvsem \
1884 --disable-sysvshm \
1885 --disable-tokenizer \
1886 --enable-xml \
1887 --enable-xmlreader \
1888 --enable-xmlwriter \
1889 --enable-zip \
1890 --disable-filter \
1891 --with-libxml-dir="$(TOP)/libxml2/staged/usr"
1892 @touch php/stamp-h1
1894 php: php/stamp-h1
1895 @$(SEP)
1896 @$(MAKE) -C php
1898 php-clean:
1899 -@$(MAKE) -C php clean
1900 -@rm php/stamp-h1
1902 php-install: php
1903 @$(SEP)
1904 install -d $(INSTALLDIR)/php/usr/sbin
1905 install -D php/sapi/cli/.libs/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1906 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1907 install -D php/sapi/cgi/.libs/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1908 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1909 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1911 nginx/stamp-h1: openssl zlib pcre
1912 @$(SEP)
1913 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1914 --prefix=/usr \
1915 --sbin-path=/usr/sbin \
1916 --conf-path=/etc/nginx/nginx.conf \
1917 --error-log-path=/tmp/var/log/nginx/error.log \
1918 --http-log-path=/tmp/var/log/nginx/access.log \
1919 --pid-path=/tmp/var/run/nginx.pid \
1920 --lock-path=/tmp/var/run/nginx.lock.accept \
1921 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1922 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1923 --with-http_flv_module \
1924 --with-http_ssl_module \
1925 --with-http_gzip_static_module \
1926 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1927 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1928 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1929 --with-cc="$(CC)" \
1930 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1931 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1932 $(ADDITIONAL_MODULES)
1934 nginx: nginx/stamp-h1
1935 @$(SEP)
1936 @$(MAKE) -C nginx
1938 nginx-clean:
1939 -@$(MAKE) -C nginx clean
1940 -@rm -f nginx/stamp-h1
1942 nginx-install: nginx
1943 install -d $(INSTALLDIR)/nginx/usr/sbin
1944 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1945 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1947 libncurses/stamp-h1:
1948 cd libncurses && CC=$(CC) \
1949 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC" \
1950 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1951 LIBS="-lstdc++" \
1952 $(CONFIGURE) --prefix=/usr --with-shared --with-normal --disable-debug --without-ada --without-manpages --without-progs --without-tests
1953 touch libncurses/stamp-h1
1955 libncurses: libncurses/stamp-h1
1956 @$(SEP)
1957 $(MAKE) -C libncurses $(PARALLEL_BUILD)
1958 $(MAKE) -C libncurses DESTDIR=$(TOP)/libncurses/staged install
1960 libncurses-clean:
1961 -@$(MAKE) -C libncurses clean
1962 @rm -f libncurses/stamp-h1 libncurses/Makefile
1963 @rm -rf libncurses/staged
1965 libncurses-install: libncurses
1966 install -d $(INSTALLDIR)/libncurses/usr/lib
1967 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo
1968 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1969 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1970 install -d $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1971 install -D -m 0644 libncurses/staged/usr/share/terminfo/l/linux $(INSTALLDIR)/libncurses/usr/share/terminfo/l
1972 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt100 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1973 install -D -m 0644 libncurses/staged/usr/share/terminfo/v/vt220 $(INSTALLDIR)/libncurses/usr/share/terminfo/v
1974 install -D -m 0644 libncurses/staged/usr/share/terminfo/x/xterm $(INSTALLDIR)/libncurses/usr/share/terminfo/x
1975 cd $(INSTALLDIR)/libncurses/usr/lib && ln -sf ../share/terminfo terminfo
1976 install libncurses/lib/libncurses.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1977 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libncurses.so.5
1978 install libncurses/lib/libpanel.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1979 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libpanel.so.5
1980 install libncurses/lib/libform.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1981 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libform.so.5
1982 install libncurses/lib/libmenu.so.5.9 $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1983 $(STRIP) $(INSTALLDIR)/libncurses/usr/lib/libmenu.so.5
1984 cd $(INSTALLDIR)/libncurses/usr/lib/ && \
1985 ln -sf libncurses.so.5 libncurses.so && \
1986 ln -sf libpanel.so.5 libpanel.so && \
1987 ln -sf libform.so.5 libform.so && \
1988 ln -sf libmenu.so.5 libmenu.so
1990 mysql/stamp-h1: openssl zlib libncurses
1991 @$(SEP)
1992 cd mysql && cp -f configure.mipsel configure && \
1993 CFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1994 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1995 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1996 CPPFLAGS="-O2 -Wall -fno-delete-null-pointer-checks -funit-at-a-time --param large-function-growth=800 \
1997 --param max-inline-insns-single=3000 -ffunction-sections -fdata-sections -I$(TOP)/zlib \
1998 -I$(TOP)/openssl/include -I$(TOP)/libncurses/include" \
1999 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/zlib/staged/usr/lib -L$(TOP)/libncurses/lib -fPIC -EL" \
2000 LIBS="-lcrypt -lz -lstdc++ -lssl -lcrypto -lncurses" \
2001 $(CONFIGURE) --prefix=/usr \
2002 --without-debug --without-docs --without-man --with-charset=utf8 --with-extra-charsets=ascii,latin1,gb2312,gbk \
2003 --enable-shared --disable-static \
2004 --without-mysqlmanager \
2005 --with-pthread \
2006 --with-ssl \
2007 --without-docs \
2008 --with-geometry \
2009 --with-low-memory \
2010 --enable-assembler \
2011 --with-zlib-dir="$(TOP)/zlib/staged/usr" \
2012 ac_cv_c_stack_direction=-1
2013 cd mysql && tar xvfz .host.tgz
2014 # Update time of config.status to avoid run 'config.status --recheck'
2015 touch mysql/config.status
2016 # Update time of Makefile to avoid regenerate it when do make
2017 sleep 5
2018 -find mysql -name Makefile -print | xargs -i touch {}
2019 touch mysql/stamp-h1
2021 mysql: mysql/stamp-h1
2022 @$(SEP)
2023 @$(MAKE) -C mysql
2024 @$(MAKE) -C mysql DESTDIR=$(TOP)/mysql/staged install
2026 mysql-clean:
2027 -@$(MAKE) -C mysql clean
2028 -@rm -f mysql/stamp-h1
2029 -@rm -rf mysql/staged mysql/host
2031 mysql-install:
2032 install -d $(INSTALLDIR)/mysql/usr/bin
2033 install -d $(INSTALLDIR)/mysql/usr/lib
2034 install -d $(INSTALLDIR)/mysql/usr/libexec
2035 install -d $(INSTALLDIR)/mysql/usr/lib/mysql
2036 install -d $(INSTALLDIR)/mysql/usr/lib/mysql/plugin
2037 install -d $(INSTALLDIR)/mysql/usr/share
2038 install -d $(INSTALLDIR)/mysql/usr/share/mysql
2039 install -D -m 755 mysql/mycheck $(INSTALLDIR)/mysql/usr/bin
2040 install -D -m 755 mysql/staged/usr/bin/my_print_defaults $(INSTALLDIR)/mysql/usr/bin
2041 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/my_print_defaults
2042 install -D -m 755 mysql/staged/usr/bin/myisamchk $(INSTALLDIR)/mysql/usr/bin
2043 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/myisamchk
2044 install -D -m 755 mysql/staged/usr/bin/mysql $(INSTALLDIR)/mysql/usr/bin
2045 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysql
2046 install -D -m 755 mysql/staged/usr/bin/mysql_install_db $(INSTALLDIR)/mysql/usr/bin
2047 install -D -m 755 mysql/staged/usr/bin/mysqladmin $(INSTALLDIR)/mysql/usr/bin
2048 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqladmin
2049 install -D -m 755 mysql/staged/usr/bin/mysqldump $(INSTALLDIR)/mysql/usr/bin
2050 $(STRIP) $(INSTALLDIR)/mysql/usr/bin/mysqldump
2051 install -D -m 755 mysql/staged/usr/libexec/mysqld $(INSTALLDIR)/mysql/usr/libexec
2052 $(STRIP) $(INSTALLDIR)/mysql/usr/libexec/mysqld
2053 cd $(INSTALLDIR)/mysql/usr/bin && ln -sf ../libexec/mysqld mysqld
2054 # install -D -m 755 mysql/staged/usr/bin/mysqld_safe $(INSTALLDIR)/mysql/usr/bin
2055 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2056 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient.so.16.0.0
2057 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2058 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so.16 && \
2059 ln -sf libmysqlclient.so.16.0.0 libmysqlclient.so
2060 install -D -m 755 mysql/staged/usr/lib/mysql/libmysqlclient_r.so.16.0.0 $(INSTALLDIR)/mysql/usr/lib/mysql
2061 $(STRIP) $(INSTALLDIR)/mysql/usr/lib/mysql/libmysqlclient_r.so.16.0.0
2062 -@cd $(INSTALLDIR)/mysql/usr/lib/mysql && \
2063 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so.16 && \
2064 ln -sf libmysqlclient_r.so.16.0.0 libmysqlclient_r.so
2065 # -@cd $(INSTALLDIR)/mysql/usr/lib/mysql/plugin && cp -arfpu $(TOP)/mysql/staged/usr/lib/mysql/plugin/* . && \
2066 # rm -f *.la *.a && \
2067 # $(STRIP) *.so.*
2068 -@cd $(INSTALLDIR)/mysql/usr/share/mysql && \
2069 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/english . && \
2070 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/fill_help_tables.sql . && \
2071 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables.sql . && \
2072 cp -arfpu $(TOP)/mysql/staged/usr/share/mysql/mysql_system_tables_data.sql .
2074 lzo/stamp-h1:
2075 cd lzo && \
2076 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
2077 touch lzo/stamp-h1
2079 lzo: lzo/stamp-h1
2080 @$(MAKE) -C lzo $(PARALLEL_BUILD)
2082 lzo-clean:
2083 -@$(MAKE) -C lzo clean
2084 @rm -f lzo/stamp-h1
2086 lzo-install: lzo
2087 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2088 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2.0.0
2089 cd $(INSTALLDIR)/lzo/usr/lib && \
2090 ln -sf liblzo2.so.2.0.0 liblzo2.so.2 && \
2091 ln -sf liblzo2.so.2.0.0 liblzo2.so
2093 openvpn/.conf: openssl lzo
2094 cd openvpn && autoreconf && \
2095 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2096 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
2097 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
2098 $(CONFIGURE) --prefix= \
2099 --with-crypto-library=openssl \
2100 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --disable-small \
2101 --disable-selinux --disable-socks --enable-password-save \
2102 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
2103 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
2104 ac_cv_lib_resolv_gethostbyname=no
2105 touch openvpn/.conf
2107 openvpn: openvpn/.conf
2108 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
2110 openvpn-clean:
2111 -@$(MAKE) -C openvpn clean
2112 @rm -f openvpn/.conf
2114 openvpn-install: openvpn
2115 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2116 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2117 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
2119 openvpn_plugin_auth_nvram:nvram
2121 #shibby
2122 nano/stamp-h1: libncurses
2123 cd nano && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2124 CFLAGS="-O3 -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2125 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -I$(TOP)/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
2126 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libncurses/staged/usr/lib -fPIC" \
2127 ac_cv_lib_ncursesw_get_wch=no \
2128 $(CONFIGURE) --prefix=/usr --disable-nls --enable-all --without-libiconv-prefix --disable-utf8
2129 touch nano/stamp-h1
2131 nano: nano/stamp-h1
2132 @$(MAKE) -C nano $(PARALLEL_BUILD)
2134 nano-clean:
2135 -@$(MAKE) -C nano clean
2136 @rm -f nano/stamp-h1 nano/Makefile nano/src/Makefile
2138 nano-install: nano
2139 install -d $(INSTALLDIR)/nano/usr/sbin
2140 install -D nano/src/nano $(INSTALLDIR)/nano/usr/sbin/nano
2141 $(STRIP) -s $(INSTALLDIR)/nano/usr/sbin/nano
2143 libcurl/stamp-h1: zlib openssl
2144 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2145 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
2146 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2147 $(CONFIGURE) --prefix=$(TOP)/libcurl/staged --disable-thread --enable-shared --enable-static \
2148 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
2149 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
2150 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
2151 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
2152 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
2153 --without-gnutls --without-krb4 --without-libidn \
2154 --with-linux-headers=$(LINUXDIR)/include \
2155 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2156 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
2157 touch libcurl/stamp-h1
2159 libcurl: libcurl/stamp-h1
2160 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
2161 @$(MAKE) -C libcurl install
2163 libcurl-clean:
2164 -@$(MAKE) -C libcurl clean
2165 @rm -f libcurl/stamp-h1 libcurl/Makefile
2166 @rm -rf libcurl/staged
2168 libcurl-install: libcurl
2169 install -d $(INSTALLDIR)/libcurl/usr/sbin
2170 install -D libcurl/src/.libs/curl $(INSTALLDIR)/libcurl/usr/sbin/curl
2171 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/sbin/curl
2172 install -d $(INSTALLDIR)/libcurl/usr/lib
2173 install -D libcurl/lib/.libs/libcurl.so.4.3.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2174 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
2175 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
2176 ln -sf libcurl.so.4.3.0 libcurl.so.4 && \
2177 ln -sf libcurl.so.4.3.0 libcurl.so
2179 libevent/stamp-h1:
2180 cd libevent && CC=$(CC) \
2181 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2182 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2183 $(CONFIGURE)
2184 touch libevent/stamp-h1
2186 libevent: libevent/stamp-h1
2187 @$(SEP)
2188 $(MAKE) -C libevent $(PARALLEL_BUILD)
2189 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
2191 libevent-clean:
2192 -@$(MAKE) -C libevent clean
2193 @rm -f libevent/stamp-h1 libevent/Makefile
2194 @rm -rf libevent/staged
2196 libevent-install: libevent
2197 install -d $(INSTALLDIR)/libevent/usr/lib
2198 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2199 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
2201 libiconv/stamp-h1:
2202 cd libiconv && CC=$(CC) \
2203 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2204 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2205 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
2206 touch libiconv/stamp-h1
2208 libiconv: libiconv/stamp-h1
2209 @$(SEP)
2210 $(MAKE) -C libiconv $(PARALLEL_BUILD)
2211 $(MAKE) -C libiconv DESTDIR=$(TOP)/libiconv/staged install
2213 libiconv-clean:
2214 -@$(MAKE) -C libiconv clean
2215 @rm -rf libiconv/stamp-h1 libiconv/Makefile
2216 @rm -rf libiconv/staged
2218 libiconv-install: libiconv
2219 install -d $(INSTALLDIR)/libiconv/usr/lib
2220 install libiconv/lib/.libs/libiconv.so.2.5.1 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2221 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.5.1
2222 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
2223 ln -sf libiconv.so.2.5.1 libiconv.so.2 && \
2224 ln -sf libiconv.so.2.5.1 libiconv.so
2226 transmission/stamp-h1: openssl libcurl libevent zlib
2227 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2228 autoreconf && \
2229 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2230 --param large-function-growth=800 --param max-inline-insns-single=3000 \
2231 -ffunction-sections -fdata-sections" \
2232 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
2233 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
2234 HAVE_CXX=yes \
2235 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
2236 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
2237 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
2238 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
2239 LIBCURL_LIBS="-lcurl" \
2240 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
2241 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
2242 LIBEVENT_LIBS="-levent" \
2243 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
2244 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
2245 OPENSSL_LIBS="-lcrypto -lssl" \
2246 ZLIB_CFLAGS="-I$(TOP)/zlib" \
2247 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
2248 ZLIB_LIBS="-lz"
2249 touch transmission/stamp-h1
2251 transmission: transmission/stamp-h1
2252 @$(SEP)
2253 $(MAKE) -C transmission $(PARALLEL_BUILD)
2255 transmission-clean:
2256 -@$(MAKE) -C transmission clean
2257 @rm -f transmission/stamp-h1 transmission/Makefile
2259 transmission-install: transmission
2260 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
2261 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
2262 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
2263 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
2264 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
2265 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
2266 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
2267 ifeq ($(TCONFIG_TR_EXTRAS),y)
2268 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2269 else
2270 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2271 endif
2273 btgui:
2274 @$(SEP)
2276 btgui-install: btgui
2277 install -d $(INSTALLDIR)/btgui/usr/bin
2278 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2280 libnfsidmap/stamp-h1:
2281 cd libnfsidmap && \
2282 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2283 ac_cv_func_malloc_0_nonnull=yes \
2284 ac_cv_func_realloc_0_nonnull=yes \
2285 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2286 touch libnfsidmap/stamp-h1
2288 libnfsidmap: libnfsidmap/stamp-h1
2289 @$(SEP)
2290 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2292 libnfsidmap-clean:
2293 -@$(MAKE) -C libnfsidmap clean
2294 @rm -f libnfsidmap/stamp-h1
2295 @rm -rf libnfsidmap/staged
2297 libnfsidmap-install: libnfsidmap
2298 install -d $(TOP)/libnfsidmap/staged
2299 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2301 portmap/stamp-h1:
2302 cd portmap \
2303 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2304 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2305 touch portmap/stamp-h1
2307 portmap: portmap/stamp-h1
2308 @$(SEP)
2309 $(MAKE) -C portmap $(PARALLEL_BUILD)
2311 portmap-clean:
2312 -@$(MAKE) -C portmap clean
2313 @rm -f portmap/stamp-h1
2315 portmap-install: portmap
2316 install -d $(INSTALLDIR)/portmap/usr/sbin
2317 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2318 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2320 e2fsprogs/stamp-h1:
2321 cd e2fsprogs && \
2322 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2323 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2324 touch e2fsprogs/stamp-h1
2326 e2fsprogs: e2fsprogs/stamp-h1
2327 @$(SEP)
2328 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2330 e2fsprogs-clean:
2331 -@$(MAKE) -C e2fsprogs clean
2332 @rm -f e2fsprogs/stamp-h1
2333 @rm -f e2fsprogs/Makefile
2334 @rm -rf e2fsprogs/staged
2336 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2337 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2338 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2339 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2340 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2341 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2342 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2343 ac_cv_func_malloc_0_nonnull=yes \
2344 ac_cv_func_realloc_0_nonnull=yes \
2345 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2346 --enable-nfsv4 --enable-nfsv3
2347 touch nfs-utils/stamp-h1
2349 nfs-utils: nfs-utils/stamp-h1
2350 @$(SEP)
2351 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2353 nfs-utils-clean:
2354 -@$(MAKE) -C nfs-utils clean
2355 @rm -f nfs-utils/stamp-h1
2357 nfs-utils-install: nfs-utils
2358 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2359 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2360 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2361 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2362 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2363 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2364 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2365 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2366 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2367 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2368 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2369 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2370 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2371 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2373 tinc/stamp-h1: openssl zlib lzo
2374 @cd tinc && autoreconf -fsi && \
2375 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
2376 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
2377 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2378 $(CONFIGURE) \
2379 --prefix=/usr \
2380 --sysconfdir=/etc \
2381 --localstatedir=/var \
2382 --with-zlib-include="$(TOP)/zlib" \
2383 --with-zlib-lib="$(TOP)/zlib" \
2384 --with-lzo-include="$(TOP)/lzo/include" \
2385 --with-lzo-lib="$(TOP)/lzo/src/.libs" \
2386 --with-openssl-include="$(TOP)/openssl/include" \
2387 --with-openssl-lib="$(TOP)/openssl" \
2388 --disable-curses \
2389 --disable-readline
2390 @touch tinc/stamp-h1
2392 tinc: tinc/stamp-h1
2393 @$(SEP)
2394 @$(MAKE) -C tinc LIBS="-lcrypto $(TOP)/zlib/libz.a -llzo2" $(PARALLEL_BUILD)
2396 tinc-clean:
2397 -@$(MAKE) -C tinc clean
2398 @rm -f tinc/stamp-h1
2400 tinc-install:
2401 install -D tinc/src/tinc $(INSTALLDIR)/tinc/usr/sbin/tinc
2402 install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
2403 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tinc
2404 $(STRIP) $(INSTALLDIR)/tinc/usr/sbin/tincd
2406 sd-idle/stamp-h1:
2407 cd sd-idle \
2408 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2409 $(MAKE) -C sd-idle
2410 chmod 0755 sd-idle/sd-idle
2411 touch sd-idle/stamp-h1
2413 sd-idle-clean:
2414 -@$(MAKE) -C sd-idle clean
2415 @rm -f sd-idle/stamp-h1
2417 sd-idle-install: sd-idle/stamp-h1
2418 install -d $(INSTALLDIR)/sd-idle/usr/bin
2419 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2420 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2422 snmp/stamp-h1:
2423 cd snmp && \
2424 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2425 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2426 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2427 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2428 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2429 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2430 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2431 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2432 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2433 touch snmp/stamp-h1
2435 snmp: snmp/stamp-h1
2436 @$(SEP)
2437 $(MAKE) -C snmp
2439 snmp-clean:
2440 -@$(MAKE) -C snmp clean
2441 @rm -f snmp/stamp-h1
2443 snmp-install: snmp
2444 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2445 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2447 apcupsd/stamp-h1:
2448 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2449 $(MAKE) configure && \
2450 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2451 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2452 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2453 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2454 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2455 touch apcupsd/stamp-h1
2457 apcupsd: apcupsd/stamp-h1
2458 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2460 apcupsd-clean:
2461 -@$(MAKE) -C apcupsd clean
2462 @rm -f apcupsd/stamp-h1
2463 @rm -f apcupsd/config*
2465 apcupsd-install: apcupsd
2466 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2467 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2468 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2469 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2470 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2472 libsodium/stamp-h1:
2473 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2474 $(CONFIGURE) --prefix=/usr --disable-ssp --enable-minimal
2475 touch libsodium/stamp-h1
2477 libsodium: libsodium/stamp-h1
2478 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2480 libsodium-install: libsodium
2481 install -d $(INSTALLDIR)/libsodium/usr/lib
2482 install -D libsodium/src/libsodium/.libs/libsodium.so.13.0.2 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.13.0.2
2483 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.13.0.2
2484 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2485 ln -sf libsodium.so.13.0.2 libsodium.so.13 && \
2486 ln -sf libsodium.so.13.0.2 libsodium.so
2488 libsodium-clean:
2489 -$(MAKE) -C libsodium clean
2490 @rm -rf libsodium/stamp-h1
2492 dnscrypt/stamp-h1: libsodium
2493 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2494 autoreconf && \
2495 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2496 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2497 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2498 $(CONFIGURE) --prefix=/usr --disable-ssp
2499 touch dnscrypt/stamp-h1
2501 dnscrypt: dnscrypt/stamp-h1
2502 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2504 dnscrypt-install: dnscrypt
2505 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2506 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2507 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2508 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2510 dnscrypt-clean:
2511 -@$(MAKE) -C dnscrypt clean
2512 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2514 tor/stamp-h1: openssl zlib libevent
2515 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2516 autoreconf && \
2517 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2518 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2519 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2520 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2521 --disable-asciidoc --disable-tool-name-check
2522 touch tor/stamp-h1
2524 tor: tor/stamp-h1
2525 $(MAKE) -C tor $(PARALLEL_BUILD)
2527 tor-install: tor
2528 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2529 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2531 tor-clean:
2532 -@$(MAKE) -C tor clean
2533 @rm -rf tor/stamp-h1 tor/Makefile
2535 udpxy/stamp-h1:
2536 cd udpxy \
2537 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2538 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2539 touch udpxy/stamp-h1
2541 udpxy-clean:
2542 -@$(MAKE) -C udpxy clean
2543 @rm -f udpxy/stamp-h1
2545 udpxy-install: udpxy/stamp-h1
2546 install -d $(INSTALLDIR)/udpxy/usr/bin
2547 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2548 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2550 mdadm:
2551 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2553 mdadm-install: mdadm
2554 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2555 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2557 mdadm-clean:
2558 -@$(MAKE) -C mdadm clean
2560 ipset:
2561 $(MAKE) -C ipset binaries
2563 ipset-install: ipset
2564 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2565 install -d $(INSTALLDIR)/ipset/usr/lib/
2566 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2567 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2568 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2570 ipset-clean:
2571 -@$(MAKE) -C ipset clean
2573 comgt:
2574 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2576 comgt-install: comgt
2577 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2578 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2579 ln -sf comgt gcom
2580 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2581 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2582 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2584 comgt-clean:
2585 -@$(MAKE) -C comgt clean
2588 # Generic rules
2592 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2595 %-clean:
2596 @-[ ! -d $* ] || $(MAKE) -C $* clean
2598 %-distclean:
2599 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2601 %-install: %
2602 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2604 %-build:
2605 $(MAKE) $*-clean $*
2607 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2609 .PHONY: all clean distclean mrproper install package
2610 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2611 .PHONY: dummy libnet libpcap