Added IPSec support cd ...
[tomato.git] / release / src / router / Makefile
blob20debb0cfb2a497ab4ccdcf3cba3d70a855c3ed4
2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
5 # All Rights Reserved.
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
14 include common.mak
16 #TOMATO_EXPERIMENTAL=0
21 SEP=echo "\033[41;1m $@ \033[0m"
24 # standard packages
26 obj-y += lzma-loader
27 obj-y += nvram
28 obj-y += shared
29 obj-y += prebuilt
30 obj-y += igmpproxy
31 obj-y += iptables
32 obj-y += rc
33 obj-y += iproute2
34 obj-y += rom
35 obj-y += others
36 obj-y += busybox
37 obj-y += httpd
38 obj-y += www
39 obj-y += bridge
40 obj-y += dnsmasq
41 obj-y += etc
42 # obj-y += vlan # use Busybox vconfig
43 obj-y += pppd
44 obj-y += rp-pppoe
45 obj-y += utils
46 obj-y += ntpc
47 obj-y += rstats
48 obj-y += cstats
49 obj-y += udpxy
50 obj-$(TCONFIG_TOR) += tor
51 obj-$(TCONFIG_TOR) += libevent
52 obj-$(TCONFIG_TOR) += zlib
53 obj-$(TCONFIG_DNSCRYPT) += dnscrypt
54 obj-$(TCONFIG_SNMP) += snmp
55 obj-$(TCONFIG_SDHC) += mmc
57 # !!TB - updated Broadcom Wireless driver
58 obj-y += et
59 obj-y += libbcmcrypto
60 obj-y += wlconf
62 obj-y += cyassl
63 obj-y += mssl
64 obj-y += mdu
66 obj-$(TCONFIG_NFS) += portmap
67 obj-$(TCONFIG_NFS) += e2fsprogs
68 obj-$(TCONFIG_NFS) += libevent
69 obj-$(TCONFIG_NFS) += libnfsidmap
70 obj-$(TCONFIG_NFS) += nfs-utils
72 #Roadkill
73 obj-$(TCONFIG_NOCAT) += nocat
75 # !!TB
76 obj-$(TCONFIG_USB) += p910nd
78 obj-$(TCONFIG_UPS) += apcupsd
80 ifeq ($(CONFIG_LINUX26),y)
81 obj-$(TCONFIG_USB) += sd-idle
82 else
83 obj-$(TCONFIG_USB) += scsi-idle
84 endif
86 obj-y += libusb10
87 #obj-y += libusb
88 obj-y += usbmodeswitch
89 obj-$(TCONFIG_FTP) += vsftpd
91 ifeq ($(CONFIG_LINUX26),y)
92 ifeq ($(TCONFIG_SAMBASRV),y)
93 NEED_EX_NLS = y
94 endif
95 ifeq ($(TCONFIG_USB_EXTRAS),y)
96 NEED_EX_USB = y
97 endif
98 endif
100 ifeq ($(TCONFIG_SAMBASRV),y)
101 ifeq ($(TCONFIG_SAMBA3),y)
102 NEED_SAMBA3 = y
103 else
104 NEED_SAMBA2 = y
105 endif
106 endif
108 ifeq ($(TCONFIG_IPV6),y)
109 export TCONFIG_IPV6 := y
110 else
111 TCONFIG_IPV6 :=
112 endif
114 ifeq ($(TCONFIG_IPSEC),y)
115 export TCONFIG_IPSEC := y
116 else
117 TCONFIG_IPSEC :=
118 endif
120 obj-$(NEED_SAMBA2) += samba
121 obj-$(NEED_SAMBA3) += samba3
122 obj-$(TCONFIG_NTFS) += ntfs-3g
123 obj-$(TCONFIG_EBTABLES) += ebtables
124 obj-$(TCONFIG_IPV6) += radvd
125 obj-$(TCONFIG_IPV6) += dhcpv6
127 obj-$(TCONFIG_MEDIA_SERVER) += zlib
128 obj-$(TCONFIG_MEDIA_SERVER) += sqlite
129 obj-$(TCONFIG_MEDIA_SERVER) += ffmpeg
130 obj-$(TCONFIG_MEDIA_SERVER) += libogg
131 obj-$(TCONFIG_MEDIA_SERVER) += flac
132 obj-$(TCONFIG_MEDIA_SERVER) += jpeg
133 obj-$(TCONFIG_MEDIA_SERVER) += libexif
134 obj-$(TCONFIG_MEDIA_SERVER) += libid3tag
135 obj-$(TCONFIG_MEDIA_SERVER) += libvorbis
136 obj-$(TCONFIG_MEDIA_SERVER) += minidlna
137 MEDIA_SERVER_STATIC=y
139 obj-y += miniupnpd
140 # obj-y += upnp
144 # configurable packages
146 obj-$(TCONFIG_L2TP) += xl2tpd
147 obj-$(TCONFIG_PPTP) += accel-pptp
148 obj-$(TCONFIG_PPTPD) += pptpd
149 obj-$(TCONFIG_HTTPS) += openssl
150 obj-$(TCONFIG_SSH) += dropbear
151 obj-$(TCONFIG_ZEBRA) += zebra
152 # obj-$(TCONFIG_IPP2P) += ipp2p
153 obj-$(TCONFIG_LZO) += lzo
154 obj-$(TCONFIG_OPENVPN) += openvpn
155 obj-$(TCONFIG_EMF) += emf
156 obj-$(TCONFIG_EMF) += igs
158 obj-$(TCONFIG_BBT) += openssl
159 obj-$(TCONFIG_BBT) += libevent
160 obj-$(TCONFIG_BBT) += libcurl
161 obj-$(TCONFIG_BBT) += transmission
162 obj-$(TCONFIG_BT) += btgui
163 obj-$(TCONFIG_BBT) += zlib
164 obj-$(TCONFIG_BBT) += libiconv
166 obj-$(CONFIG_LINUX26) += hotplug2
167 obj-$(CONFIG_LINUX26) += udevtrigger
169 ifeq ($(TCONFIG_OPENVPN),y)
170 export FULL_OPENSSL := y
171 else
172 ifeq ($(TCONFIG_FTP_SSL),y)
173 export FULL_OPENSSL := y
174 else
175 ifeq ($(TCONFIG_BBT),y)
176 export FULL_OPENSSL := y
177 else
178 ifeq ($(TCONFIG_TOR),y)
179 export FULL_OPENSSL := y
180 else
181 FULL_OPENSSL :=
182 endif
183 endif
184 endif
185 endif
187 obj-y += wanuptime
189 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
190 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
195 # Basic rules
198 all: clean-build libc $(obj-y) kernel
201 kernel: $(LINUXDIR)/.config
202 @$(SEP)
204 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
205 $(MAKE) -C $(LINUXDIR) zImage CC=$(KERNELCC); \
207 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
208 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC); \
210 ifeq ($(CONFIG_LINUX26),y)
211 $(MAKE) -C $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed srctree=$(LINUXDIR)
212 endif
215 lzma-loader:
216 $(MAKE) -C $(SRCBASE)/lzma-loader CROSS_COMPILE=$(CROSS_COMPILE) LD=$(LD)
218 lzma-loader-install: lzma-loader
219 @$(SEP)
222 kmod: dummy
223 $(MAKE) -C $(LINUXDIR) modules CC=$(KERNELCC)
225 testfind:
226 cd $(TARGETDIR)/lib/modules/* && find -name "*.o" -exec mv -i {} . \; || true
227 cd $(TARGETDIR)/lib/modules/* && find -type d -delete || true
229 install package: $(obj-install) $(LINUXDIR)/.config
230 @$(SEP)
232 install -d $(TARGETDIR)
235 # kernel modules
236 $(MAKE) -C $(LINUXDIR) modules_install \
237 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" \
238 DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
240 ifneq ($(CONFIG_LINUX26),y)
241 find $(TARGETDIR)/lib/modules -name wl.*o -exec $(STRIP) --strip-unneeded -x {} \;
242 find $(TARGETDIR)/lib/modules -name et.*o -exec $(STRIP) --strip-unneeded -x {} \;
243 find $(TARGETDIR)/lib/modules -name bcm57*.*o -exec $(STRIP) --strip-unneeded -x {} \;
244 find $(TARGETDIR)/lib/modules -name ctf.*o -exec $(STRIP) --strip-unneeded -x {} \;
245 find $(TARGETDIR)/lib/modules -name emf.*o -exec $(STRIP) --strip-unneeded -x {} \;
246 find $(TARGETDIR)/lib/modules -name igs.*o -exec $(STRIP) --strip-unneeded -x {} \;
247 find $(TARGETDIR)/lib/modules -name jffs*.*o -exec $(STRIP) --strip-unneeded -x {} \;
249 find $(TARGETDIR)/lib/modules -name *.*o -exec $(STRIP) --strip-debug -x -R .mdebug.abi32 {} \;
250 endif
252 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv diag/* . && rm -rf diag
254 # nice and clean
255 -cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
256 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv et/* . && rm -rf et
257 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv wl/* . && rm -rf wl
258 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv cifs/* . && rm -rf cifs
259 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
260 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jffs/* . && rm -rf jffs || true
261 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate || true
262 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate || true
263 cd $(TARGETDIR)/lib/modules/*/kernel/lib && mv lzo/* . && rm -rf lzo || true
264 rm -rf $(TARGETDIR)/lib/modules/*/pcmcia
266 ##!!TB
267 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext2/* . && rm -rf ext2 || true
268 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ext3/* . && rm -rf ext3 || true
269 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jbd/* . && rm -rf jbd || true
270 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fat/* . && rm -rf fat || true
271 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv jfs/* . && rm -rf jfs || true
272 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv vfat/* . && rm -rf vfat || true
273 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv msdos/* . && rm -rf msdos || true
274 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv fuse/* . && rm -rf fuse || true
275 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
276 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv smbfs/* . && rm -rf smbfs || true
277 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv reiserfs/* . && rm -rf reiserfs || true
278 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfs/* . && rm -rf hfs || true
279 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv hfsplus/* . && rm -rf hfsplus || true
280 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv lockd/* . && rm -rf lockd || true
281 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfsd/* . && rm -rf nfsd || true
282 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nfs/* . && rm -rf nfs || true
283 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv xfs/* . && rm -rf xfs || true
284 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv nls/* . && rm -rf nls || true
285 cd $(TARGETDIR)/lib/modules/*/kernel/fs && mv exportfs/* . && rm -rf exportfs || true
286 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv sunrpc/* . && rm -rf sunrpc || true
287 cd $(TARGETDIR)/lib/modules/*/kernel/net && mv auth_gss/* . && rm -rf auth_gss || true
288 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv oss/* . && rm -rf oss || true
289 cd $(TARGETDIR)/lib/modules/*/kernel/sound/core && mv seq/* . && rm -rf seq || true
290 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv core/* . && rm -rf core || true
291 cd $(TARGETDIR)/lib/modules/*/kernel/sound && mv usb/* . && rm -rf usb || true
292 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
293 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv host/* . && rm -rf host || true
294 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
295 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv serial/* . && rm -rf serial || true
296 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv core/* . && rm -rf core || true
297 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv class/* . && rm -rf class || true
298 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv misc/* . && rm -rf misc || true
299 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/usb && mv usbip/* . && rm -rf usbip || true
300 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/hid && mv usbhid/* . && rm -rf usbhid || true
301 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv joystick/* . && rm -rf joystick || true
302 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv keyboard/* . && rm -rf keyboard || true
303 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv misc/* . && rm -rf misc || true
304 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/input && mv mouse/* . && rm -rf mouse || true
305 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv uvc/* . && rm -rf uvc || true
306 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv pwc/* . && rm -rf pwc || true
307 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv gl860/* . && rm -rf gl860 || true
308 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv m5602/* . && rm -rf m5602 || true
309 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video/gspca && mv stv06xx/* . && rm -rf stv06xx || true
310 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media/video && mv gspca/* . && rm -rf gspca || true
311 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/media && mv video/* . && rm -rf video || true
313 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv bcm57xx/* . && rm -rf bcm57xx || true
314 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv emf/* . && rm -rf emf || true
315 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv igs/* . && rm -rf igs || true
316 cd $(TARGETDIR)/lib/modules/*/kernel/drivers/net && mv ctf/* . && rm -rf ctf || true
317 cd $(TARGETDIR)/lib/modules && rm -f */source || true
319 # misc
320 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
321 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
322 done
324 ifneq ($(TCONFIG_L7),y)
325 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
326 endif
328 # uClibc
329 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
330 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
331 install $(LIBDIR)/libpthread.so.0 $(TARGETDIR)/lib/
332 install $(LIBDIR)/libgcc_s.so.1 $(TARGETDIR)/lib/
333 $(STRIP) $(TARGETDIR)/lib/libgcc_s.so.1
334 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
335 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
336 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
337 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
338 ifeq ($(TCONFIG_SSH),y)
339 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
340 endif
341 ifeq ($(TCONFIG_BBT),y)
342 install $(LIBDIR)/librt-0.9.30.1.so $(TARGETDIR)/lib/librt.so.0
343 endif
344 ifneq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
345 install $(LIBDIR)/libresolv.so.0 $(TARGETDIR)/lib/
346 $(STRIP) $(TARGETDIR)/lib/*.so.0
347 endif
349 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
351 @echo ---
353 ifeq ($(TCONFIG_OPTIMIZE_SHARED_LIBS),y)
354 @$(SRCBASE)/btools/libfoo.pl
355 else
356 @$(SRCBASE)/btools/libfoo.pl --noopt
357 endif
358 @chmod 0555 $(TARGETDIR)/lib/*.so*
359 @chmod 0555 $(TARGETDIR)/usr/lib/*.so*
361 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
362 # separated/copied extra stuff
363 @rm -rf $(PLATFORMDIR)/extras
364 @mkdir $(PLATFORMDIR)/extras
365 @mv $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/ip_gre.*o $(PLATFORMDIR)/extras/ || true
366 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/usr/lib/iptables/libipt_policy.*o $(PLATFORMDIR)/extras/ || true
368 $(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
369 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
374 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
376 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
377 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
378 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
379 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
381 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
383 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
385 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
386 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
393 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
395 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
396 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
398 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
399 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
400 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
401 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
402 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
403 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
404 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
405 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
406 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
407 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
408 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
409 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
410 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
411 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
412 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
413 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
414 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
415 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
416 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
417 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
418 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
419 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
420 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
421 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
422 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
424 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
425 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
426 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ || true
427 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/crypto || true
428 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ || true
429 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm || true
430 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_IPSEC),@ls,@rm -rf) $(TARGETDIR)/lib/modules/*/kernel/net/key || true
432 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ || true
433 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ || true
435 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ || true
436 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ || true
437 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ || true
439 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
440 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
441 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
442 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
443 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
444 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
445 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
447 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
448 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
449 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
450 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
451 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
452 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
453 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
454 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
455 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
456 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
457 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
458 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
459 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
460 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
462 ifneq ($(TCONFIG_USB),y)
463 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
464 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
465 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
466 endif
468 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
469 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
470 ifneq ($(TCONFIG_USB_EXTRAS),y)
471 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
472 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
473 endif
474 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
475 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
476 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
477 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
478 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
479 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
480 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
482 @mkdir -p $(PLATFORMDIR)/extras/apps
483 @mkdir -p $(PLATFORMDIR)/extras/lib
485 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
486 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
487 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
489 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
490 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
491 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
492 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
493 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
494 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
495 ifneq ($(NEED_EX_USB),y)
496 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
497 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
498 endif
499 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
501 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
502 ifeq ($(TCONFIG_L7PAT),y)
503 @cd layer7 && ./squish.sh
504 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
505 endif
507 ifeq ($(TCONFIG_PPTPD),y)
508 @mkdir -p $(TARGETDIR)/rom/etc/vpn
509 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
510 chmod +x $(TARGETDIR)/rom/etc/vpn/*
511 endif
513 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
514 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
515 @echo ---
517 @rm -f $(TARGETDIR)/lib/modules/*/build
519 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
520 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
522 # Package kernel and filesystem
523 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
524 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
525 # $(MAKE) -C $(LINUXDIR) zImage ; \
526 # else \
527 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
528 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
529 # fi
531 # Pad self-booting Linux to a 64 KB boundary
532 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
533 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
534 # Append filesystem to self-booting Linux
535 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
538 libc: $(LIBDIR)/ld-uClibc.so.0
539 # $(MAKE) -C ../../../tools-src/uClibc all
540 # $(MAKE) -C ../../../tools-src/uClibc install
544 # cleaners
547 clean: clean-build $(obj-clean)
548 rm -rf layer7/squished
549 rm -f .ipv6-y .ipv6-n
550 rm -f .fullssl-y .fullssl-n
551 make -C config clean
553 clean-build: dummy
554 rm -rf $(TARGETDIR)
555 rm -rf $(INSTALLDIR)
556 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
557 rm -rf $(PLATFORMDIR)/extras
559 distclean: clean
560 ifneq ($(INSIDE_MAK),1)
561 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
562 endif
563 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
566 # configuration
569 CONFIG_IN := config/config.in
571 config/conf config/mconf:
572 @$(MAKE) -C config
574 rconf: config/conf
575 @config/conf $(CONFIG_IN)
577 rmconf: config/mconf
578 @config/mconf $(CONFIG_IN)
580 roldconf: config/conf
581 @config/conf -o $(CONFIG_IN)
582 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
584 kconf:
585 @$(MAKE) -C $(LINUXDIR) config
587 kmconf:
588 @$(MAKE) -C $(LINUXDIR) menuconfig
590 koldconf:
591 @$(MAKE) -C $(LINUXDIR) oldconfig
592 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
594 bboldconf:
595 @$(MAKE) -C busybox oldconfig
597 config conf: rconf kconf
599 menuconfig mconf: rmconf kmconf
601 .ipv6-y .ipv6-n:
602 @rm -f .ipv6-y .ipv6-n
603 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
604 @touch $@
606 .fullssl-y .fullssl-n:
607 @rm -f .fullssl-y .fullssl-n
608 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
609 @touch $@
611 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
613 oldconfig oldconf: koldconf roldconf dependconf bboldconf
617 # overrides and extra dependencies
620 busybox: dummy
621 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
623 # V=1
625 busybox-install:
626 rm -rf $(INSTALLDIR)/busybox
627 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
629 busybox-clean:
630 -@$(MAKE) -C busybox distclean
632 busybox-config:
633 $(MAKE) -C busybox menuconfig
636 httpd: shared nvram mssl
637 @$(SEP)
638 @$(MAKE) -C httpd
640 www-install:
641 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
643 matrixssl:
644 @$(SEP)
645 @$(MAKE) -C matrixssl/src
647 matrixssl-install:
648 @true
650 matrixssl-clean:
651 -@$(MAKE) -C matrixssl/src clean
653 cyassl/stamp-h1:
654 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
655 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
656 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
657 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
658 PTHREAD_LIBS="-lpthread" \
659 $(CONFIGURE)
660 @touch cyassl/stamp-h1
662 cyassl: cyassl/stamp-h1
663 @$(SEP)
664 @$(MAKE) -C cyassl
666 cyassl-clean:
667 -@$(MAKE) -C cyassl clean
668 @rm -f cyassl/stamp-h1
670 cyassl-install:
671 @true
673 ifeq ($(FULL_OPENSSL),y)
674 OPENSSL_CIPHERS:=enable-rc5
675 else
676 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-engine
677 # no-tls1 no-tlsext
678 # openssl 1.0.1 doesn't build when using "no-tlsext" or "no-tls1"
679 endif
681 openssl/stamp-h1:
682 cd openssl && \
683 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
684 -ffunction-sections -fdata-sections -Wl,--gc-sections \
685 shared $(OPENSSL_CIPHERS) \
686 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
687 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
688 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
689 no-zlib no-engines no-sse2 no-perlasm \
690 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
692 @$(MAKE) -C openssl clean
693 @touch openssl/stamp-h1
695 openssl: openssl/stamp-h1
697 openssl-clean:
698 -@$(MAKE) -C openssl clean
699 @rm -f openssl/stamp-h1
701 openssl-install: openssl
702 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
703 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
704 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
706 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
707 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
708 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
710 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
712 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
713 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
715 ifeq ($(FULL_OPENSSL),y)
716 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
717 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
718 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
719 endif
721 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
723 mdu: shared mssl
725 rc: nvram shared
727 bridge/Makefile:
728 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
729 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
731 bridge: bridge/Makefile
732 @$(SEP)
733 @$(MAKE) -C bridge
735 bridge-clean:
736 -@$(MAKE) -C bridge clean
737 @rm -f bridge/Makefile
739 bridge-install:
740 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
741 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
743 dnsmasq:
744 @$(SEP)
745 @$(MAKE) -C dnsmasq \
746 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
747 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
749 dnsmasq-install:
750 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
751 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
753 iptables:
754 @$(SEP)
755 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
757 iptables-install:
758 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
759 cd $(INSTALLDIR)/iptables/usr/sbin && \
760 ln -sf iptables iptables-restore
762 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
763 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
765 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
767 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
768 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
769 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
771 ifeq ($(TCONFIG_IPV6),y)
772 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
773 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
774 cd $(INSTALLDIR)/iptables/usr/sbin && \
775 ln -sf ip6tables ip6tables-restore
776 endif
778 iptables-clean:
779 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
781 ppp:
782 @$(SEP)
783 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
784 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
786 ppp-%:
787 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
789 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
790 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
791 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
792 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
793 @touch rp-pppoe/src/stamp-h1
795 rp-pppoe: pppd rp-pppoe/src/stamp-h1
796 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
798 rp-pppoe-clean:
799 -@$(MAKE) -C rp-pppoe/src clean
800 @rm -f rp-pppoe/src/pppoe-relay
801 @rm -f rp-pppoe/src/stamp-h1
803 rp-pppoe-install: rp-pppoe
804 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
805 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
806 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
807 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
810 upnp: nvram shared iptables
812 miniupnpd-config:
813 @cd miniupnpd && ./genconfig.sh
815 miniupnpd: iptables miniupnpd-config
816 @$(SEP)
817 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
818 TARGET_OPENWRT="not really" CC=$(CC) \
819 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
820 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
822 miniupnpd-clean:
823 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
824 @rm -f miniupnpd/config.h
826 miniupnpd-install:
827 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
828 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
830 # !!TB
831 shared: busybox
833 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
834 @$(SEP)
835 $(MAKE) -C vsftpd
837 vsftpd-install: vsftpd
838 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
839 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
841 ntfs-3g/Makefile:
842 cd ntfs-3g && \
843 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
844 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
845 $(CONFIGURE) --enable-shared=no --enable-static=no \
846 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
847 --disable-ntfsprogs --disable-crypto --without-uuid \
848 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
850 ntfs-3g: ntfs-3g/Makefile
851 @$(MAKE) -C ntfs-3g
853 ntfs-3g-clean:
854 -@$(MAKE) -C ntfs-3g clean
855 @rm -f ntfs-3g/Makefile
857 ntfs-3g-install: ntfs-3g
858 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
859 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
860 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
861 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
862 ln -sf ../bin/ntfs-3g mount.ntfs
864 libusb10/Makefile: libusb10/Makefile.in
865 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
866 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
868 libusb10: libusb10/Makefile
869 $(MAKE) -C $@
871 libusb10-install: libusb10
872 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
873 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
875 libusb10-clean:
876 -@$(MAKE) -C $@ clean
877 @rm -rf libusb10/Makefile
879 libusb/Makefile: libusb/Makefile.in
880 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
881 $(CONFIGURE) --prefix=/usr \
882 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
883 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
884 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
886 libusb: libusb10 libusb/Makefile
887 $(MAKE) -C $@
889 libusb-install: libusb
890 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
891 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
893 libusb-clean:
894 -@$(MAKE) -C $@ clean
895 @rm -rf libusb/Makefile
897 usbmodeswitch: libusb10
898 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
899 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
900 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
902 usbmodeswitchdb-install:
903 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
904 # compress whitespace
905 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
906 F=`basename $$D`; \
907 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
908 done
910 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
911 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
912 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
913 @mkdir -p $(TARGETDIR)/rom/etc
914 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
917 radvd/stamp-h1:
918 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
919 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
920 $(CONFIGURE) --prefix=""
921 @$(MAKE) -C radvd clean
922 @touch radvd/stamp-h1
924 radvd: radvd/stamp-h1
926 radvd-clean:
927 -@$(MAKE) -C radvd distclean
928 @rm -f radvd/stamp-h1
930 radvd-install: radvd
931 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
932 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
934 dhcpv6/stamp-h1:
935 @cd dhcpv6 && \
936 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
937 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
938 ac_cv_func_setpgrp_void=yes \
939 $(CONFIGURE) --prefix= --with-localdbdir=/var
940 @$(MAKE) -C dhcpv6 clean
941 @touch dhcpv6/stamp-h1
943 dhcpv6: dhcpv6/stamp-h1
944 @$(SEP)
945 @$(MAKE) -C dhcpv6 dhcp6c
947 dhcpv6-install: dhcpv6
948 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
949 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
951 dhcpv6-clean:
952 -@$(MAKE) -C dhcpv6 clean
953 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
956 p910nd:
957 samba:
958 samba3:
960 nvram: shared
962 prebuilt: shared
964 vlan:
965 @$(SEP)
966 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
968 vlan-install:
969 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
970 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
973 pptp-client-install:
974 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
975 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
978 accel-pptp: pppd accel-pptp/Makefile
979 @$(MAKE) -C accel-pptp
981 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
982 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
983 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
985 accel-pptp-clean:
986 -@$(MAKE) -C accel-pptp clean
987 @rm -f accel-pptp/Makefile
989 accel-pptp-install: accel-pptp
990 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
991 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
993 pptpd/stamp-h1:
994 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
995 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
996 touch pptpd/stamp-h1
998 pptpd: pptpd/stamp-h1
1000 pptpd-install: pptpd
1001 @echo pptpd
1002 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1003 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1004 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1005 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1006 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1007 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1009 pptpd-clean:
1010 -@$(MAKE) -C pptpd clean
1011 rm -rf pptpd/stamp-h1 pptpd/.deps
1013 pppd/Makefile: pppd/linux/Makefile.top
1014 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1016 pppd: pppd/Makefile
1017 @$(SEP)
1018 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1020 pppd-clean:
1021 -@$(MAKE) -C pppd clean
1022 @rm -f pppd/Makefile
1024 pppd-install: pppd
1025 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1026 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1027 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1028 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1029 ifeq ($(TCONFIG_L2TP),y)
1030 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1031 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1032 endif
1034 # ipupdate-install:
1035 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1036 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1038 zebra/stamp-h1:
1039 @cd zebra && rm -f config.cache && \
1040 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1041 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1042 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1043 $(CONFIGURE) --sysconfdir=/etc \
1044 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1045 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1046 @touch zebra/stamp-h1
1048 zebra: zebra/stamp-h1
1049 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1051 zebra-clean:
1052 -@$(MAKE) -C zebra clean
1053 @rm -f zebra/stamp-h1
1055 zebra-install: zebra
1056 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1057 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1058 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1059 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1060 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1061 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1064 rp-l2tp-install:
1065 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1066 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1067 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1068 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1069 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1070 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1071 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1073 xl2tpd: pppd
1074 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1076 xl2tpd-install: xl2tpd
1077 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1078 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1081 bpalogin-install:
1082 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1083 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1086 # libnet:
1087 # @$(SEP)
1088 # @-mkdir -p libnet/lib
1089 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1091 # libpcap:
1092 # @$(SEP)
1093 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1095 libbcm:
1096 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1098 libbcm-install:
1099 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1100 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1103 iproute2:
1104 @$(SEP)
1105 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1107 iproute2-install: iproute2
1108 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1109 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1110 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1111 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1114 ntpc: nvram shared
1117 dropbear: dropbear/config.h
1118 @$(SEP)
1119 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1121 dropbear-install:
1122 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1123 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1124 cd $(INSTALLDIR)/dropbear/usr/bin && \
1125 ln -sf dropbearmulti dropbear && \
1126 ln -sf dropbearmulti dropbearconvert && \
1127 ln -sf dropbearmulti dropbearkey && \
1128 ln -sf dropbearmulti dbclient && \
1129 ln -sf dropbearmulti ssh && \
1130 ln -sf dropbearmulti scp
1132 dropbear-clean:
1133 -@$(MAKE) -C dropbear clean
1134 @rm -f dropbear/config.h
1136 dropbear/config.h:
1137 cd dropbear && \
1138 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1139 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1140 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1141 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1142 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1143 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1144 @$(MAKE) -C dropbear clean
1146 # Media libraries
1148 sqlite/stamp-h1:
1149 cd sqlite && \
1150 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1151 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1152 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1153 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1154 touch sqlite/stamp-h1
1156 sqlite: sqlite/stamp-h1
1157 @$(MAKE) -C sqlite all
1159 sqlite-clean:
1160 -@$(MAKE) -C sqlite clean
1161 @rm -f sqlite/stamp-h1
1163 sqlite-install: sqlite
1164 @$(SEP)
1165 ifneq ($(MEDIA_SERVER_STATIC),y)
1166 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1167 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1168 endif
1170 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1172 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1173 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1175 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1176 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1178 FFMPEG_PROTOCOLS:=file
1179 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1181 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
1182 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1184 ffmpeg/stamp-h1: zlib
1185 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1186 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1187 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1188 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1189 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1190 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1191 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1192 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1193 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1194 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1195 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1196 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1197 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1198 --extra-libs="-L$(TOP)/zlib -lz" \
1199 --enable-zlib --disable-debug --prefix=''
1200 touch ffmpeg/stamp-h1
1202 ffmpeg: ffmpeg/stamp-h1 zlib
1203 @$(MAKE) -C ffmpeg all
1205 ffmpeg-clean:
1206 -@$(MAKE) -C ffmpeg clean
1207 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1209 ffmpeg-install: ffmpeg
1210 @$(SEP)
1211 ifneq ($(MEDIA_SERVER_STATIC),y)
1212 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1213 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1214 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1215 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1216 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1217 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1218 endif
1220 libogg/stamp-h1:
1221 cd libogg && \
1222 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1223 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1224 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1225 touch libogg/stamp-h1
1227 libogg: libogg/stamp-h1
1228 @$(MAKE) -C libogg all
1230 libogg-clean:
1231 -@$(MAKE) -C libogg clean
1232 @rm -f libogg/stamp-h1
1234 libogg-install: libogg
1235 @$(SEP)
1236 ifneq ($(MEDIA_SERVER_STATIC),y)
1237 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1238 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1239 endif
1241 flac/stamp-h1: libogg
1242 cd flac && \
1243 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1244 CPPFLAGS="-I$(TOP)/libogg/include" \
1245 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1246 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1247 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1248 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1249 touch flac/stamp-h1
1251 flac: flac/stamp-h1 libogg
1252 @$(MAKE) -C flac/src/libFLAC all
1254 flac-clean:
1255 -@$(MAKE) -C flac clean
1256 @rm -f flac/stamp-h1
1258 flac-install: flac
1259 @$(SEP)
1260 ifneq ($(MEDIA_SERVER_STATIC),y)
1261 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1262 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1263 endif
1265 jpeg/stamp-h1:
1266 cd jpeg && \
1267 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1268 touch jpeg/stamp-h1
1270 jpeg: jpeg/stamp-h1
1271 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1273 jpeg-clean:
1274 -@$(MAKE) -C jpeg clean
1275 @rm -f jpeg/stamp-h1 jpeg/Makefile
1277 jpeg-install: jpeg
1278 @$(SEP)
1279 ifneq ($(MEDIA_SERVER_STATIC),y)
1280 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1281 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1282 endif
1284 libexif/stamp-h1:
1285 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1286 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1287 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1288 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1289 touch libexif/stamp-h1
1291 libexif: libexif/stamp-h1
1292 @$(MAKE) -C libexif all
1294 libexif-clean:
1295 -@$(MAKE) -C libexif clean
1296 @rm -f libexif/stamp-h1
1298 libexif-install: libexif
1299 @$(SEP)
1300 ifneq ($(MEDIA_SERVER_STATIC),y)
1301 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1302 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1303 endif
1305 zlib/stamp-h1:
1306 cd zlib && \
1307 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1308 ./configure --shared --prefix=''
1309 touch zlib/stamp-h1
1311 zlib: zlib/stamp-h1
1312 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1314 zlib-clean:
1315 -@$(MAKE) -C zlib clean
1316 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1318 zlib-install: zlib
1319 @$(SEP)
1320 ifneq ($(MEDIA_SERVER_STATIC),y)
1321 install -d $(INSTALLDIR)/zlib/usr/lib
1322 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1323 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1324 endif
1325 ifeq ($(TCONFIG_BT),y)
1326 install -d $(INSTALLDIR)/zlib/usr/lib
1327 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1328 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1329 endif
1330 ifeq ($(TCONFIG_TOR),y)
1331 install -d $(INSTALLDIR)/zlib/usr/lib
1332 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1333 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1334 endif
1336 libid3tag/stamp-h1: zlib
1337 cd libid3tag && \
1338 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1339 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1340 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1341 --disable-debugging --disable-profiling
1342 touch libid3tag/stamp-h1
1344 libid3tag: libid3tag/stamp-h1 zlib
1345 @$(MAKE) -C libid3tag all
1347 libid3tag-clean:
1348 -@$(MAKE) -C libid3tag clean
1349 @rm -f libid3tag/stamp-h1
1351 libid3tag-install: libid3tag
1352 @$(SEP)
1353 ifneq ($(MEDIA_SERVER_STATIC),y)
1354 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1355 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1356 endif
1358 libvorbis/stamp-h1: libogg
1359 cd libvorbis && \
1360 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1361 CPPFLAGS="-I$(TOP)/libogg/include" \
1362 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1363 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1364 --with-ogg-includes="$(TOP)/libogg/include" \
1365 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1366 touch libvorbis/stamp-h1
1368 libvorbis: libvorbis/stamp-h1
1369 @$(MAKE) -C libvorbis/lib all
1371 libvorbis-clean:
1372 -@$(MAKE) -C libvorbis clean
1373 @rm -f libvorbis/stamp-h1
1375 libvorbis-install: libvorbis
1376 @$(SEP)
1377 ifneq ($(MEDIA_SERVER_STATIC),y)
1378 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1379 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1380 endif
1382 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1383 @$(SEP)
1384 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1387 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1388 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1389 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1390 $(CONFIGURE) --prefix=/usr
1392 igmpproxy: igmpproxy/src/Makefile
1393 @$(SEP)
1394 @$(MAKE) -C igmpproxy/src
1396 igmpproxy-install: igmpproxy
1397 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1398 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1400 igmpproxy-clean:
1401 -@$(MAKE) -C igmpproxy/src clean
1402 @rm -f igmpproxy/src/Makefile
1404 udev:
1405 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1406 PROGRAMS=udevtrigger
1408 udev-install: udev
1409 install -d $(INSTALLDIR)
1410 install -d $(TARGETDIR)
1411 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1413 hotplug2:
1414 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1416 hotplug2-install: hotplug2
1417 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1418 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1420 emf:
1421 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1423 emf-install: emf
1424 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1426 igs:
1427 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1429 igs-install: igs
1430 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1432 wanuptime: nvram shared
1433 @$(SEP)
1434 @$(MAKE) -C wanuptime
1436 wanuptime-clean:
1437 -@$(MAKE) -C wanuptime clean
1439 wanuptime-install:
1440 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1441 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1443 ebtables: dummy
1444 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1445 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1446 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1448 ebtables-install: ebtables
1449 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1451 @mkdir -p $(TARGETDIR)/rom/etc
1452 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1453 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1455 install -d $(INSTALLDIR)/ebtables/usr/lib
1456 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1457 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1458 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1460 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1461 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1462 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1464 ebtables-clean:
1465 -@$(MAKE) -C ebtables clean
1467 #Roadkill
1468 glib/stamp-h1:
1469 @$(SEP)
1470 @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 \
1471 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 \
1472 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 \
1473 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 \
1474 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
1475 @$(MAKE) -C glib
1476 touch glib/stamp-h1
1478 glib: glib/stamp-h1
1480 glib-clean:
1481 -@$(MAKE) -C glib clean
1482 rm -f glib/stamp-h1
1484 glib-install: glib
1485 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1487 #Roadkill
1488 nocat/stamp-h1: glib-install
1489 @$(SEP)
1490 @cd nocat && \
1491 NC_CONF_PATH="/" \
1492 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1493 @$(MAKE) -C nocat
1495 echo *** integrate glib to nocat installdir
1496 install -d $(INSTALLDIR)/nocat/usr/lib
1497 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1498 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1499 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1500 touch nocat/stamp-h1
1502 nocat: nocat/stamp-h1
1504 nocat-clean:
1505 -@$(MAKE) -C nocat clean
1506 rm -f nocat/stamp-h1
1508 nocat-install:
1509 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1510 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1511 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1512 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1514 lzo/stamp-h1:
1515 cd lzo && \
1516 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1517 touch lzo/stamp-h1
1519 lzo: lzo/stamp-h1
1521 lzo-clean:
1522 -@$(MAKE) -C lzo clean
1523 @rm -f lzo/stamp-h1
1525 lzo-install: lzo
1526 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1527 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1528 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1531 openvpn: openvpn/.conf openssl lzo
1533 openvpn/.conf:
1534 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1535 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1536 $(CONFIGURE) --prefix= \
1537 --with-lzo-headers="$(TOP)/lzo/include" \
1538 --with-ssl-headers="$(TOP)/openssl/include/" \
1539 --with-iproute-path="/usr/sbin/ip" \
1540 --disable-debug --disable-plugins --enable-management --enable-small \
1541 --disable-selinux --disable-socks --enable-password-save
1542 touch openvpn/.conf
1544 openvpn-clean:
1545 -@$(MAKE) -C openvpn clean
1546 @rm -f openvpn/.conf
1548 openvpn-install: openvpn
1549 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1550 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1551 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1553 #shibby
1554 libcurl/stamp-h1: zlib openssl
1555 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1556 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1557 CPPFLAGS="-I$(TOP)/zlib" \
1558 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1559 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1560 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1561 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1562 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1563 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1564 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1565 --without-gnutls --without-krb4 --without-libidn \
1566 --with-linux-headers=$(LINUXDIR)/include \
1567 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1568 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1569 touch libcurl/stamp-h1
1571 libcurl: libcurl/stamp-h1
1572 @$(MAKE) -C libcurl
1574 libcurl-clean:
1575 -@$(MAKE) -C libcurl clean
1576 @rm -f libcurl/stamp-h1 libcurl/Makefile
1578 libcurl-install: libcurl
1579 install -d $(INSTALLDIR)/libcurl/usr/lib
1580 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1581 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1582 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1583 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1584 ln -sf libcurl.so.4.2.0 libcurl.so
1586 libevent/stamp-h1:
1587 cd libevent && CC=$(CC) \
1588 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1589 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1590 $(CONFIGURE)
1591 touch libevent/stamp-h1
1593 libevent: libevent/stamp-h1
1594 @$(SEP)
1595 $(MAKE) -C libevent
1596 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1598 libevent-clean:
1599 -@$(MAKE) -C libevent clean
1600 @rm -f libevent/stamp-h1 libevent/Makefile
1601 @rm -rf libevent/staged
1603 libevent-install: libevent
1604 install -d $(INSTALLDIR)/libevent/usr/lib
1605 install libevent/.libs/libevent-2.0.so.5.1.6 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1606 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1608 libiconv/stamp-h1:
1609 cd libiconv && CC=$(CC) \
1610 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1611 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1612 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static
1613 touch libiconv/stamp-h1
1615 libiconv: libiconv/stamp-h1
1616 @$(SEP)
1617 $(MAKE) -C libiconv
1619 libiconv-clean:
1620 -@$(MAKE) -C libiconv clean
1621 @rm -f libiconv/stamp-h1 libiconv/Makefile
1623 libiconv-install: libiconv
1624 install -d $(INSTALLDIR)/libiconv/usr/lib
1625 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1626 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1628 transmission/stamp-h1: openssl libcurl libevent zlib libiconv
1629 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1630 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1631 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1632 -ffunction-sections -fdata-sections" \
1633 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
1634 -L$(TOP)/libiconv/lib/.libs -liconv" \
1635 CPPFLAGS="-I$(TOP)/zlib -I$(TOP)/libiconv/include" \
1636 ac_cv_header_libintl_h=yes HAVE_CXX=yes \
1637 am_cv_lib_iconv=yes ac_cv_func_iconv_open=yes \
1638 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-nls \
1639 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1640 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1641 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1642 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1643 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1644 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1645 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1646 touch transmission/stamp-h1
1648 transmission: transmission/stamp-h1
1649 @$(SEP)
1650 $(MAKE) -C transmission
1652 transmission-clean:
1653 -@$(MAKE) -C transmission clean
1654 @rm -f transmission/stamp-h1 transmission/Makefile
1656 transmission-install: transmission
1657 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1658 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1659 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1660 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1661 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1662 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1663 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1664 ifeq ($(TCONFIG_TR_EXTRAS),y)
1665 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1666 else
1667 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1668 endif
1670 btgui:
1671 @$(SEP)
1673 btgui-install: btgui
1674 install -d $(INSTALLDIR)/btgui/usr/bin
1675 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1677 libnfsidmap/stamp-h1:
1678 cd libnfsidmap && \
1679 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1680 ac_cv_func_malloc_0_nonnull=yes \
1681 ac_cv_func_realloc_0_nonnull=yes \
1682 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1683 touch libnfsidmap/stamp-h1
1685 libnfsidmap: libnfsidmap/stamp-h1
1686 @$(SEP)
1687 $(MAKE) -C libnfsidmap
1689 libnfsidmap-clean:
1690 -@$(MAKE) -C libnfsidmap clean
1691 @rm -f libnfsidmap/stamp-h1
1692 @rm -rf libnfsidmap/staged
1694 libnfsidmap-install: libnfsidmap
1695 install -d $(TOP)/libnfsidmap/staged
1696 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1698 portmap/stamp-h1:
1699 cd portmap \
1700 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1701 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1702 touch portmap/stamp-h1
1704 portmap: portmap/stamp-h1
1705 @$(SEP)
1706 $(MAKE) -C portmap
1708 portmap-clean:
1709 -@$(MAKE) -C portmap clean
1710 @rm -f portmap/stamp-h1
1712 portmap-install: portmap
1713 install -d $(INSTALLDIR)/portmap/usr/sbin
1714 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1715 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1717 e2fsprogs/stamp-h1:
1718 cd e2fsprogs && \
1719 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1720 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
1721 touch e2fsprogs/stamp-h1
1723 e2fsprogs: e2fsprogs/stamp-h1
1724 @$(SEP)
1725 $(MAKE) -C e2fsprogs
1727 e2fsprogs-clean:
1728 -@$(MAKE) -C e2fsprogs clean
1729 @rm -f e2fsprogs/stamp-h1
1730 @rm -f e2fsprogs/Makefile
1731 @rm -rf e2fsprogs/staged
1733 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1734 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1735 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1736 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1737 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1738 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1739 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1740 ac_cv_func_malloc_0_nonnull=yes \
1741 ac_cv_func_realloc_0_nonnull=yes \
1742 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1743 --enable-nfsv4 --enable-nfsv3
1744 touch nfs-utils/stamp-h1
1746 nfs-utils: nfs-utils/stamp-h1
1748 nfs-utils-clean:
1749 -@$(MAKE) -C nfs-utils clean
1750 @rm -f nfs-utils/stamp-h1
1752 nfs-utils-install: nfs-utils
1753 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1754 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1755 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1756 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1757 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1758 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1759 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1760 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1761 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1762 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1763 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1764 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1765 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1766 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1768 sd-idle/stamp-h1:
1769 cd sd-idle \
1770 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1771 $(MAKE) -C sd-idle
1772 chmod 0755 sd-idle/sd-idle
1773 touch sd-idle/stamp-h1
1775 sd-idle-clean:
1776 -@$(MAKE) -C sd-idle clean
1777 @rm -f sd-idle/stamp-h1
1779 sd-idle-install: sd-idle/stamp-h1
1780 install -d $(INSTALLDIR)/sd-idle/usr/bin
1781 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1782 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1784 snmp/stamp-h1:
1785 cd snmp && \
1786 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1787 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1788 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1789 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1790 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1791 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1792 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1793 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1794 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1795 touch snmp/stamp-h1
1797 snmp: snmp/stamp-h1
1798 @$(SEP)
1799 $(MAKE) -C snmp
1801 snmp-clean:
1802 -@$(MAKE) -C snmp clean
1803 @rm -f snmp/stamp-h1
1805 snmp-install: snmp
1806 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1807 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1809 apcupsd/stamp-h1:
1810 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1811 $(MAKE) configure && \
1812 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
1813 $(CONFIGURE) --prefix=/usr --without-x --enable-shared --enable-static --enable-usb --disable-pcnet --enable-cgi \
1814 --disable-lgd --enable-net --enable-powerflute --sysconfdir=/usr/local/apcupsd --bindir=/bin \
1815 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev= \
1816 touch apcupsd/stamp-h1
1818 apcupsd: apcupsd/stamp-h1
1819 $(MAKE) -C apcupsd
1821 apcupsd-clean:
1822 -@$(MAKE) -C apcupsd clean
1823 @rm -f apcupsd/stamp-h1
1824 @rm -f apcupsd/config*
1826 apcupsd-install: apcupsd
1827 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
1828 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
1829 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
1830 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
1831 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
1833 dnscrypt/stamp-h1:
1834 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1835 $(CONFIGURE) --prefix=/usr --disable-ssp --disable-largefile --disable-assert
1836 touch dnscrypt/stamp-h1
1838 dnscrypt: dnscrypt/stamp-h1
1840 dnscrypt-install: dnscrypt
1841 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1842 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1843 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1844 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1846 dnscrypt-clean:
1847 -@$(MAKE) -c dnscrypt clean
1848 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
1850 tor/stamp-h1: openssl zlib libevent
1851 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1852 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1853 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1854 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
1855 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib
1856 touch tor/stamp-h1
1858 tor: tor/stamp-h1
1860 tor-install: tor
1861 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
1862 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
1864 tor-clean:
1865 -@$(MAKE) -c tor clean
1866 @rm -rf tor/stamp-h1 tor/Makefile
1869 # Generic rules
1873 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1876 %-clean:
1877 @-[ ! -d $* ] || $(MAKE) -C $* clean
1879 %-distclean:
1880 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1882 %-install: %
1883 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1885 %-build:
1886 $(MAKE) $*-clean $*
1888 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1890 .PHONY: all clean distclean mrproper install package
1891 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1892 .PHONY: dummy libnet libpcap