Merge remote-tracking branch 'origin/tomato-shibby-RT-AC' into arrmo-RT-AC
[tomato.git] / release / src / router / Makefile
blob1710591e5dcc6e47fda0ce8c384baccb32c89b86
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 += bridge
42 obj-y += dnsmasq
43 obj-y += etc
44 # obj-y += vlan # use Busybox vconfig
45 obj-y += pppd
46 obj-y += rp-pppoe
47 obj-y += utils
48 obj-y += ntpc
49 obj-y += rstats
50 obj-y += cstats
51 obj-y += udpxy
52 obj-$(TCONFIG_TOR) += tor
53 obj-$(TCONFIG_TOR) += libevent
54 obj-$(TCONFIG_TOR) += zlib
55 obj-$(TCONFIG_DNSCRYPT) += libsodium
56 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
57 obj-$(TCONFIG_SNMP) += snmp
58 obj-$(TCONFIG_SDHC) += mmc
60 # !!TB - updated Broadcom Wireless driver
61 obj-y += et
62 obj-y += libbcmcrypto
63 obj-y += wlconf
65 obj-y += cyassl
66 obj-y += mssl
67 obj-y += mdu
68 obj-$(TCONFIG_RAID) += mdadm
70 obj-$(TCONFIG_NFS) += portmap
71 obj-$(TCONFIG_NFS) += e2fsprogs
72 obj-$(TCONFIG_NFS) += libevent
73 obj-$(TCONFIG_NFS) += libnfsidmap
74 obj-$(TCONFIG_NFS) += nfs-utils
76 #Roadkill
77 obj-$(TCONFIG_NOCAT) += nocat
79 # !!TB
80 obj-$(TCONFIG_USB) += p910nd
81 obj-$(TCONFIG_USB) += comgt
83 obj-$(TCONFIG_UPS) += apcupsd
85 ifeq ($(CONFIG_LINUX26),y)
86 obj-$(TCONFIG_USB) += sd-idle
87 else
88 obj-$(TCONFIG_USB) += scsi-idle
89 endif
91 obj-y += libusb10
92 #obj-y += libusb
93 obj-y += usbmodeswitch
94 obj-$(TCONFIG_FTP) += vsftpd
96 ifeq ($(CONFIG_LINUX26),y)
97 ifeq ($(TCONFIG_SAMBASRV),y)
98 NEED_EX_NLS = y
99 endif
100 ifeq ($(TCONFIG_USB_EXTRAS),y)
101 NEED_EX_USB = y
102 endif
103 ifeq ($(TCONFIG_MICROSD),y)
104 NEED_SD_MODULES = y
105 endif
106 endif
108 ifeq ($(TCONFIG_SAMBASRV),y)
109 ifeq ($(TCONFIG_SAMBA3),y)
110 NEED_SAMBA3 = y
111 else
112 NEED_SAMBA2 = y
113 endif
114 endif
116 ifeq ($(TCONFIG_IPV6),y)
117 export TCONFIG_IPV6 := y
118 else
119 TCONFIG_IPV6 :=
120 endif
122 ifeq ($(TCONFIG_IPSEC),y)
123 export TCONFIG_IPSEC := y
124 else
125 TCONFIG_IPSEC :=
126 endif
128 ifeq ($(TCONFIG_RAID),y)
129 export TCONFIG_RAID := y
130 else
131 TCONFIG_RAID :=
132 endif
134 obj-$(NEED_SAMBA2) += samba
135 obj-$(NEED_SAMBA3) += samba3
137 ifeq ($(CONFIG_BCMWL6),y)
138 ifeq ($(TCONFIG_UFSD),y)
139 obj-$(TCONFIG_NTFS) += ufsd
140 else
141 obj-$(TCONFIG_NTFS) += ntfs-3g
142 endif
143 else
144 obj-$(TCONFIG_NTFS) += ntfs-3g
145 endif
147 obj-$(TCONFIG_EBTABLES) += ebtables
148 #obj-$(TCONFIG_IPV6) += libdaemon
149 #obj-$(TCONFIG_IPV6) += radvd
150 obj-$(TCONFIG_IPV6) += dhcpv6
152 obj-$(TCONFIG_MEDIA_SERVER) += zlib
153 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
154 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
155 #obj-$(TCONFIG_MEDIA_SERVER) += libiconv
156 obj-$(TCONFIG_MEDIA_SERVER) += libogg
157 obj-$(TCONFIG_MEDIA_SERVER) += flac
158 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
159 obj-$(TCONFIG_MEDIA_SERVER) += libexif
160 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
161 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
162 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
163 MEDIA_SERVER_STATIC=y
164 #MEDIA_SERVER_STATIC :=
166 #obj-y += libnfnetlink
167 obj-y += miniupnpd
168 # obj-y += upnp
169 obj-$(CONFIG_LINUX26) += ipset
173 # configurable packages
175 obj-$(TCONFIG_L2TP) += xl2tpd
176 obj-$(TCONFIG_PPTP) += accel-pptp
177 obj-$(TCONFIG_PPTPD) += pptpd
178 obj-$(TCONFIG_HTTPS) += openssl
179 obj-$(TCONFIG_SSH) += dropbear
180 obj-$(TCONFIG_ZEBRA) += zebra
181 # obj-$(TCONFIG_IPP2P) += ipp2p
182 obj-$(TCONFIG_LZO) += lzo
183 obj-$(TCONFIG_OPENVPN) += openvpn
184 obj-$(TCONFIG_OPENVPN) += openvpn_plugin_auth_nvram
185 obj-$(TCONFIG_EMF) += emf
186 obj-$(TCONFIG_EMF) += igs
188 # Tomato RAF
189 # additional modules for nginx
190 ifeq (obj-$(TCONFIG_NGINX),y)
191 ifndef ($(ADDITIONAL_MODULES))
192 ADDITIONAL_MODULES:=
193 else
194 ifeq ($(TCONFIG_IPV6),y)
195 ADDITIONAL_MODULES += --with-ipv6
196 endif
197 endif
198 endif
199 obj-$(TCONFIG_NGINX) += openssl
200 obj-$(TCONFIG_NGINX) += spawn-fcgi
201 obj-$(TCONFIG_NGINX) += pcre
202 obj-$(TCONFIG_NGINX) += php
203 obj-$(TCONFIG_NGINX) += nginx
205 obj-$(TCONFIG_BBT) += openssl
206 obj-$(TCONFIG_BBT) += libevent
207 obj-$(TCONFIG_BBT) += libcurl
208 obj-$(TCONFIG_BBT) += transmission
209 obj-$(TCONFIG_BT) += btgui
210 obj-$(TCONFIG_BBT) += zlib
211 #obj-$(TCONFIG_BBT) += libiconv
213 obj-$(CONFIG_LINUX26) += hotplug2
214 obj-$(CONFIG_LINUX26) += udevtrigger
216 ifeq ($(TCONFIG_OPENVPN),y)
217 export FULL_OPENSSL := y
218 else
219 ifeq ($(TCONFIG_FTP_SSL),y)
220 export FULL_OPENSSL := y
221 else
222 ifeq ($(TCONFIG_BBT),y)
223 export FULL_OPENSSL := y
224 else
225 ifeq ($(TCONFIG_TOR),y)
226 export FULL_OPENSSL := y
227 else
228 FULL_OPENSSL :=
229 endif
230 endif
231 endif
232 endif
234 obj-y += wanuptime
236 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
237 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
242 # Basic rules
245 all: clean-build libc $(obj-y) kernel
248 kernel: $(LINUXDIR)/.config
249 @$(SEP)
251 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
252 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC) $(PARALLEL_BUILD); \
254 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
255 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD); \
257 ifeq ($(CONFIG_LINUX26),y)
258 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR) $(PARALLEL_BUILD)
259 endif
262 lzma-loader:
263 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD) $(PARALLEL_BUILD)
265 lzma-loader-install: lzma-loader
266 @$(SEP)
269 kmod: dummy
270 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC) $(PARALLEL_BUILD)
272 testfind:
273 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
274 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
276 install package: $(obj-install) $(LINUXDIR)/.config
277 @$(SEP)
279 install -d $(TARGETDIR)
282 # kernel modules
283 $(MAKE) -C $(LINUXDIR) modules_install \
284 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" \
285 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
287 ifneq ($(CONFIG_LINUX26),y)
288 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
289 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
290 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
291 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
292 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
293 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
294 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
296 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
297 endif
299 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
301 # nice and clean
302 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
303 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
304 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
305 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
306 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
307 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
308 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
309 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
310 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
311 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
313 ##!!TB
314 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
315 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
317 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
318 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
319 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
320 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
321 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
322 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
323 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
324 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
325 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
326 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
327 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
328 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
329 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
330 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
331 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
332 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
333 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
334 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
335 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
336 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
337 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
338 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
339 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
340 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
341 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
342 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
343 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
344 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
345 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
346 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
347 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv core/* . && rm -rf core || true
348 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv card/* . && rm -rf card || true
349 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc && mv host/* . && rm -rf host || true
350 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
351 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
352 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
353 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
354 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
355 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
356 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
357 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
358 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
359 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
360 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
361 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
363 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
364 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
365 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
366 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
367 cd $(TARGETDIR)/lib/modules && rm -f */source || true
369 # misc
370 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
371 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
372 done
374 ifneq ($(TCONFIG_L7),y)
375 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
376 endif
378 # uClibc
379 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
380 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
381 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
382 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
383 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
384 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
385 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
386 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
387 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
388 ifeq ($(TCONFIG_SSH),y)
389 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
390 endif
391 ifeq ($(TCONFIG_BBT),y)
392 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
393 endif
394 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
395 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
396 $(STRIP) $(TARGETDIR)/lib/*.so.0
397 endif
399 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
401 @echo ---
403 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
404 @$(SRCBASE)/btools/libfoo.pl
405 else
406 @$(SRCBASE)/btools/libfoo.pl --noopt
407 endif
408 @chmod 0555 $(TARGETDIR)/lib/*.so*
409 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
411 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
412 # separated/copied extra stuff
413 @rm -rf $(PLATFORMDIR)/extras
414 @mkdir $(PLATFORMDIR)/extras
415 @mkdir $(PLATFORMDIR)/extras/ipsec
416 @mkdir $(PLATFORMDIR)/extras/raid
417 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
418 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ipsec/ || true
420 $(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
421 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/usr/sbin/mdadm $(PLATFORMDIR)/extras/raid/ || true
424 $(if $(TCONFIG_RAID),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/md/*.ko $(PLATFORMDIR)/extras/raid/ || true
425 $(if $(TCONFIG_RAID),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/md || true
427 @cp $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ip_set*o $(PLATFORMDIR)/extras/ || true
428 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
429 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
430 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
431 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
432 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
433 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
436 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
438 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
439 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
440 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
441 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
442 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
443 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
445 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
446 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
447 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
448 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
449 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
450 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
451 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
452 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
453 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
454 $(if $(NEED_SD_MODULES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc/*.*o $(PLATFORMDIR)/extras/ || true
455 $(if $(NEED_SD_MODULES),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/drivers/mmc || true
457 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
458 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
459 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
460 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
461 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
462 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
463 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
464 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
465 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
466 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
467 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
468 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
469 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
470 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
471 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
472 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
473 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
474 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
475 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
476 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
477 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
478 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
479 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
480 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
481 $(if $(TCONFIG_CTF),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
482 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
483 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
484 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
485 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
486 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
487 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
488 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
489 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ipsec/ || true
490 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
491 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ipsec/ || true
492 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ipsec/ || true
493 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ipsec/ || true
494 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
495 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ipsec/ || true
496 # $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ipsec/ || true
498 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
499 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
500 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
501 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
502 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
503 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
504 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
506 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
507 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
508 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
509 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
510 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
511 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
512 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
513 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
514 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
515 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
516 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
517 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
518 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
519 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
521 ifneq ($(TCONFIG_USB),y)
522 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
523 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
524 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
525 endif
527 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
528 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
529 ifneq ($(TCONFIG_USB_EXTRAS),y)
530 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
531 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
532 endif
533 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
534 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
535 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
536 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
537 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
538 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
539 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
541 @mkdir -p $(PLATFORMDIR)/extras/apps
542 @mkdir -p $(PLATFORMDIR)/extras/lib
544 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
545 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
546 @cp -r $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
548 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
549 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
550 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
551 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
552 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
553 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
554 ifneq ($(NEED_EX_USB),y)
555 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
556 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
557 endif
558 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
560 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
561 ifeq ($(TCONFIG_L7PAT),y)
562 @cd layer7 && ./squish.sh
563 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
564 endif
566 ifeq ($(TCONFIG_PPTPD),y)
567 @mkdir -p $(TARGETDIR)/rom/etc/vpn
568 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
569 chmod +x $(TARGETDIR)/rom/etc/vpn/*
570 endif
572 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
573 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
574 @echo ---
576 @rm -f $(TARGETDIR)/lib/modules/*/build
578 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
579 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -no-duplicates | tee target.info
581 # Package kernel and filesystem
582 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
583 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
584 # $(MAKE) -C $(LINUXDIR) zImage ; \
585 # else \
586 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
587 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
588 # fi
590 # Pad self-booting Linux to a 64 KB boundary
591 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
592 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
593 # Append filesystem to self-booting Linux
594 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
597 libc: $(LIBDIR)/ld-uClibc.so.0
598 # $(MAKE) -C ../../../tools-src/uClibc all
599 # $(MAKE) -C ../../../tools-src/uClibc install
603 # cleaners
606 clean: clean-build $(obj-clean)
607 rm -rf layer7/squished
608 rm -f .ipv6-y .ipv6-n
609 rm -f .fullssl-y .fullssl-n
610 make -C config clean
612 clean-build: dummy
613 rm -rf $(TARGETDIR)
614 rm -rf $(INSTALLDIR)
615 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
616 rm -rf $(PLATFORMDIR)/extras
618 distclean: clean
619 ifneq ($(INSIDE_MAK),1)
620 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
621 endif
622 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
625 # configuration
628 CONFIG_IN := config/config.in
630 config/conf config/mconf:
631 @$(MAKE) -C config
633 rconf: config/conf
634 @config/conf $(CONFIG_IN)
636 rmconf: config/mconf
637 @config/mconf $(CONFIG_IN)
639 roldconf: config/conf
640 @config/conf -o $(CONFIG_IN)
641 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
643 kconf:
644 @$(MAKE) -C $(LINUXDIR) config
646 kmconf:
647 @$(MAKE) -C $(LINUXDIR) menuconfig
649 koldconf:
650 @$(MAKE) -C $(LINUXDIR) oldconfig
651 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
653 bboldconf:
654 @$(MAKE) -C busybox oldconfig
656 config conf: rconf kconf
658 menuconfig mconf: rmconf kmconf
660 .ipv6-y .ipv6-n:
661 @rm -f .ipv6-y .ipv6-n
662 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
663 @touch $@
665 .fullssl-y .fullssl-n:
666 @rm -f .fullssl-y .fullssl-n
667 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
668 @touch $@
670 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
672 oldconfig oldconf: koldconf roldconf dependconf bboldconf
676 # overrides and extra dependencies
679 busybox: dummy
680 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" $(PARALLEL_BUILD)
682 busybox-install:
683 rm -rf $(INSTALLDIR)/busybox
684 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
686 busybox-clean:
687 -@$(MAKE) -C busybox distclean
689 busybox-config:
690 $(MAKE) -C busybox menuconfig
693 httpd: shared nvram mssl
694 @$(SEP)
695 @$(MAKE) -C httpd
697 www-install:
698 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
700 matrixssl:
701 @$(SEP)
702 @$(MAKE) -C matrixssl/src
704 matrixssl-install:
705 @true
707 matrixssl-clean:
708 -@$(MAKE) -C matrixssl/src clean
710 cyassl/stamp-h1:
711 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
712 CFLAGS="-Os -Wall -fPIC $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
713 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
714 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
715 PTHREAD_LIBS="-lpthread" \
716 $(CONFIGURE)
717 @touch cyassl/stamp-h1
719 cyassl: cyassl/stamp-h1
720 @$(SEP)
721 @$(MAKE) -C cyassl
723 cyassl-clean:
724 -@$(MAKE) -C cyassl clean
725 @rm -f cyassl/stamp-h1
727 cyassl-install:
728 @true
730 ifeq ($(FULL_OPENSSL),y)
731 OPENSSL_CIPHERS:=enable-rc5
732 else
733 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-engine no-aes192 no-cast
734 endif
736 openssl/stamp-h1:
737 cd openssl && \
738 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
739 -ffunction-sections -fdata-sections -Wl,--gc-sections \
740 shared $(OPENSSL_CIPHERS) \
741 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
742 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
743 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
744 no-zlib no-engines no-sse2 \
745 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
747 @$(MAKE) -C openssl clean
748 @touch openssl/stamp-h1
750 openssl: openssl/stamp-h1
752 openssl-clean:
753 -@$(MAKE) -C openssl clean
754 @rm -f openssl/stamp-h1
756 openssl-install: openssl
757 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
758 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
759 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
761 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
762 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
763 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
765 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
767 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
768 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
770 ifeq ($(FULL_OPENSSL),y)
771 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
772 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
773 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
774 endif
776 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
778 mdu: shared mssl
780 rc: nvram shared
782 bridge/Makefile:
783 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
784 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
786 bridge: bridge/Makefile
787 @$(SEP)
788 @$(MAKE) -C bridge
790 bridge-clean:
791 -@$(MAKE) -C bridge clean
792 @rm -f bridge/Makefile
794 bridge-install:
795 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
796 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
798 dnsmasq: $(if $(TCONFIG_DNSSEC),nettle,)
799 @$(SEP)
800 @$(MAKE) -C dnsmasq $(PARALLEL_BUILD) \
801 COPTS="$(if $(TCONFIG_DNSSEC),-I$(TOP)/nettle/include -I$(TOP)/gmp -DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC,) \
802 $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) \
803 $(if $(CONFIG_LINUX26),-DUSE_IPSET,-DNO_IPSET) \
804 -DHAVE_BROKEN_RTC -DHAVE_TOMATO $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
805 LDFLAGS="$(if $(TCONFIG_DNSSEC),-L$(TOP)/nettle/lib -L$(TOP)/gmp/.libs,) -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
806 $(if $(TCONFIG_DNSSEC),PKG_CONFIG_PATH="$(TOP)/nettle/lib/pkgconfig",)
808 dnsmasq-install:
809 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
810 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
812 nettle/stamp-h1: gmp
813 @cd nettle && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
814 CPPFLAGS="-I$(TOP)/gmp" \
815 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
816 LDFLAGS="-L$(TOP)/gmp/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
817 $(CONFIGURE) prefix=$(TOP)/nettle
818 @touch nettle/stamp-h1
820 nettle: nettle/stamp-h1
821 @$(SEP)
822 @$(MAKE) -C nettle
823 @$(MAKE) -C nettle install
825 nettle-clean:
826 -@$(MAKE) -C nettle clean
827 @rm -f nettle/stamp-h1
828 @rm -rf nettle/include nettle/lib nettle/bin nettle/share
830 gmp/stamp-h1:
831 @cd gmp && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
832 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
833 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
834 $(CONFIGURE)
835 @touch gmp/stamp-h1
837 gmp: gmp/stamp-h1
838 @$(SEP)
839 @$(MAKE) -C gmp
841 gmp-clean:
842 @$(MAKE) -C gmp clean
843 @rm -f gmp/stamp-h1
845 iptables:
846 ifeq ($(CONFIG_LINUX26),y)
847 cp -f iptables/extensions/libipt_ipp2p_K26.c iptables/extensions/libipt_ipp2p.c
848 else
849 cp -f iptables/extensions/libipt_ipp2p_K24.c iptables/extensions/libipt_ipp2p.c
850 endif
851 @$(SEP)
852 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
854 iptables-install:
855 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
856 cd $(INSTALLDIR)/iptables/usr/sbin && \
857 ln -sf iptables iptables-restore && \
858 ln -sf iptables iptables-save
860 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
861 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
863 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
865 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
866 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
867 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
869 ifeq ($(TCONFIG_IPV6),y)
870 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
871 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
872 cd $(INSTALLDIR)/iptables/usr/sbin && \
873 ln -sf ip6tables ip6tables-restore && \
874 ln -sf ip6tables ip6tables-save
875 endif
877 iptables-clean:
878 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
880 ppp:
881 @$(SEP)
882 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,) $(PARALLEL_BUILD)
883 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
885 ppp-%:
886 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
888 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
889 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
890 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
891 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
892 @touch rp-pppoe/src/stamp-h1
894 rp-pppoe: pppd rp-pppoe/src/stamp-h1
895 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so $(PARALLEL_BUILD)
897 rp-pppoe-clean:
898 -@$(MAKE) -C rp-pppoe/src clean
899 @rm -f rp-pppoe/src/pppoe-relay
900 @rm -f rp-pppoe/src/stamp-h1
902 rp-pppoe-install: rp-pppoe
903 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
904 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
905 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
906 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
909 upnp: nvram shared iptables
911 libnfnetlink/stamp-h1:
912 cd $(TOP)/libnfnetlink && CC=$(CC) STRIP='mipsel-uclibc-strip' \
913 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
914 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
915 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
916 touch libnfnetlink/stamp-h1
918 libnfnetlink: libnfnetlink/stamp-h1
919 @$(SEP)
920 $(MAKE) -C libnfnetlink
922 libnfnetlink-install:
923 install -D libnfnetlink/src/.libs/libnfnetlink.so.0.2.0 $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
924 $(STRIP) -s $(INSTALLDIR)/libnfnetlink/usr/lib/libnfnetlink.so.0.2.0
925 cd $(INSTALLDIR)/libnfnetlink/usr/lib/ && \
926 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so.0 && \
927 ln -sf libnfnetlink.so.0.2.0 libnfnetlink.so
929 miniupnpd-config:
930 #ifeq ($(TCONFIG_IPV6),y)
931 # @cd miniupnpd && ./genconfig.sh --leasefile --ipv6
932 #else
933 @cd miniupnpd && ./genconfig.sh --leasefile
934 #endif
936 miniupnpd: iptables miniupnpd-config
937 @$(SEP)
938 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux CC=$(CC) \
939 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
940 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS="" $(PARALLEL_BUILD)
942 miniupnpd-clean:
943 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
944 @rm -f miniupnpd/config.h
946 miniupnpd-install:
947 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
948 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
950 # !!TB
951 shared: busybox
953 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
954 @$(SEP)
955 $(MAKE) -C vsftpd $(PARALLEL_BUILD)
957 vsftpd-install: vsftpd
958 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
959 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
961 ufsd: kernel_header kernel
962 @$(MAKE) -C ufsd all
964 ufsd-install: ufsd
965 @$(MAKE) -C ufsd install INSTALLDIR=$(INSTALLDIR)/ufsd
967 ntfs-3g/Makefile:
968 cd ntfs-3g && \
969 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
970 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
971 $(CONFIGURE) --enable-shared=no --enable-static=no \
972 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
973 --disable-ntfsprogs --disable-crypto --without-uuid \
974 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
976 ntfs-3g: ntfs-3g/Makefile
977 @$(MAKE) -C ntfs-3g $(PARALLEL_BUILD)
979 ntfs-3g-clean:
980 -@$(MAKE) -C ntfs-3g clean
981 @rm -f ntfs-3g/Makefile
983 ntfs-3g-install: ntfs-3g
984 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
985 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
986 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
987 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
988 ln -sf ../bin/ntfs-3g mount.ntfs
990 libusb10/Makefile: libusb10/Makefile.in
991 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
992 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
994 libusb10: libusb10/Makefile
995 $(MAKE) -C $@
997 libusb10-install: libusb10
998 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
999 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
1001 libusb10-clean:
1002 -@$(MAKE) -C $@ clean
1003 @rm -rf libusb10/Makefile
1005 libusb/Makefile: libusb/Makefile.in
1006 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
1007 $(CONFIGURE) --prefix=/usr \
1008 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
1009 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
1010 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
1012 libusb: libusb10 libusb/Makefile
1013 $(MAKE) -C $@
1015 libusb-install: libusb
1016 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
1017 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
1019 libusb-clean:
1020 -@$(MAKE) -C $@ clean
1021 @rm -rf libusb/Makefile
1023 usbmodeswitch: libusb10
1024 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
1025 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
1026 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
1028 usbmodeswitchdb-install:
1029 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
1030 # compress whitespace
1031 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
1032 F=`basename $$D`; \
1033 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
1034 done
1036 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
1037 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1038 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
1039 @mkdir -p $(TARGETDIR)/rom/etc
1040 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
1042 #libdaemon: libdaemon/Makefile
1043 #$(MAKE) -C $@
1045 #libdaemon/Makefile: libdaemon/Makefile.in
1046 # cd libdaemon && $(CONFIGURE) ac_cv_func_setpgrp_void=yes \
1047 # --disable-dependency-tracking
1049 #libdaemon-install: libdaemon
1050 # install -D libdaemon/libdaemon/.libs/libdaemon.so.0.5.0 $(INSTALLDIR)/libdaemon/usr/lib/libdaemon.so.0.5.0
1051 # $(STRIP) $(INSTALLDIR)/libdaemon/usr/lib/*.so.*
1052 # cd $(INSTALLDIR)/libdaemon/usr/lib && \
1053 # ln -sf libdaemon.so.0.5.0 libdaemon.so && \
1054 # ln -sf libdaemon.so.0.5.0 libdaemon.so.0
1056 #libdaemon-clean:
1057 # -@$(MAKE) -C libdaemon distclean
1059 #radvd/stamp-h1:
1060 # cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1061 # LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1062 # $(CONFIGURE) --prefix="" --disable-dependency-tracking \
1063 # DAEMON_CFLAGS="-I$(TOP)/libdaemon" \
1064 # DAEMON_LIBS="-ldaemon -L$(TOP)/libdaemon/libdaemon/.libs"
1065 # @$(MAKE) -C radvd clean
1066 # @touch radvd/stamp-h1
1068 #radvd: libdaemon radvd/stamp-h1
1070 #radvd-clean:
1071 # -@$(MAKE) -C radvd distclean
1072 # @rm -f radvd/stamp-h1
1074 #radvd-install: radvd
1075 # install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
1076 # $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
1078 dhcpv6/stamp-h1:
1079 @cd dhcpv6 && \
1080 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
1081 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1082 ac_cv_func_setpgrp_void=yes \
1083 $(CONFIGURE) --prefix= --with-localdbdir=/var
1084 @$(MAKE) -C dhcpv6 clean
1085 @touch dhcpv6/stamp-h1
1087 dhcpv6: dhcpv6/stamp-h1
1088 @$(SEP)
1089 @$(MAKE) -C dhcpv6 dhcp6c
1091 dhcpv6-install: dhcpv6
1092 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1093 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
1095 dhcpv6-clean:
1096 -@$(MAKE) -C dhcpv6 clean
1097 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
1100 p910nd:
1101 samba:
1102 samba3:
1104 nvram: shared
1106 prebuilt: shared libbcmcrypto
1108 vlan:
1109 @$(SEP)
1110 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
1112 vlan-install:
1113 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
1114 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
1117 pptp-client-install:
1118 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1119 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1122 accel-pptp: pppd accel-pptp/Makefile
1123 @$(MAKE) -C accel-pptp
1125 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
1126 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
1127 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
1129 accel-pptp-clean:
1130 -@$(MAKE) -C accel-pptp clean
1131 @rm -f accel-pptp/Makefile
1133 accel-pptp-install: accel-pptp
1134 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1135 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
1137 pptpd/stamp-h1:
1138 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
1139 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
1140 touch pptpd/stamp-h1
1142 pptpd: pptpd/stamp-h1
1144 pptpd-install: pptpd
1145 @echo pptpd
1146 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1147 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1148 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1149 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1150 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1151 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1153 pptpd-clean:
1154 -@$(MAKE) -C pptpd clean
1155 rm -rf pptpd/stamp-h1 pptpd/.deps
1157 pppd/Makefile: pppd/linux/Makefile.top
1158 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1160 pppd: pppd/Makefile
1161 @$(SEP)
1162 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1164 pppd-clean:
1165 -@$(MAKE) -C pppd clean
1166 @rm -f pppd/Makefile
1168 pppd-install: pppd
1169 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1170 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1171 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1172 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1173 ifeq ($(TCONFIG_L2TP),y)
1174 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1175 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1176 endif
1178 # ipupdate-install:
1179 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1180 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1182 zebra/stamp-h1:
1183 @cd zebra && rm -f config.cache && \
1184 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1185 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1186 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1187 $(CONFIGURE) --sysconfdir=/etc \
1188 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1189 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1190 @touch zebra/stamp-h1
1192 zebra: zebra/stamp-h1
1193 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1195 zebra-clean:
1196 -@$(MAKE) -C zebra clean
1197 @rm -f zebra/stamp-h1
1199 zebra-install: zebra
1200 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1201 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1202 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1203 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1204 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1205 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1208 rp-l2tp-install:
1209 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1210 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1211 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1212 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1213 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1214 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1215 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1217 xl2tpd: pppd
1218 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1220 xl2tpd-install: xl2tpd
1221 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1222 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1225 bpalogin-install:
1226 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1227 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1230 # libnet:
1231 # @$(SEP)
1232 # @-mkdir -p libnet/lib
1233 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1235 # libpcap:
1236 # @$(SEP)
1237 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1239 libbcm:
1240 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1242 libbcm-install:
1243 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1244 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1247 iproute2:
1248 @$(SEP)
1249 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1251 iproute2-install: iproute2
1252 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1253 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1254 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1255 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1258 ntpc: nvram shared
1261 dropbear: dropbear/config.h
1262 @$(SEP)
1263 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1 $(PARALLEL_BUILD)
1265 dropbear-install:
1266 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1267 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1268 cd $(INSTALLDIR)/dropbear/usr/bin && \
1269 ln -sf dropbearmulti dropbear && \
1270 ln -sf dropbearmulti dropbearconvert && \
1271 ln -sf dropbearmulti dropbearkey && \
1272 ln -sf dropbearmulti dbclient && \
1273 ln -sf dropbearmulti ssh && \
1274 ln -sf dropbearmulti scp
1276 dropbear-clean:
1277 -@$(MAKE) -C dropbear clean
1278 @rm -f dropbear/config.h
1280 dropbear/config.h:
1281 cd dropbear && \
1282 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1283 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1284 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1285 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1286 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1287 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1288 @$(MAKE) -C dropbear clean
1290 # Media libraries
1292 sqlite/stamp-h1:
1293 cd sqlite && \
1294 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1295 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1296 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1297 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1298 touch sqlite/stamp-h1
1300 sqlite: sqlite/stamp-h1
1301 @$(MAKE) -C sqlite all $(PARALLEL_BUILD)
1303 sqlite-clean:
1304 -@$(MAKE) -C sqlite clean
1305 @rm -f sqlite/stamp-h1
1307 sqlite-install: sqlite
1308 @$(SEP)
1309 ifneq ($(MEDIA_SERVER_STATIC),y)
1310 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1311 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1312 cd $(INSTALLDIR)/sqlite/usr/lib/ && \
1313 ln -sf libsqlite3.so.0 libsqlite3.so
1314 endif
1316 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1318 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1319 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1321 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1322 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1324 FFMPEG_PROTOCOLS:=file
1325 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1327 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
1328 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1330 ffmpeg/stamp-h1: zlib
1331 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1332 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1333 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1334 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1335 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1336 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1337 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1338 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1339 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1340 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1341 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1342 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1343 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1344 --extra-libs="-L$(TOP)/zlib -lz" \
1345 --enable-zlib --disable-debug --prefix=''
1346 touch ffmpeg/stamp-h1
1348 ffmpeg: ffmpeg/stamp-h1 zlib
1349 @$(MAKE) -C ffmpeg all $(PARALLEL_BUILD)
1351 ffmpeg-clean:
1352 -@$(MAKE) -C ffmpeg clean
1353 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1355 ffmpeg-install: ffmpeg
1356 @$(SEP)
1357 ifneq ($(MEDIA_SERVER_STATIC),y)
1358 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1359 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1360 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1361 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1362 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1363 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1364 endif
1366 libogg/stamp-h1:
1367 cd libogg && \
1368 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1369 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1370 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1371 touch libogg/stamp-h1
1373 libogg: libogg/stamp-h1
1374 @$(MAKE) -C libogg all $(PARALLEL_BUILD)
1376 libogg-clean:
1377 -@$(MAKE) -C libogg clean
1378 @rm -f libogg/stamp-h1
1380 libogg-install: libogg
1381 @$(SEP)
1382 ifneq ($(MEDIA_SERVER_STATIC),y)
1383 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1384 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1385 endif
1387 flac/stamp-h1: libogg
1388 cd flac && \
1389 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1390 CPPFLAGS="-I$(TOP)/libogg/include -I$(LINUXDIR)/include" \
1391 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1392 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1393 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1394 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1395 touch flac/stamp-h1
1397 flac: flac/stamp-h1 libogg
1398 @$(MAKE) -C flac/src/libFLAC all $(PARALLEL_BUILD)
1400 flac-clean:
1401 -@$(MAKE) -C flac clean
1402 @rm -f flac/stamp-h1
1404 flac-install: flac
1405 @$(SEP)
1406 ifneq ($(MEDIA_SERVER_STATIC),y)
1407 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1408 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1409 endif
1411 jpeg/stamp-h1:
1412 cd jpeg && \
1413 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1414 touch jpeg/stamp-h1
1416 jpeg: jpeg/stamp-h1
1417 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so $(PARALLEL_BUILD)
1419 jpeg-clean:
1420 -@$(MAKE) -C jpeg clean
1421 @rm -f jpeg/stamp-h1 jpeg/Makefile
1423 jpeg-install: jpeg
1424 @$(SEP)
1425 ifneq ($(MEDIA_SERVER_STATIC),y)
1426 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1427 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1428 endif
1430 libexif/stamp-h1:
1431 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1432 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1433 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1434 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1435 touch libexif/stamp-h1
1437 libexif: libexif/stamp-h1
1438 @$(MAKE) -C libexif all
1440 libexif-clean:
1441 -@$(MAKE) -C libexif clean
1442 @rm -f libexif/stamp-h1
1444 libexif-install: libexif
1445 @$(SEP)
1446 ifneq ($(MEDIA_SERVER_STATIC),y)
1447 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1448 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1449 endif
1451 zlib/stamp-h1:
1452 cd zlib && \
1453 ./configure --shared --prefix=''
1454 touch zlib/stamp-h1
1456 zlib: zlib/stamp-h1
1457 @$(MAKE) -C zlib all
1458 @$(MAKE) -C zlib DESTDIR=$(TOP)/zlib/staged install
1460 zlib-clean:
1461 -@$(MAKE) -C zlib clean
1462 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1463 @rm -rf zlib/staged
1465 zlib-install: zlib
1466 @$(SEP)
1467 ifneq ($(MEDIA_SERVER_STATIC),y)
1468 install -d $(INSTALLDIR)/zlib/usr/lib
1469 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1470 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1471 endif
1472 ifeq ($(TCONFIG_BT),y)
1473 install -d $(INSTALLDIR)/zlib/usr/lib
1474 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1475 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1476 endif
1477 ifeq ($(TCONFIG_TOR),y)
1478 install -d $(INSTALLDIR)/zlib/usr/lib
1479 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1480 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1481 endif
1483 libid3tag/stamp-h1: zlib
1484 cd libid3tag && \
1485 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1486 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1487 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1488 --disable-debugging --disable-profiling
1489 touch libid3tag/stamp-h1
1491 libid3tag: libid3tag/stamp-h1 zlib
1492 @$(MAKE) -C libid3tag all $(PARALLEL_BUILD)
1494 libid3tag-clean:
1495 -@$(MAKE) -C libid3tag clean
1496 @rm -f libid3tag/stamp-h1
1498 libid3tag-install: libid3tag
1499 @$(SEP)
1500 ifneq ($(MEDIA_SERVER_STATIC),y)
1501 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1502 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1503 endif
1505 libvorbis/stamp-h1: libogg
1506 cd libvorbis && \
1507 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1508 CPPFLAGS="-I$(TOP)/libogg/include" \
1509 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1510 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1511 --with-ogg-includes="$(TOP)/libogg/include" \
1512 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1513 touch libvorbis/stamp-h1
1515 libvorbis: libvorbis/stamp-h1
1516 @$(MAKE) -C libvorbis/lib all $(PARALLEL_BUILD)
1518 libvorbis-clean:
1519 -@$(MAKE) -C libvorbis clean
1520 @rm -f libvorbis/stamp-h1
1522 libvorbis-install: libvorbis
1523 @$(SEP)
1524 ifneq ($(MEDIA_SERVER_STATIC),y)
1525 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1526 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1527 endif
1529 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1530 @$(SEP)
1531 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna $(PARALLEL_BUILD)
1533 minidlna-clean:
1534 -@$(MAKE) -C minidlna clean
1535 @rm -f minidlna/stamp-h1
1537 minidlna-install: minidlan
1538 @$(SEP)
1539 install -D minidlna/minidlna $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1540 $(STRIP) $(INSTALLDIR)/minidlna/usr/sbin/minidlna
1542 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1543 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1544 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1545 $(CONFIGURE) --prefix=/usr
1547 igmpproxy: igmpproxy/src/Makefile
1548 @$(SEP)
1549 @$(MAKE) -C igmpproxy/src $(PARALLEL_BUILD)
1551 igmpproxy-install: igmpproxy
1552 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1553 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1555 igmpproxy-clean:
1556 -@$(MAKE) -C igmpproxy/src clean
1557 @rm -f igmpproxy/src/Makefile
1559 udev:
1560 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1561 PROGRAMS=udevtrigger
1563 udev-install: udev
1564 install -d $(INSTALLDIR)
1565 install -d $(TARGETDIR)
1566 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1568 hotplug2:
1569 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1571 hotplug2-install: hotplug2
1572 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1573 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1575 emf:
1576 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1578 emf-install: emf
1579 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1581 igs:
1582 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1584 igs-install: igs
1585 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1587 wanuptime: nvram shared
1588 @$(SEP)
1589 @$(MAKE) -C wanuptime
1591 wanuptime-clean:
1592 -@$(MAKE) -C wanuptime clean
1594 wanuptime-install:
1595 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1596 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1598 ebtables: dummy
1599 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1600 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1601 LOCKFILE="/var/lock/ebtables" LOCKDIR="/var/lock" \
1602 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1604 ebtables-install: ebtables
1605 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1607 @mkdir -p $(TARGETDIR)/rom/etc
1608 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1609 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1611 install -d $(INSTALLDIR)/ebtables/usr/lib
1612 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1613 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1614 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1616 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1617 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1618 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1620 ebtables-clean:
1621 -@$(MAKE) -C ebtables clean
1623 #Roadkill
1624 spawn-fcgi/stamp-h1:
1625 cd spawn-fcgi && CC=$(CC) \
1626 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1627 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1628 ac_cv_func_malloc_0_nonnull=yes \
1629 $(CONFIGURE) --prefix=/usr
1630 touch spawn-fcgi/stamp-h1
1632 spawn-fcgi: spawn-fcgi/stamp-h1
1633 @$(MAKE) -C spawn-fcgi $(PARALLEL_BUILD)
1635 spawn-fcgi-clean:
1636 -@$(MAKE) -C spawn-fcgi clean
1637 rm -f spawn-fcgi/stamp-h1
1639 spawn-fcgi-install: spawn-fcgi
1640 install -d $(INSTALLDIR)/spawn-fcgi/usr/bin
1641 install spawn-fcgi/src/spawn-fcgi $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1642 $(STRIP) -s $(INSTALLDIR)/spawn-fcgi/usr/bin/spawn-fcgi
1644 #Roadkill
1645 glib/stamp-h1:
1646 @$(SEP)
1647 @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 \
1648 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 \
1649 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 \
1650 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 \
1651 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
1652 @$(MAKE) -C glib
1653 touch glib/stamp-h1
1655 glib: glib/stamp-h1
1656 @$(MAKE) -C glib $(PARALLEL_BUILD)
1658 glib-clean:
1659 -@$(MAKE) -C glib clean
1660 rm -f glib/stamp-h1
1662 glib-install: glib
1663 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1665 nocat/stamp-h1: glib-install
1666 @$(SEP)
1667 @cd nocat && \
1668 NC_CONF_PATH="/" \
1669 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1670 @$(MAKE) -C nocat
1672 echo *** integrate glib to nocat installdir
1673 install -d $(INSTALLDIR)/nocat/usr/lib
1674 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1675 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1676 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1677 touch nocat/stamp-h1
1679 nocat: nocat/stamp-h1
1680 @$(MAKE) -C nocat $(PARALLEL_BUILD)
1682 nocat-clean:
1683 -@$(MAKE) -C nocat clean
1684 rm -f nocat/stamp-h1
1686 nocat-install:
1687 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1688 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1689 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1690 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1692 #Tomato RAF
1693 pcre/stamp-h1:
1694 $(SEP)
1695 cd pcre && \
1696 CC=$(CC) CXX=$(HOST)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1697 $(CONFIGURE) --prefix=/usr --disable-dependency-tracking --enable-utf8 --enable-unicode-properties --disable-cpp
1698 @touch pcre/stamp-h1
1699 [ -d pcre/m4 ] || mkdir pcre/m4
1701 pcre: pcre/stamp-h1
1703 pcre-install: pcre
1704 @$(SEP)
1705 install -D pcre/.libs/libpcre.so.1 $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1706 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcre.so.1.2.3
1707 install -D pcre/.libs/libpcreposix.so.0.0.2 $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1708 $(STRIP) -s $(INSTALLDIR)/pcre/usr/lib/libpcreposix.so.0.0.2
1709 cd $(INSTALLDIR)/pcre/usr/lib/ && \
1710 ln -sf libpcre.so.1.2.3 libpcre.so.1 && \
1711 ln -sf libpcreposix.so.0.0.2 libpcreposix.so.0
1713 pcre-clean:
1714 ( if [ -f pcre/Makefile ]; then \
1715 $(MAKE) -C pcre clean; \
1716 rm -rf pcre/stamp-h1; \
1717 fi )
1719 php/stamp-h1: pcre zlib
1720 @$(SEP)
1721 cd php && CC=$(CC) CXX=$(ARCH)-g++ AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1722 CFLAGS="-Os -Wall -I $(TOP)/zlib -I $(TOP)/pcre -L $(TOP)/pcre/.libs/libpcre.so.1.2.3 -L $(TOP)/pcre/.libs/libpcreposix.so.0.0.2 $(EXTRACFLAGS)" \
1723 $(CONFIGURE) --prefix=/usr \
1724 --enable-shared \
1725 --disable-static \
1726 --disable-rpath \
1727 --disable-debug \
1728 --without-pear \
1729 --with-config-file-path=/etc \
1730 --with-config-file-scan-dir=/etc/php5 \
1731 --disable-short-tags \
1732 --with-zlib="$(TOP)/zlib/staged" \
1733 --with-zlib-dir="$(TOP)/zlib/staged" \
1734 --disable-phar \
1735 --enable-cli \
1736 --enable-cgi \
1737 --disable-calendar \
1738 --disable-ctype \
1739 --without-curl \
1740 --disable-fileinfo \
1741 --without-gettext \
1742 --disable-dom \
1743 --disable-exif \
1744 --disable-ftp \
1745 --without-gmp \
1746 --disable-hash \
1747 --without-iconv \
1748 --enable-json \
1749 --without-ldap \
1750 --disable-mbstring \
1751 --without-mcrypt \
1752 --without-mysqli \
1753 --without-openssl \
1754 --disable-pcntl \
1755 --without-pdo-mysql \
1756 --without-pdo-pgsql \
1757 --without-pdo-sqlite \
1758 --disable-pdo \
1759 --without-pgsql \
1760 --enable-session \
1761 --disable-shmop \
1762 --disable-simplexml \
1763 --disable-soap \
1764 --disable-sockets \
1765 --without-sqlite \
1766 --without-sqlite3 \
1767 --disable-sysvmsg \
1768 --disable-sysvsem \
1769 --disable-sysvshm \
1770 --disable-tokenizer \
1771 --disable-xml \
1772 --disable-xmlreader \
1773 --disable-xmlwriter \
1774 --enable-zip \
1775 --disable-filter \
1776 --disable-libxml \
1777 ac_cv_c_bigendian_php="no" \
1778 php_cv_cc_rpath="no" \
1779 iconv_impl_name="gnu_libiconv"
1780 @touch php/stamp-h1
1782 php: php/stamp-h1
1783 @$(SEP)
1784 @$(MAKE) -C php
1786 php-clean:
1787 -@$(MAKE) -C php clean
1788 -@rm php/stamp-h1
1790 php-install: php
1791 @$(SEP)
1792 install -d $(INSTALLDIR)/php/usr/sbin
1793 install -D php/sapi/cli/php $(INSTALLDIR)/php/usr/sbin/php-cli && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cli
1794 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cli
1795 install -D php/sapi/cgi/php-cgi $(INSTALLDIR)/php/usr/sbin/php-cgi && chmod 0755 $(INSTALLDIR)/php/usr/sbin/php-cgi
1796 cd $(INSTALLDIR)/php/usr/sbin && ln -sf php-cgi php-fcgi
1797 $(STRIP) $(INSTALLDIR)/php/usr/sbin/php-cgi
1799 nginx/stamp-h1: openssl zlib pcre
1800 @$(SEP)
1801 cd $(TOP)/nginx && ./configure --crossbuild=Linux::$(ARCH) \
1802 --prefix=/usr \
1803 --sbin-path=/usr/sbin \
1804 --conf-path=/etc/nginx/nginx.conf \
1805 --error-log-path=/tmp/var/log/nginx/error.log \
1806 --http-log-path=/tmp/var/log/nginx/access.log \
1807 --pid-path=/tmp/var/run/nginx.pid \
1808 --lock-path=/tmp/var/run/nginx.lock.accept \
1809 --http-client-body-temp-path=/tmp/var/lib/nginx/client \
1810 --http-fastcgi-temp-path=/tmp/var/lib/nginx/fastcgi \
1811 --with-http_flv_module \
1812 --with-http_ssl_module \
1813 --with-http_gzip_static_module \
1814 --http-uwsgi-temp-path=/tmp/var/lib/nginx/uwsgi \
1815 --http-scgi-temp-path=/tmp/var/lib/nginx/scgi \
1816 --http-proxy-temp-path=/tmp/var/lib/nginx/proxy \
1817 --with-cc="$(CC)" \
1818 --with-ld-opt="$(LDFLAGS) -L $(TOP)/pcre/.libs -L $(TOP)/zlib -L $(TOP)/openssl" \
1819 --with-cc-opt="$(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -I $(TOP)/openssl/include -I $(TOP)/openssl/include/openssl -I $(TOP)/pcre -I $(TOP)/zlib" \
1820 $(ADDITIONAL_MODULES)
1822 nginx: nginx/stamp-h1
1823 @$(SEP)
1824 @$(MAKE) -C nginx
1826 nginx-clean:
1827 -@$(MAKE) -C nginx clean
1828 -@rm -f nginx/stamp-h1
1830 nginx-install: nginx
1831 install -d $(INSTALLDIR)/nginx/usr/sbin
1832 install -D nginx/objs/nginx $(INSTALLDIR)/nginx/usr/sbin/nginx && chmod 755 $(INSTALLDIR)/nginx/usr/sbin/nginx
1833 $(STRIP) $(INSTALLDIR)/nginx/usr/sbin/nginx
1835 lzo/stamp-h1:
1836 cd lzo && \
1837 CFLAGS="-O3 -Wall -fPIC $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1838 touch lzo/stamp-h1
1840 lzo: lzo/stamp-h1
1841 @$(MAKE) -C lzo $(PARALLEL_BUILD)
1843 lzo-clean:
1844 -@$(MAKE) -C lzo clean
1845 @rm -f lzo/stamp-h1
1847 lzo-install: lzo
1848 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1849 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1850 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1852 openvpn/.conf: openssl lzo
1853 cd openvpn && CFLAGS="-O3 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1854 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1855 CPPFLAGS="-I$(TOP)/lzo/include -I$(TOP)/openssl/include" \
1856 $(CONFIGURE) --prefix= \
1857 --with-crypto-library=openssl \
1858 --disable-debug --disable-plugin-auth-pam --disable-plugin-down-root --with-plugindir=/lib --enable-management --enable-small \
1859 --disable-selinux --disable-socks --enable-password-save \
1860 OPENSSL_SSL_CFLAGS="-I$(TOP)/openssl/include" \
1861 OPENSSL_SSL_LIBS="-L$(TOP)/openssl -lssl" \
1862 ac_cv_lib_resolv_gethostbyname=no
1863 touch openvpn/.conf
1865 openvpn: openvpn/.conf
1866 @$(MAKE) -C openvpn $(PARALLEL_BUILD)
1868 openvpn-clean:
1869 -@$(MAKE) -C openvpn clean
1870 @rm -f openvpn/.conf
1872 openvpn-install: openvpn
1873 install -D openvpn/src/openvpn/.libs/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1874 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1875 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1877 openvpn_plugin_auth_nvram:nvram
1879 #shibby
1880 libcurl/stamp-h1: zlib openssl
1881 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1882 CPPFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections -I$(TOP)/zlib" \
1883 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1884 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1885 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1886 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1887 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1888 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1889 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1890 --without-gnutls --without-krb4 --without-libidn \
1891 --with-linux-headers=$(LINUXDIR)/include \
1892 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1893 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1894 touch libcurl/stamp-h1
1896 libcurl: libcurl/stamp-h1
1897 @$(MAKE) -C libcurl $(PARALLEL_BUILD)
1899 libcurl-clean:
1900 -@$(MAKE) -C libcurl clean
1901 @rm -f libcurl/stamp-h1 libcurl/Makefile
1903 libcurl-install: libcurl
1904 install -d $(INSTALLDIR)/libcurl/usr/lib
1905 install -D libcurl/lib/.libs/libcurl.so.4.3.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
1906 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.3.0
1907 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1908 ln -sf libcurl.so.4.3.0 libcurl.so.4 && \
1909 ln -sf libcurl.so.4.3.0 libcurl.so
1911 libevent/stamp-h1:
1912 cd libevent && CC=$(CC) \
1913 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1914 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1915 $(CONFIGURE)
1916 touch libevent/stamp-h1
1918 libevent: libevent/stamp-h1
1919 @$(SEP)
1920 $(MAKE) -C libevent $(PARALLEL_BUILD)
1921 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1923 libevent-clean:
1924 -@$(MAKE) -C libevent clean
1925 @rm -f libevent/stamp-h1 libevent/Makefile
1926 @rm -rf libevent/staged
1928 libevent-install: libevent
1929 install -d $(INSTALLDIR)/libevent/usr/lib
1930 install libevent/.libs/libevent-2.0.so.5.1.9 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1931 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1933 libiconv/stamp-h1:
1934 cd libiconv && CC=$(CC) \
1935 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1936 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1937 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static --enable-shared
1938 touch libiconv/stamp-h1
1940 libiconv: libiconv/stamp-h1
1941 @$(SEP)
1942 $(MAKE) -C libiconv $(PARALLEL_BUILD)
1944 libiconv-clean:
1945 -@$(MAKE) -C libiconv clean
1946 @rm -rf libiconv/stamp-h1 libiconv/Makefile
1948 libiconv-install: libiconv
1949 install -d $(INSTALLDIR)/libiconv/usr/lib
1950 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.4.0
1951 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2.4.0
1952 cd $(INSTALLDIR)/libiconv/usr/lib/ && \
1953 ln -sf libiconv.so.2.4.0 libiconv.so.2 && \
1954 ln -sf libiconv.so.2.4.0 libiconv.so
1956 transmission/stamp-h1: openssl libcurl libevent zlib
1957 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1958 autoreconf && \
1959 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1960 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1961 -ffunction-sections -fdata-sections" \
1962 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
1963 -L$(TOP)/zlib -L$(TOP)/openssl -L$(TOP)/libcurl/lib/.libs -L$(TOP)/libevent/.libs" \
1964 HAVE_CXX=yes \
1965 $(CONFIGURE) --target=mipsel-linux --host=mipsel-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls \
1966 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1967 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1968 LIBCURL_LDFLAGS="-L$(TOP)/libcurl/lib/.libs/" \
1969 LIBCURL_LIBS="-lcurl" \
1970 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1971 LIBEVENT_LDFLAGS="-L$(TOP)/libevent/.libs" \
1972 LIBEVENT_LIBS="-levent" \
1973 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1974 OPENSSL_LDFLAGS="-L$(TOP)/openssl" \
1975 OPENSSL_LIBS="-lcrypto -lssl" \
1976 ZLIB_CFLAGS="-I$(TOP)/zlib" \
1977 ZLIB_LDFLAGS="-L$(TOP)/zlib" \
1978 ZLIB_LIBS="-lz"
1979 touch transmission/stamp-h1
1981 transmission: transmission/stamp-h1
1982 @$(SEP)
1983 $(MAKE) -C transmission $(PARALLEL_BUILD)
1985 transmission-clean:
1986 -@$(MAKE) -C transmission clean
1987 @rm -f transmission/stamp-h1 transmission/Makefile
1989 transmission-install: transmission
1990 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1991 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1992 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1993 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1994 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1995 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1996 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1997 ifeq ($(TCONFIG_TR_EXTRAS),y)
1998 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1999 else
2000 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
2001 endif
2003 btgui:
2004 @$(SEP)
2006 btgui-install: btgui
2007 install -d $(INSTALLDIR)/btgui/usr/bin
2008 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
2010 libnfsidmap/stamp-h1:
2011 cd libnfsidmap && \
2012 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2013 ac_cv_func_malloc_0_nonnull=yes \
2014 ac_cv_func_realloc_0_nonnull=yes \
2015 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
2016 touch libnfsidmap/stamp-h1
2018 libnfsidmap: libnfsidmap/stamp-h1
2019 @$(SEP)
2020 $(MAKE) -C libnfsidmap $(PARALLEL_BUILD)
2022 libnfsidmap-clean:
2023 -@$(MAKE) -C libnfsidmap clean
2024 @rm -f libnfsidmap/stamp-h1
2025 @rm -rf libnfsidmap/staged
2027 libnfsidmap-install: libnfsidmap
2028 install -d $(TOP)/libnfsidmap/staged
2029 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
2031 portmap/stamp-h1:
2032 cd portmap \
2033 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2034 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
2035 touch portmap/stamp-h1
2037 portmap: portmap/stamp-h1
2038 @$(SEP)
2039 $(MAKE) -C portmap $(PARALLEL_BUILD)
2041 portmap-clean:
2042 -@$(MAKE) -C portmap clean
2043 @rm -f portmap/stamp-h1
2045 portmap-install: portmap
2046 install -d $(INSTALLDIR)/portmap/usr/sbin
2047 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
2048 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
2050 e2fsprogs/stamp-h1:
2051 cd e2fsprogs && \
2052 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2053 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
2054 touch e2fsprogs/stamp-h1
2056 e2fsprogs: e2fsprogs/stamp-h1
2057 @$(SEP)
2058 $(MAKE) -C e2fsprogs $(PARALLEL_BUILD)
2060 e2fsprogs-clean:
2061 -@$(MAKE) -C e2fsprogs clean
2062 @rm -f e2fsprogs/stamp-h1
2063 @rm -f e2fsprogs/Makefile
2064 @rm -rf e2fsprogs/staged
2066 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
2067 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
2068 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
2069 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
2070 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
2071 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
2072 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
2073 ac_cv_func_malloc_0_nonnull=yes \
2074 ac_cv_func_realloc_0_nonnull=yes \
2075 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
2076 --enable-nfsv4 --enable-nfsv3
2077 touch nfs-utils/stamp-h1
2079 nfs-utils: nfs-utils/stamp-h1
2080 @$(SEP)
2081 $(MAKE) -C nfs-utils $(PARALLEL_BUILD)
2083 nfs-utils-clean:
2084 -@$(MAKE) -C nfs-utils clean
2085 @rm -f nfs-utils/stamp-h1
2087 nfs-utils-install: nfs-utils
2088 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
2089 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2090 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2091 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2092 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2093 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2094 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2095 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
2096 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
2097 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
2098 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
2099 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
2100 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
2101 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
2103 sd-idle/stamp-h1:
2104 cd sd-idle \
2105 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2106 $(MAKE) -C sd-idle
2107 chmod 0755 sd-idle/sd-idle
2108 touch sd-idle/stamp-h1
2110 sd-idle-clean:
2111 -@$(MAKE) -C sd-idle clean
2112 @rm -f sd-idle/stamp-h1
2114 sd-idle-install: sd-idle/stamp-h1
2115 install -d $(INSTALLDIR)/sd-idle/usr/bin
2116 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2117 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
2119 snmp/stamp-h1:
2120 cd snmp && \
2121 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2122 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
2123 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
2124 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
2125 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
2126 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
2127 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
2128 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
2129 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
2130 touch snmp/stamp-h1
2132 snmp: snmp/stamp-h1
2133 @$(SEP)
2134 $(MAKE) -C snmp
2136 snmp-clean:
2137 -@$(MAKE) -C snmp clean
2138 @rm -f snmp/stamp-h1
2140 snmp-install: snmp
2141 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
2142 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
2144 apcupsd/stamp-h1:
2145 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2146 $(MAKE) configure && \
2147 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
2148 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
2149 $(CONFIGURE) --prefix=/usr --without-x --enable-usb --disable-pcnet --enable-cgi \
2150 --disable-lgd --enable-net --sysconfdir=/usr/local/apcupsd --bindir=/bin \
2151 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev=
2152 touch apcupsd/stamp-h1
2154 apcupsd: apcupsd/stamp-h1
2155 $(MAKE) -C apcupsd $(PARALLEL_BUILD)
2157 apcupsd-clean:
2158 -@$(MAKE) -C apcupsd clean
2159 @rm -f apcupsd/stamp-h1
2160 @rm -f apcupsd/config*
2162 apcupsd-install: apcupsd
2163 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
2164 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
2165 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
2166 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
2167 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
2169 libsodium/stamp-h1:
2170 cd $(TOP)/libsodium && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2171 $(CONFIGURE) --prefix=/usr --disable-ssp
2172 touch libsodium/stamp-h1
2174 libsodium: libsodium/stamp-h1
2175 $(MAKE) -C libsodium $(PARALLEL_BUILD)
2177 libsodium-install: libsodium
2178 install -d $(INSTALLDIR)/libsodium/usr/lib
2179 install -D libsodium/src/libsodium/.libs/libsodium.so.10.0.0 $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.10.0.0
2180 $(STRIP) -s $(INSTALLDIR)/libsodium/usr/lib/libsodium.so.10.0.0
2181 cd $(INSTALLDIR)/libsodium/usr/lib/ && \
2182 ln -sf libsodium.so.10.0.0 libsodium.so.10 && \
2183 ln -sf libsodium.so.10.0.0 libsodium.so
2185 libsodium-clean:
2186 -$(MAKE) -C libsodium clean
2187 @rm -rf libsodium/stamp-h1
2189 dnscrypt/stamp-h1: libsodium
2190 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2191 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2192 CPPFLAGS="-I$(TOP)/libsodium/src/libsodium/include" \
2193 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L$(TOP)/libsodium/src/libsodium/.libs" \
2194 $(CONFIGURE) --prefix=/usr --disable-ssp
2195 touch dnscrypt/stamp-h1
2197 dnscrypt: dnscrypt/stamp-h1
2198 $(MAKE) -C dnscrypt $(PARALLEL_BUILD)
2200 dnscrypt-install: dnscrypt
2201 install -D dnscrypt/src/proxy/.libs/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2202 install -D dnscrypt/src/hostip/.libs/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2203 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
2204 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
2206 dnscrypt-clean:
2207 -@$(MAKE) -C dnscrypt clean
2208 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
2210 tor/stamp-h1: openssl zlib libevent
2211 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
2212 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
2213 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
2214 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
2215 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib \
2216 --disable-asciidoc --disable-threads
2217 touch tor/stamp-h1
2219 tor: tor/stamp-h1
2220 $(MAKE) -C tor $(PARALLEL_BUILD)
2222 tor-install: tor
2223 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
2224 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
2226 tor-clean:
2227 -@$(MAKE) -C tor clean
2228 @rm -rf tor/stamp-h1 tor/Makefile
2230 udpxy/stamp-h1:
2231 cd udpxy \
2232 $(MAKE) -C udpxy CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
2233 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections"
2234 touch udpxy/stamp-h1
2236 udpxy-clean:
2237 -@$(MAKE) -C udpxy clean
2238 @rm -f udpxy/stamp-h1
2240 udpxy-install: udpxy/stamp-h1
2241 install -d $(INSTALLDIR)/udpxy/usr/bin
2242 install -D udpxy/udpxy $(INSTALLDIR)/udpxy/bin/udpxy
2243 $(STRIP) -s $(INSTALLDIR)/udpxy/bin/udpxy
2245 mdadm:
2246 $(MAKE) -C mdadm $(PARALLEL_BUILD)
2248 mdadm-install: mdadm
2249 install -D mdadm/mdadm $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2250 $(STRIP) -s $(INSTALLDIR)/mdadm/usr/sbin/mdadm
2252 mdadm-clean:
2253 -@$(MAKE) -C mdadm clean
2255 ipset:
2256 $(MAKE) -C ipset binaries
2258 ipset-install: ipset
2259 install -D ipset/ipset $(INSTALLDIR)/ipset/usr/sbin/ipset
2260 install -d $(INSTALLDIR)/ipset/usr/lib/
2261 install ipset/*.so $(INSTALLDIR)/ipset/usr/lib/
2262 $(STRIP) $(INSTALLDIR)/ipset/usr/lib/*.so
2263 $(STRIP) $(INSTALLDIR)/ipset/usr/sbin/ipset
2265 ipset-clean:
2266 -@$(MAKE) -C ipset clean
2268 comgt:
2269 @$(MAKE) -C comgt CC=$(CC) CFLAGS="$(EXTRACFLAGS)" LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" comgt
2271 comgt-install: comgt
2272 install -D comgt/comgt $(INSTALLDIR)/comgt/usr/sbin/comgt
2273 cd $(INSTALLDIR)/comgt/usr/sbin/ && \
2274 ln -sf comgt gcom
2275 $(STRIP) -s $(INSTALLDIR)/comgt/usr/sbin/comgt
2276 @mkdir -p $(TARGETDIR)/rom/etc/gcom
2277 @cp -f comgt/gcom/* $(TARGETDIR)/rom/etc/gcom/
2279 comgt-clean:
2280 -@$(MAKE) -C comgt clean
2283 # Generic rules
2287 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
2290 %-clean:
2291 @-[ ! -d $* ] || $(MAKE) -C $* clean
2293 %-distclean:
2294 @-[ ! -d $* ] || $(MAKE) -C $* distclean
2296 %-install: %
2297 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
2299 %-build:
2300 $(MAKE) $*-clean $*
2302 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
2304 .PHONY: all clean distclean mrproper install package
2305 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
2306 .PHONY: dummy libnet libpcap