Added IPSec support for K26 builds
[tomato.git] / release / src / router / Makefile
blob3cf0366a63981eb179d67a92d0b652828676ccc4
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
367 $(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
368 $(if $(TCONFIG_EBTABLES),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/bridge/netfilter/ebt*.*o $(PLATFORMDIR)/extras/ || true
370 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ifb.*o $(PLATFORMDIR)/extras/ || true
371 @mv $(TARGETDIR)/lib/modules/*/kernel/net/sched/sch_red.*o $(PLATFORMDIR)/extras/ || true
372 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/ntfs.*o $(PLATFORMDIR)/extras/ || true
373 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/smbfs.*o $(PLATFORMDIR)/extras/ || true
374 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/reiserfs.*o $(PLATFORMDIR)/extras/ || true
375 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/jfs.*o $(PLATFORMDIR)/extras/ || true
376 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfs.*o $(PLATFORMDIR)/extras/ || true
377 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nfsd.*o $(PLATFORMDIR)/extras/ || true
378 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/lockd.*o $(PLATFORMDIR)/extras/ || true
379 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/exportfs.*o $(PLATFORMDIR)/extras/ || true
380 $(if $(TCONFIG_NFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/sunrpc.*o $(PLATFORMDIR)/extras/ || true
381 @mv $(TARGETDIR)/lib/modules/*/kernel/net/auth_rpcgss.*o $(PLATFORMDIR)/extras/ || true
382 @mv $(TARGETDIR)/lib/modules/*/kernel/net/rpcsec_gss_krb5.*o $(PLATFORMDIR)/extras/ || true
383 @mv $(TARGETDIR)/lib/modules/*/kernel/fs/xfs.*o $(PLATFORMDIR)/extras/ || true
384 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/sr_mod.*o $(PLATFORMDIR)/extras/ || true
385 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/scanner.*o $(PLATFORMDIR)/extras/ || true
387 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbserial.*o $(PLATFORMDIR)/extras/ || true
388 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/option.*o $(PLATFORMDIR)/extras/ || true
389 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/sierra.*o $(PLATFORMDIR)/extras/ || true
390 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*acm.*o $(PLATFORMDIR)/extras/ || true
391 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ftdi_sio.*o $(PLATFORMDIR)/extras/ || true
392 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pl2303.*o $(PLATFORMDIR)/extras/ || true
394 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ch341.*o $(PLATFORMDIR)/extras/ || true
395 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbip*.*o $(PLATFORMDIR)/extras/ || true
396 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbkbd.*o $(PLATFORMDIR)/extras/ || true
397 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/usbmouse.*o $(PLATFORMDIR)/extras/ || true
398 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/hid*.*o $(PLATFORMDIR)/extras/ || true
399 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ipw.*o $(PLATFORMDIR)/extras/ || true
400 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/audio.*o $(PLATFORMDIR)/extras/ || true
401 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/ov51*.*o $(PLATFORMDIR)/extras/ || true
402 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/pwc*.*o $(PLATFORMDIR)/extras/ || true
403 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/emi*.*o $(PLATFORMDIR)/extras/ || true
404 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/mii.*o $(PLATFORMDIR)/extras/ || true
405 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_ether.*o $(PLATFORMDIR)/extras/ || true
406 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/cdc_subset.*o $(PLATFORMDIR)/extras/ || true
407 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/usbnet.*o $(PLATFORMDIR)/extras/ || true
408 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb/rndis_host.*o $(PLATFORMDIR)/extras/ || true
409 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/net/usb || true
410 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/media/* $(PLATFORMDIR)/extras/ || true
411 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/media || true
412 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/sound/* $(PLATFORMDIR)/extras/ || true
413 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/sound || true
414 @mv $(TARGETDIR)/lib/modules/*/kernel/sound/* $(PLATFORMDIR)/extras/ || true
415 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/sound || true
416 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/input/* $(PLATFORMDIR)/extras/ || true
417 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/input || true
418 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/hid/* $(PLATFORMDIR)/extras/ || true
419 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/hid || true
420 @cp -f $(TARGETDIR)/lib/modules/*/kernel/drivers/net/bcm57*.*o $(PLATFORMDIR)/extras/ || true
421 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ctf*.*o $(PLATFORMDIR)/extras/ || true
422 $(if $(TCONFIG_PPTP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pptp.*o $(PLATFORMDIR)/extras/ || true
423 $(if $(TCONFIG_L2TP),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/net/pppol2tp.*o $(PLATFORMDIR)/extras/ || true
424 @mv $(TARGETDIR)/lib/modules/*/kernel/drivers/net/ppp_deflate.*o $(PLATFORMDIR)/extras/ || true
425 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/crypto/*.ko $(PLATFORMDIR)/extras/ || true
426 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/libcrc32c.ko $(PLATFORMDIR)/extras/ || true
427 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/xfrm/*.ko $(PLATFORMDIR)/extras/ || true
428 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/key/*.ko $(PLATFORMDIR)/extras/ || true
429 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/xfrm*.ko $(PLATFORMDIR)/extras/ || true
430 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/tunnel*.ko $(PLATFORMDIR)/extras/ || true
431 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ah*.ko $(PLATFORMDIR)/extras/ || true
432 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/esp*.ko $(PLATFORMDIR)/extras/ || true
433 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv*/ipcomp*.ko $(PLATFORMDIR)/extras/ || true
434 $(if $(TCONFIG_IPSEC),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_policy.ko $(PLATFORMDIR)/extras/ || true
436 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp9*.*o $(PLATFORMDIR)/extras/ || true
437 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_cp1251.*o $(PLATFORMDIR)/extras/ || true
438 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-jp.*o $(PLATFORMDIR)/extras/ || true
439 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_sjis.*o $(PLATFORMDIR)/extras/ || true
440 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_gb2312.*o $(PLATFORMDIR)/extras/ || true
441 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_euc-kr.*o $(PLATFORMDIR)/extras/ || true
442 $(if $(NEED_EX_NLS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_big5.*o $(PLATFORMDIR)/extras/ || true
444 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/nls_*.*o $(PLATFORMDIR)/extras/ || true
445 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/usb/*.*o $(PLATFORMDIR)/extras/ || true
446 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi/*.*o $(PLATFORMDIR)/extras/ || true
447 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/leds/*.*o $(PLATFORMDIR)/extras/ || true
448 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/ext2.*o $(PLATFORMDIR)/extras/ || true
449 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/ext3.*o $(PLATFORMDIR)/extras/ || true
450 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/jbd.*o $(PLATFORMDIR)/extras/ || true
451 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/mbcache.*o $(PLATFORMDIR)/extras/ || true
452 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/fat.*o $(PLATFORMDIR)/extras/ || true
453 $(if $(TCONFIG_USB),@cp -f,$(if $(TCONFIG_SDHC),@cp -f,@mv)) $(TARGETDIR)/lib/modules/*/kernel/fs/vfat.*o $(PLATFORMDIR)/extras/ || true
454 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/msdos.*o $(PLATFORMDIR)/extras/ || true
455 $(if $(TCONFIG_USB),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/fuse.*o $(PLATFORMDIR)/extras/ || true
456 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfs.*o $(PLATFORMDIR)/extras/ || true
457 $(if $(TCONFIG_HFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/hfsplus.*o $(PLATFORMDIR)/extras/ || true
459 ifneq ($(TCONFIG_USB),y)
460 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/usb || true
461 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/scsi || true
462 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/leds || true
463 endif
465 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/connector/cn.*o $(PLATFORMDIR)/extras/ || true
466 $(if $(TCONFIG_USB_EXTRAS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/drivers/block/loop.*o $(PLATFORMDIR)/extras/ || true
467 ifneq ($(TCONFIG_USB_EXTRAS),y)
468 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/connector || true
469 @rm -rf $(TARGETDIR)/lib/modules/*/kernel/drivers/block || true
470 endif
471 $(if $(TCONFIG_CIFS),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/cifs.*o $(PLATFORMDIR)/extras/ || true
472 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs2.*o $(PLATFORMDIR)/extras/ || true
473 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@mv,@cp -f),@mv) $(TARGETDIR)/lib/modules/*/kernel/lib/zlib_*.*o $(PLATFORMDIR)/extras/ || true
474 $(if $(TCONFIG_JFFS2),$(if $(TCONFIG_JFFSV1),@cp -f,@mv),@mv) $(TARGETDIR)/lib/modules/*/kernel/fs/jffs.*o $(PLATFORMDIR)/extras/ || true
475 [ ! -f $(TARGETDIR)/lib/modules/*/kernel/lib/* ] && rm -rf $(TARGETDIR)/lib/modules/*/kernel/lib || true
476 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/ipv4/netfilter/ipt_layer7.*o $(PLATFORMDIR)/extras/ || true
477 $(if $(TCONFIG_L7),@cp -f,@mv) $(TARGETDIR)/lib/modules/*/kernel/net/netfilter/xt_layer7.*o $(PLATFORMDIR)/extras/ || true
479 @mkdir -p $(PLATFORMDIR)/extras/apps
480 @mkdir -p $(PLATFORMDIR)/extras/lib
482 @mv $(TARGETDIR)/usr/sbin/ttcp $(PLATFORMDIR)/extras/apps/ || true
483 @mv $(TARGETDIR)/usr/sbin/mii-tool $(PLATFORMDIR)/extras/apps/ || true
484 @mv $(TARGETDIR)/usr/sbin/robocfg $(PLATFORMDIR)/extras/apps/ || true
486 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/lib/libusb* $(PLATFORMDIR)/extras/lib/ || true
487 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/usb_modeswitch $(PLATFORMDIR)/extras/apps/ || true
488 @cp usbmodeswitch/usb_modeswitch.conf $(PLATFORMDIR)/extras/apps/usb_modeswitch.conf || true
489 @cp usbmodeswitch/usb_modeswitch.setup $(PLATFORMDIR)/extras/apps/usb_modeswitch.setup || true
490 @mkdir -p $(PLATFORMDIR)/extras/apps/usb_modeswitch.d
491 @cp -f usbmodeswitch/data/usb_modeswitch.d/* $(PLATFORMDIR)/extras/apps/usb_modeswitch.d || true
492 ifneq ($(NEED_EX_USB),y)
493 @rm -rf $(TARGETDIR)/rom/etc/usb_modeswitch.d || true
494 @rm -f $(TARGETDIR)/rom/etc/usb_modeswitch.conf || true
495 endif
496 $(if $(NEED_EX_USB),@cp -f,@mv) $(TARGETDIR)/usr/sbin/chat $(PLATFORMDIR)/extras/apps/ || true
498 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
499 ifeq ($(TCONFIG_L7PAT),y)
500 @cd layer7 && ./squish.sh
501 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
502 endif
504 ifeq ($(TCONFIG_PPTPD),y)
505 @mkdir -p $(TARGETDIR)/rom/etc/vpn
506 cp rc/vpn/* $(TARGETDIR)/rom/etc/vpn
507 chmod +x $(TARGETDIR)/rom/etc/vpn/*
508 endif
510 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/*/
511 @mv $(TARGETDIR)/lib/modules/*/modules.dep $(TARGETDIR)/lib/modules/
512 @echo ---
514 @rm -f $(TARGETDIR)/lib/modules/*/build
516 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs-lzma
517 @$(LINUXDIR)/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image -all-root -noappend -nopad | tee target.info
519 # Package kernel and filesystem
520 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
521 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
522 # $(MAKE) -C $(LINUXDIR) zImage ; \
523 # else \
524 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
525 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
526 # fi
528 # Pad self-booting Linux to a 64 KB boundary
529 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
530 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
531 # Append filesystem to self-booting Linux
532 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
535 libc: $(LIBDIR)/ld-uClibc.so.0
536 # $(MAKE) -C ../../../tools-src/uClibc all
537 # $(MAKE) -C ../../../tools-src/uClibc install
541 # cleaners
544 clean: clean-build $(obj-clean)
545 rm -rf layer7/squished
546 rm -f .ipv6-y .ipv6-n
547 rm -f .fullssl-y .fullssl-n
548 make -C config clean
550 clean-build: dummy
551 rm -rf $(TARGETDIR)
552 rm -rf $(INSTALLDIR)
553 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
554 rm -rf $(PLATFORMDIR)/extras
556 distclean: clean
557 ifneq ($(INSIDE_MAK),1)
558 $(MAKE) -C $(SRCBASE) $@ INSIDE_MAK=1
559 endif
560 # -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
563 # configuration
566 CONFIG_IN := config/config.in
568 config/conf config/mconf:
569 @$(MAKE) -C config
571 rconf: config/conf
572 @config/conf $(CONFIG_IN)
574 rmconf: config/mconf
575 @config/mconf $(CONFIG_IN)
577 roldconf: config/conf
578 @config/conf -o $(CONFIG_IN)
579 @$(MAKE) shared-clean rc-clean nvram-clean httpd-clean prebuilt-clean libbcmcrypto-clean dhcpv6-clean
581 kconf:
582 @$(MAKE) -C $(LINUXDIR) config
584 kmconf:
585 @$(MAKE) -C $(LINUXDIR) menuconfig
587 koldconf:
588 @$(MAKE) -C $(LINUXDIR) oldconfig
589 @$(MAKE) -C $(LINUXDIR) include/linux/version.h
591 bboldconf:
592 @$(MAKE) -C busybox oldconfig
594 config conf: rconf kconf
596 menuconfig mconf: rmconf kmconf
598 .ipv6-y .ipv6-n:
599 @rm -f .ipv6-y .ipv6-n
600 @$(MAKE) iptables-clean ebtables-clean pppd-clean zebra-clean dnsmasq-clean iproute2-clean
601 @touch $@
603 .fullssl-y .fullssl-n:
604 @rm -f .fullssl-y .fullssl-n
605 @$(MAKE) openssl-clean vsftpd-clean mssl-clean mdu-clean httpd-clean
606 @touch $@
608 dependconf: .ipv6-$(if $(TCONFIG_IPV6),y,n) .fullssl-$(if $(FULL_OPENSSL),y,n)
610 oldconfig oldconf: koldconf roldconf dependconf bboldconf
614 # overrides and extra dependencies
617 busybox: dummy
618 @$(MAKE) -C busybox EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)"
620 # V=1
622 busybox-install:
623 rm -rf $(INSTALLDIR)/busybox
624 $(MAKE) -C busybox install EXTRA_CFLAGS="-fPIC $(EXTRACFLAGS)" CONFIG_PREFIX=$(INSTALLDIR)/busybox
626 busybox-clean:
627 -@$(MAKE) -C busybox distclean
629 busybox-config:
630 $(MAKE) -C busybox menuconfig
633 httpd: shared nvram mssl
634 @$(SEP)
635 @$(MAKE) -C httpd
637 www-install:
638 @$(MAKE) -C www install INSTALLDIR=$(INSTALLDIR)/www TOMATO_EXPERIMENTAL=$(TOMATO_EXPERIMENTAL)
640 matrixssl:
641 @$(SEP)
642 @$(MAKE) -C matrixssl/src
644 matrixssl-install:
645 @true
647 matrixssl-clean:
648 -@$(MAKE) -C matrixssl/src clean
650 cyassl/stamp-h1:
651 @cd cyassl && CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
652 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections \
653 -DNO_MD4 -DNO_AES -DNO_ERROR_STRINGS -DNO_HC128 -DNO_RABBIT -DNO_PSK -DNO_DSA -DNO_DH -DNO_PWDBASED" \
654 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
655 PTHREAD_LIBS="-lpthread" \
656 $(CONFIGURE)
657 @touch cyassl/stamp-h1
659 cyassl: cyassl/stamp-h1
660 @$(SEP)
661 @$(MAKE) -C cyassl
663 cyassl-clean:
664 -@$(MAKE) -C cyassl clean
665 @rm -f cyassl/stamp-h1
667 cyassl-install:
668 @true
670 ifeq ($(FULL_OPENSSL),y)
671 OPENSSL_CIPHERS:=enable-rc5
672 else
673 OPENSSL_CIPHERS:=no-dh no-idea no-rc2 no-rc5 no-aes no-aes192 no-cast no-des no-modes no-engine
674 # no-tls1 no-tlsext
675 # openssl 1.0.1 doesn't build when using "no-tlsext" or "no-tls1"
676 endif
678 openssl/stamp-h1:
679 cd openssl && \
680 ./Configure linux-mipsel --openssldir=/etc --cross-compile-prefix=' ' \
681 -ffunction-sections -fdata-sections -Wl,--gc-sections \
682 shared $(OPENSSL_CIPHERS) \
683 no-sha0 no-smime no-camellia no-krb5 no-rmd160 no-ripemd \
684 no-seed no-capieng no-cms no-gms no-gmp no-rfc3779 \
685 no-ec no-ecdh no-ecdsa no-err no-hw no-jpake no-threads \
686 no-zlib no-engines no-sse2 no-perlasm \
687 no-dtls1 no-store no-psk no-md2 no-mdc2 no-ts
689 @$(MAKE) -C openssl clean
690 @touch openssl/stamp-h1
692 openssl: openssl/stamp-h1
694 openssl-clean:
695 -@$(MAKE) -C openssl clean
696 @rm -f openssl/stamp-h1
698 openssl-install: openssl
699 install -D openssl/libcrypto.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
700 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so.1.0.0
701 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libcrypto.so.1.0.0 libcrypto.so
703 install -D openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
704 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
705 chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/openssl
707 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
709 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
710 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
712 ifeq ($(FULL_OPENSSL),y)
713 install -D openssl/libssl.so.1.0.0 $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
714 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so.1.0.0
715 cd $(INSTALLDIR)/openssl/usr/lib && ln -sf libssl.so.1.0.0 libssl.so
716 endif
718 mssl: $(if $(FULL_OPENSSL),openssl,cyassl)
720 mdu: shared mssl
722 rc: nvram shared
724 bridge/Makefile:
725 cd bridge && CFLAGS="-Os -g $(EXTRACFLAGS)" \
726 $(CONFIGURE) --prefix="" --with-linux-headers=$(LINUXDIR)/include
728 bridge: bridge/Makefile
729 @$(SEP)
730 @$(MAKE) -C bridge
732 bridge-clean:
733 -@$(MAKE) -C bridge clean
734 @rm -f bridge/Makefile
736 bridge-install:
737 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
738 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
740 dnsmasq:
741 @$(SEP)
742 @$(MAKE) -C dnsmasq \
743 COPTS="$(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6) $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
744 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC"
746 dnsmasq-install:
747 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
748 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
750 iptables:
751 @$(SEP)
752 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) COPT_FLAGS="-Os $(EXTRACFLAGS) -U CONFIG_NVRAM_SIZE"
754 iptables-install:
755 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
756 cd $(INSTALLDIR)/iptables/usr/sbin && \
757 ln -sf iptables iptables-restore
759 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
760 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
762 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
764 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
765 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
766 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
768 ifeq ($(TCONFIG_IPV6),y)
769 install iptables/ip6tables $(INSTALLDIR)/iptables/usr/sbin/ip6tables
770 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/ip6tables
771 cd $(INSTALLDIR)/iptables/usr/sbin && \
772 ln -sf ip6tables ip6tables-restore
773 endif
775 iptables-clean:
776 -@$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
778 ppp:
779 @$(SEP)
780 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
781 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
783 ppp-%:
784 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp $(if $(TCONFIG_IPV6),HAVE_INET6=y,)
786 rp-pppoe/src/stamp-h1: rp-pppoe/src/Makefile.in
787 cd rp-pppoe/src && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
788 $(CONFIGURE) --prefix=/usr --enable-plugin=$(TOP)/pppd \
789 ac_cv_linux_kernel_pppoe=yes rpppoe_cv_pack_bitfields=rev
790 @touch rp-pppoe/src/stamp-h1
792 rp-pppoe: pppd rp-pppoe/src/stamp-h1
793 $(MAKE) -C rp-pppoe/src pppoe-relay rp-pppoe.so
795 rp-pppoe-clean:
796 -@$(MAKE) -C rp-pppoe/src clean
797 @rm -f rp-pppoe/src/pppoe-relay
798 @rm -f rp-pppoe/src/stamp-h1
800 rp-pppoe-install: rp-pppoe
801 install -D rp-pppoe/src/rp-pppoe.so $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/rp-pppoe.so
802 $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/lib/pppd/*.so
803 # install -D rp-pppoe/src/pppoe-relay $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
804 # $(STRIP) $(INSTALLDIR)/rp-pppoe/usr/sbin/pppoe-relay
807 upnp: nvram shared iptables
809 miniupnpd-config:
810 @cd miniupnpd && ./genconfig.sh
812 miniupnpd: iptables miniupnpd-config
813 @$(SEP)
814 $(MAKE) -C miniupnpd miniupnpd -f Makefile.linux \
815 TARGET_OPENWRT="not really" CC=$(CC) \
816 CFLAGS="-Wall -Os -D_GNU_SOURCE $(EXTRACFLAGS) -I$(TOP)/iptables/include" \
817 LDFLAGS="-L$(TOP)/iptables -liptc" LIBS=""
819 miniupnpd-clean:
820 -@$(MAKE) -C miniupnpd -f Makefile.linux clean
821 @rm -f miniupnpd/config.h
823 miniupnpd-install:
824 install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
825 $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
827 # !!TB
828 shared: busybox
830 vsftpd: $(if $(TCONFIG_FTP_SSL),openssl,)
831 @$(SEP)
832 $(MAKE) -C vsftpd
834 vsftpd-install: vsftpd
835 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
836 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
838 ntfs-3g/Makefile:
839 cd ntfs-3g && \
840 CC=$(CC) CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
841 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
842 $(CONFIGURE) --enable-shared=no --enable-static=no \
843 --disable-library --disable-ldconfig --disable-mount-helper --with-fuse=internal \
844 --disable-ntfsprogs --disable-crypto --without-uuid \
845 --disable-posix-acls --disable-nfconv --disable-dependency-tracking
847 ntfs-3g: ntfs-3g/Makefile
848 @$(MAKE) -C ntfs-3g
850 ntfs-3g-clean:
851 -@$(MAKE) -C ntfs-3g clean
852 @rm -f ntfs-3g/Makefile
854 ntfs-3g-install: ntfs-3g
855 install -D ntfs-3g/src/ntfs-3g $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
856 $(STRIP) -s $(INSTALLDIR)/ntfs-3g/bin/ntfs-3g
857 install -d $(INSTALLDIR)/ntfs-3g/sbin && cd $(INSTALLDIR)/ntfs-3g/sbin && \
858 ln -sf ../bin/ntfs-3g mount.ntfs-3g && \
859 ln -sf ../bin/ntfs-3g mount.ntfs
861 libusb10/Makefile: libusb10/Makefile.in
862 cd libusb10 && CFLAGS="-Os -Wall $(EXTRACFLAGS)" LIBS="-lpthread" \
863 $(CONFIGURE) --prefix=/usr ac_cv_lib_rt_clock_gettime=no
865 libusb10: libusb10/Makefile
866 $(MAKE) -C $@
868 libusb10-install: libusb10
869 install -D libusb10/libusb/.libs/libusb-1.0.so $(INSTALLDIR)/libusb10/usr/lib/libusb-1.0.so
870 $(STRIP) $(INSTALLDIR)/libusb10/usr/lib/*.so
872 libusb10-clean:
873 -@$(MAKE) -C $@ clean
874 @rm -rf libusb10/Makefile
876 libusb/Makefile: libusb/Makefile.in
877 cd libusb && CFLAGS="-Wall -Os $(EXTRACFLAGS)" \
878 $(CONFIGURE) --prefix=/usr \
879 LIBUSB_1_0_CFLAGS="-I$(TOP)/libusb10/libusb" \
880 LIBUSB_1_0_LIBS="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 -lpthread \
881 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share"
883 libusb: libusb10 libusb/Makefile
884 $(MAKE) -C $@
886 libusb-install: libusb
887 install -D libusb/libusb/.libs/libusb-0.1.so $(INSTALLDIR)/libusb/usr/lib/libusb-0.1.so
888 $(STRIP) $(INSTALLDIR)/libusb/usr/lib/*.so
890 libusb-clean:
891 -@$(MAKE) -C $@ clean
892 @rm -rf libusb/Makefile
894 usbmodeswitch: libusb10
895 $(MAKE) -C $@ CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -DLIBUSB10 \
896 -Wl,-R/lib:/usr/lib:/opt/usr/lib:/usr/local/share -lpthread \
897 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0"
899 usbmodeswitchdb-install:
900 @mkdir -p $(TARGETDIR)/rom/etc/usb_modeswitch.d
901 # compress whitespace
902 @for D in $(wildcard $(TOP)/usbmodeswitch/data/usb_modeswitch.d/*); do \
903 F=`basename $$D`; \
904 sed 's/###.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $$D > $(TARGETDIR)/rom/etc/usb_modeswitch.d/$$F; \
905 done
907 usbmodeswitch-install: usbmodeswitch usbmodeswitchdb-install
908 install -D usbmodeswitch/usb_modeswitch $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
909 $(STRIP) -s $(INSTALLDIR)/usbmodeswitch/usr/sbin/usb_modeswitch
910 @mkdir -p $(TARGETDIR)/rom/etc
911 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/usbmodeswitch/usb_modeswitch.conf > $(TARGETDIR)/rom/etc/usb_modeswitch.conf
914 radvd/stamp-h1:
915 cd radvd && CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
916 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
917 $(CONFIGURE) --prefix=""
918 @$(MAKE) -C radvd clean
919 @touch radvd/stamp-h1
921 radvd: radvd/stamp-h1
923 radvd-clean:
924 -@$(MAKE) -C radvd distclean
925 @rm -f radvd/stamp-h1
927 radvd-install: radvd
928 install -D radvd/radvd $(INSTALLDIR)/radvd/usr/sbin/radvd
929 $(STRIP) $(INSTALLDIR)/radvd/usr/sbin/radvd
931 dhcpv6/stamp-h1:
932 @cd dhcpv6 && \
933 CFLAGS="-Os -Wall $(EXTRACFLAGS) -D_GNU_SOURCE -ffunction-sections -fdata-sections" \
934 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
935 ac_cv_func_setpgrp_void=yes \
936 $(CONFIGURE) --prefix= --with-localdbdir=/var
937 @$(MAKE) -C dhcpv6 clean
938 @touch dhcpv6/stamp-h1
940 dhcpv6: dhcpv6/stamp-h1
941 @$(SEP)
942 @$(MAKE) -C dhcpv6 dhcp6c
944 dhcpv6-install: dhcpv6
945 install -D dhcpv6/dhcp6c $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
946 $(STRIP) $(INSTALLDIR)/dhcpv6/usr/sbin/dhcp6c
948 dhcpv6-clean:
949 -@$(MAKE) -C dhcpv6 clean
950 @rm -f dhcpv6/Makefile dhcpv6/stamp-h1
953 p910nd:
954 samba:
955 samba3:
957 nvram: shared
959 prebuilt: shared
961 vlan:
962 @$(SEP)
963 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
965 vlan-install:
966 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
967 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
970 pptp-client-install:
971 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
972 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
975 accel-pptp: pppd accel-pptp/Makefile
976 @$(MAKE) -C accel-pptp
978 accel-pptp/Makefile: accel-pptp/Makefile.in $(LINUXDIR)/include/linux/version.h
979 cd accel-pptp && CFLAGS="-g -O2 $(EXTRACFLAGS)" \
980 $(CONFIGURE) --prefix=/usr KDIR=$(LINUXDIR) PPPDIR=$(TOP)/pppd
982 accel-pptp-clean:
983 -@$(MAKE) -C accel-pptp clean
984 @rm -f accel-pptp/Makefile
986 accel-pptp-install: accel-pptp
987 install -D accel-pptp/src/.libs/pptp.so $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
988 $(STRIP) $(INSTALLDIR)/accel-pptp/usr/lib/pppd/pptp.so
990 pptpd/stamp-h1:
991 cd pptpd && $(CONFIGURE) --prefix=$(INSTALLDIR)/pptpd --enable-bcrelay CC=mipsel-uclibc-gcc \
992 STRIP=mipsel-uclibc-strip AR=mipsel-uclibc-ar LD=mipsel-uclibc-ld NM=mipsel-uclibc-nm RANLIB=mipsel-uclibc-ranlib
993 touch pptpd/stamp-h1
995 pptpd: pptpd/stamp-h1
997 pptpd-install: pptpd
998 @echo pptpd
999 @install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1000 @install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1001 @install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1002 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpd
1003 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
1004 @$(STRIP) $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
1006 pptpd-clean:
1007 -@$(MAKE) -C pptpd clean
1008 rm -rf pptpd/stamp-h1 pptpd/.deps
1010 pppd/Makefile: pppd/linux/Makefile.top
1011 cd pppd && $(CONFIGURE) --prefix=/usr --sysconfdir=/tmp
1013 pppd: pppd/Makefile
1014 @$(SEP)
1015 @$(MAKE) -C pppd MFLAGS='$(if $(TCONFIG_IPV6),HAVE_INET6=y,) EXTRACFLAGS="$(EXTRACFLAGS)"'
1017 pppd-clean:
1018 -@$(MAKE) -C pppd clean
1019 @rm -f pppd/Makefile
1021 pppd-install: pppd
1022 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1023 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1024 install -D pppd/chat/chat $(INSTALLDIR)/pppd/usr/sbin/chat
1025 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/chat
1026 ifeq ($(TCONFIG_L2TP),y)
1027 install -D pppd/pppd/plugins/pppol2tp/pppol2tp.so $(INSTALLDIR)/pppd/usr/lib/pppd/pppol2tp.so
1028 $(STRIP) $(INSTALLDIR)/pppd/usr/lib/pppd/*.so
1029 endif
1031 # ipupdate-install:
1032 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1033 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1035 zebra/stamp-h1:
1036 @cd zebra && rm -f config.cache && \
1037 CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD) \
1038 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1039 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1040 $(CONFIGURE) --sysconfdir=/etc \
1041 --enable-netlink $(if $(TCONFIG_IPV6),--enable-ipv6,--disable-ipv6) --disable-ripngd --disable-ospfd --disable-doc \
1042 --disable-ospf6d --disable-bgpd --disable-bgpd-announce
1043 @touch zebra/stamp-h1
1045 zebra: zebra/stamp-h1
1046 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) LD=$(LD)
1048 zebra-clean:
1049 -@$(MAKE) -C zebra clean
1050 @rm -f zebra/stamp-h1
1052 zebra-install: zebra
1053 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1054 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1055 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1056 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1057 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1058 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
1061 rp-l2tp-install:
1062 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1063 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
1064 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
1065 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1066 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
1067 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1068 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
1070 xl2tpd: pppd
1071 CFLAGS="-g $(EXTRACFLAGS)" $(MAKE) -C $@ PREFIX=/usr xl2tpd
1073 xl2tpd-install: xl2tpd
1074 install -D xl2tpd/xl2tpd $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1075 $(STRIP) $(INSTALLDIR)/xl2tpd/usr/sbin/xl2tpd
1078 bpalogin-install:
1079 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1080 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1083 # libnet:
1084 # @$(SEP)
1085 # @-mkdir -p libnet/lib
1086 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1088 # libpcap:
1089 # @$(SEP)
1090 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
1092 libbcm:
1093 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
1095 libbcm-install:
1096 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1097 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
1100 iproute2:
1101 @$(SEP)
1102 @$(MAKE) -C $@ KERNEL_INCLUDE=$(LINUXDIR)/include EXTRACFLAGS="$(EXTRACFLAGS) $(if $(TCONFIG_IPV6),-DUSE_IPV6,-DNO_IPV6)"
1104 iproute2-install: iproute2
1105 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1106 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1107 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1108 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1111 ntpc: nvram shared
1114 dropbear: dropbear/config.h
1115 @$(SEP)
1116 @$(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
1118 dropbear-install:
1119 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1120 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
1121 cd $(INSTALLDIR)/dropbear/usr/bin && \
1122 ln -sf dropbearmulti dropbear && \
1123 ln -sf dropbearmulti dropbearconvert && \
1124 ln -sf dropbearmulti dropbearkey && \
1125 ln -sf dropbearmulti dbclient && \
1126 ln -sf dropbearmulti ssh && \
1127 ln -sf dropbearmulti scp
1129 dropbear-clean:
1130 -@$(MAKE) -C dropbear clean
1131 @rm -f dropbear/config.h
1133 dropbear/config.h:
1134 cd dropbear && \
1135 CFLAGS="-Os -Wall $(EXTRACFLAGS) -DARGTYPE=3 -ffunction-sections -fdata-sections" \
1136 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1137 ac_cv_func_logout=no ac_cv_func_logwtmp=no \
1138 $(CONFIGURE) --disable-zlib --enable-syslog --disable-lastlog --disable-utmp \
1139 --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline \
1140 --disable-pututxline --disable-loginfunc --disable-pam --enable-openpty --enable-bundled-libtom
1141 @$(MAKE) -C dropbear clean
1143 # Media libraries
1145 sqlite/stamp-h1:
1146 cd sqlite && \
1147 CC=$(CC) CFLAGS="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1148 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1149 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static \
1150 --disable-readline --disable-dynamic-extensions --enable-threadsafe
1151 touch sqlite/stamp-h1
1153 sqlite: sqlite/stamp-h1
1154 @$(MAKE) -C sqlite all
1156 sqlite-clean:
1157 -@$(MAKE) -C sqlite clean
1158 @rm -f sqlite/stamp-h1
1160 sqlite-install: sqlite
1161 @$(SEP)
1162 ifneq ($(MEDIA_SERVER_STATIC),y)
1163 install -D sqlite/.libs/libsqlite3.so.0 $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1164 $(STRIP) $(INSTALLDIR)/sqlite/usr/lib/libsqlite3.so.0
1165 endif
1167 FFMPEG_FILTER_CONFIG= $(foreach c, $(2), --$(1)="$(c)")
1169 FFMPEG_DECODERS:=aac ac3 atrac3 flac h264 jpegls mp3 mpeg1video mpeg2video mpeg4 mpeg4aac mpegvideo png wmav1 wmav2
1170 FFMPEG_CONFIGURE_DECODERS:=$(call FFMPEG_FILTER_CONFIG,enable-decoder,$(FFMPEG_DECODERS))
1172 FFMPEG_PARSERS:=aac ac3 h264 mpeg4video mpegaudio mpegvideo
1173 FFMPEG_CONFIGURE_PARSERS:=$(call FFMPEG_FILTER_CONFIG,enable-parser,$(FFMPEG_PARSERS))
1175 FFMPEG_PROTOCOLS:=file
1176 FFMPEG_CONFIGURE_PROTOCOLS:=$(call FFMPEG_FILTER_CONFIG,enable-protocol,$(FFMPEG_PROTOCOLS))
1178 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
1179 FFMPEG_CONFIGURE_DEMUXERS:=$(call FFMPEG_FILTER_CONFIG,disable-demuxer,$(FFMPEG_DISABLED_DEMUXERS))
1181 ffmpeg/stamp-h1: zlib
1182 cd ffmpeg && symver_asm_label=no symver_gnu_asm=no symver=no CC=$(CC) \
1183 ./configure --enable-cross-compile --arch=mips --target_os=linux \
1184 --cross-prefix=$(CROSS_COMPILE) --enable-shared --enable-gpl --disable-doc \
1185 --enable-pthreads --enable-small --disable-encoders --disable-filters \
1186 --disable-muxers --disable-devices --disable-ffmpeg --disable-ffplay \
1187 --disable-ffserver --disable-ffprobe --disable-avdevice --disable-swscale \
1188 --disable-hwaccels --disable-network --disable-bsfs --disable-mpegaudio-hp \
1189 --enable-demuxers $(FFMPEG_CONFIGURE_DEMUXERS) \
1190 --disable-decoders $(FFMPEG_CONFIGURE_DECODERS) \
1191 --disable-parsers $(FFMPEG_CONFIGURE_PARSERS) \
1192 --disable-protocols $(FFMPEG_CONFIGURE_PROTOCOLS) \
1193 --extra-cflags="-Os $(EXTRACFLAGS) -ffunction-sections -fdata-sections -fPIC -I$(TOP)/zlib" \
1194 --extra-ldflags="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1195 --extra-libs="-L$(TOP)/zlib -lz" \
1196 --enable-zlib --disable-debug --prefix=''
1197 touch ffmpeg/stamp-h1
1199 ffmpeg: ffmpeg/stamp-h1 zlib
1200 @$(MAKE) -C ffmpeg all
1202 ffmpeg-clean:
1203 -@$(MAKE) -C ffmpeg clean
1204 @rm -f ffmpeg/stamp-h1 ffmpeg/config.h ffmpeg/config.mak
1206 ffmpeg-install: ffmpeg
1207 @$(SEP)
1208 ifneq ($(MEDIA_SERVER_STATIC),y)
1209 install -D ffmpeg/libavformat/libavformat.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1210 install -D ffmpeg/libavcodec/libavcodec.so.52 $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1211 install -D ffmpeg/libavutil/libavutil.so.50 $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1212 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavformat.so.52
1213 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavcodec.so.52
1214 $(STRIP) $(INSTALLDIR)/ffmpeg/usr/lib/libavutil.so.50
1215 endif
1217 libogg/stamp-h1:
1218 cd libogg && \
1219 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1220 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1221 $(CONFIGURE) --enable-shared --enable-static --prefix=''
1222 touch libogg/stamp-h1
1224 libogg: libogg/stamp-h1
1225 @$(MAKE) -C libogg all
1227 libogg-clean:
1228 -@$(MAKE) -C libogg clean
1229 @rm -f libogg/stamp-h1
1231 libogg-install: libogg
1232 @$(SEP)
1233 ifneq ($(MEDIA_SERVER_STATIC),y)
1234 install -D libogg/src/.libs/libogg.so.0 $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1235 $(STRIP) $(INSTALLDIR)/libogg/usr/lib/libogg.so.0
1236 endif
1238 flac/stamp-h1: libogg
1239 cd flac && \
1240 CFLAGS="-Os $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1241 CPPFLAGS="-I$(TOP)/libogg/include" \
1242 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1243 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-rpath \
1244 --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs \
1245 --without-libiconv-prefix --disable-altivec --disable-3dnow --disable-sse
1246 touch flac/stamp-h1
1248 flac: flac/stamp-h1 libogg
1249 @$(MAKE) -C flac/src/libFLAC all
1251 flac-clean:
1252 -@$(MAKE) -C flac clean
1253 @rm -f flac/stamp-h1
1255 flac-install: flac
1256 @$(SEP)
1257 ifneq ($(MEDIA_SERVER_STATIC),y)
1258 install -D flac/src/libFLAC/.libs/libFLAC.so.8 $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1259 $(STRIP) $(INSTALLDIR)/flac/usr/lib/libFLAC.so.8
1260 endif
1262 jpeg/stamp-h1:
1263 cd jpeg && \
1264 CFLAGS="-Os $(EXTRACFLAGS) -fPIC" CC=$(CC) AR2="touch" $(CONFIGURE) --enable-shared --enable-static --prefix=''
1265 touch jpeg/stamp-h1
1267 jpeg: jpeg/stamp-h1
1268 @$(MAKE) -C jpeg LIBTOOL="" O=o A=a CC=$(CC) AR2="touch" libjpeg.a libjpeg.so
1270 jpeg-clean:
1271 -@$(MAKE) -C jpeg clean
1272 @rm -f jpeg/stamp-h1 jpeg/Makefile
1274 jpeg-install: jpeg
1275 @$(SEP)
1276 ifneq ($(MEDIA_SERVER_STATIC),y)
1277 install -D jpeg/libjpeg.so $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1278 $(STRIP) $(INSTALLDIR)/jpeg/usr/lib/libjpeg.so
1279 endif
1281 libexif/stamp-h1:
1282 cd libexif && CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1283 LDFLAGS="-fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1284 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1285 --disable-docs --disable-rpath --disable-nls --without-libiconv-prefix --without-libintl-prefix
1286 touch libexif/stamp-h1
1288 libexif: libexif/stamp-h1
1289 @$(MAKE) -C libexif all
1291 libexif-clean:
1292 -@$(MAKE) -C libexif clean
1293 @rm -f libexif/stamp-h1
1295 libexif-install: libexif
1296 @$(SEP)
1297 ifneq ($(MEDIA_SERVER_STATIC),y)
1298 install -D libexif/libexif/.libs/libexif.so.12 $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1299 $(STRIP) $(INSTALLDIR)/libexif/usr/lib/libexif.so.12
1300 endif
1302 zlib/stamp-h1:
1303 cd zlib && \
1304 CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1305 ./configure --shared --prefix=''
1306 touch zlib/stamp-h1
1308 zlib: zlib/stamp-h1
1309 @$(MAKE) -C zlib CC=$(CC) AR="ar rc" RANLIB=$(RANLIB) LD=$(LD) all
1311 zlib-clean:
1312 -@$(MAKE) -C zlib clean
1313 @rm -f zlib/stamp-h1 zlib/Makefile zlib/zconf.h zlib/zlib.pc
1315 zlib-install: zlib
1316 @$(SEP)
1317 ifneq ($(MEDIA_SERVER_STATIC),y)
1318 install -d $(INSTALLDIR)/zlib/usr/lib
1319 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1320 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1321 endif
1322 ifeq ($(TCONFIG_BT),y)
1323 install -d $(INSTALLDIR)/zlib/usr/lib
1324 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1325 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1326 endif
1327 ifeq ($(TCONFIG_TOR),y)
1328 install -d $(INSTALLDIR)/zlib/usr/lib
1329 install -D zlib/libz.so.1 $(INSTALLDIR)/zlib/usr/lib/
1330 $(STRIP) $(INSTALLDIR)/zlib/usr/lib/libz.so.1
1331 endif
1333 libid3tag/stamp-h1: zlib
1334 cd libid3tag && \
1335 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" CPPFLAGS="-I$(TOP)/zlib" \
1336 LDFLAGS="-L$(TOP)/zlib -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1337 $(CONFIGURE) --enable-shared --enable-static --prefix='' \
1338 --disable-debugging --disable-profiling
1339 touch libid3tag/stamp-h1
1341 libid3tag: libid3tag/stamp-h1 zlib
1342 @$(MAKE) -C libid3tag all
1344 libid3tag-clean:
1345 -@$(MAKE) -C libid3tag clean
1346 @rm -f libid3tag/stamp-h1
1348 libid3tag-install: libid3tag
1349 @$(SEP)
1350 ifneq ($(MEDIA_SERVER_STATIC),y)
1351 install -D libid3tag/.libs/libid3tag.so.0 $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1352 $(STRIP) $(INSTALLDIR)/libid3tag/usr/lib/libid3tag.so.0
1353 endif
1355 libvorbis/stamp-h1: libogg
1356 cd libvorbis && \
1357 CFLAGS="-Os -Wall $(EXTRACFLAGS) -fPIC -ffunction-sections -fdata-sections" \
1358 CPPFLAGS="-I$(TOP)/libogg/include" \
1359 LDFLAGS="-L$(TOP)/libogg/src/.libs -fPIC -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1360 $(CONFIGURE) --enable-shared --enable-static --prefix='' --disable-oggtest \
1361 --with-ogg-includes="$(TOP)/libogg/include" \
1362 --with-ogg-libraries="$(TOP)/libogg/src/.libs"
1363 touch libvorbis/stamp-h1
1365 libvorbis: libvorbis/stamp-h1
1366 @$(MAKE) -C libvorbis/lib all
1368 libvorbis-clean:
1369 -@$(MAKE) -C libvorbis clean
1370 @rm -f libvorbis/stamp-h1
1372 libvorbis-install: libvorbis
1373 @$(SEP)
1374 ifneq ($(MEDIA_SERVER_STATIC),y)
1375 install -D libvorbis/lib/.libs/libvorbis.so.0 $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1376 $(STRIP) $(INSTALLDIR)/libvorbis/usr/lib/libvorbis.so.0
1377 endif
1379 minidlna: zlib sqlite ffmpeg libogg flac jpeg libexif libid3tag libvorbis
1380 @$(SEP)
1381 @$(MAKE) -C minidlna CC=$(CC) $(if $(MEDIA_SERVER_STATIC),STATIC=1,) minidlna
1384 igmpproxy/src/Makefile: igmpproxy/src/Makefile.in
1385 cd igmpproxy && CFLAGS="-O2 -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1386 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1387 $(CONFIGURE) --prefix=/usr
1389 igmpproxy: igmpproxy/src/Makefile
1390 @$(SEP)
1391 @$(MAKE) -C igmpproxy/src
1393 igmpproxy-install: igmpproxy
1394 install -D igmpproxy/src/igmpproxy $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1395 $(STRIP) $(INSTALLDIR)/igmpproxy/usr/sbin/igmpproxy
1397 igmpproxy-clean:
1398 -@$(MAKE) -C igmpproxy/src clean
1399 @rm -f igmpproxy/src/Makefile
1401 udev:
1402 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)" \
1403 PROGRAMS=udevtrigger
1405 udev-install: udev
1406 install -d $(INSTALLDIR)
1407 install -d $(TARGETDIR)
1408 $(MAKE) -C udev DESTDIR=$(INSTALLDIR) prefix=/udev install-udevtrigger
1410 hotplug2:
1411 $(MAKE) -C $@ CROSS_COMPILE=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1413 hotplug2-install: hotplug2
1414 $(MAKE) -C hotplug2 install PREFIX=$(INSTALLDIR)/hotplug2 SUBDIRS=""
1415 $(MAKE) -C hotplug2/examples install PREFIX=$(INSTALLDIR)/hotplug2/rom KERNELVER=$(LINUX_KERNEL)
1417 emf:
1418 $(MAKE) -C $(SRCBASE)/emf/emfconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1420 emf-install: emf
1421 $(MAKE) -C $(SRCBASE)/emf/emfconf INSTALLDIR=$(INSTALLDIR) install
1423 igs:
1424 $(MAKE) -C $(SRCBASE)/emf/igsconf CROSS=$(CROSS_COMPILE) EXTRACFLAGS="$(EXTRACFLAGS)"
1426 igs-install: igs
1427 $(MAKE) -C $(SRCBASE)/emf/igsconf INSTALLDIR=$(INSTALLDIR) install
1429 wanuptime: nvram shared
1430 @$(SEP)
1431 @$(MAKE) -C wanuptime
1433 wanuptime-clean:
1434 -@$(MAKE) -C wanuptime clean
1436 wanuptime-install:
1437 install -D wanuptime/wanuptime $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1438 $(STRIP) $(INSTALLDIR)/wanuptime/usr/sbin/wanuptime
1440 ebtables: dummy
1441 $(MAKE) -C ebtables CC=$(CC) LD=$(LD) \
1442 CFLAGS="-Os $(EXTRACFLAGS) -DEBT_MIN_ALIGN=4 -Wall -Wunused" \
1443 BINDIR="/usr/sbin" LIBDIR="/usr/lib/ebtables" KERNEL_INCLUDES=$(LINUXDIR)/include $(if $(TCONFIG_IPV6),DO_IPV6=1,)
1445 ebtables-install: ebtables
1446 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1448 @mkdir -p $(TARGETDIR)/rom/etc
1449 @sed 's/#.*//g;s/[ \t]\+/ /g;s/^[ \t]*//;s/[ \t]*$$//;/^$$/d' < $(TOP)/ebtables/ethertypes > $(TARGETDIR)/rom/etc/ethertypes
1450 chmod 0644 $(TARGETDIR)/rom/etc/ethertypes
1452 install -d $(INSTALLDIR)/ebtables/usr/lib
1453 install -d $(INSTALLDIR)/ebtables/usr/lib/ebtables
1454 install -D ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
1455 install -D ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/ebtables/
1457 $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
1458 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/ebtables/*.so
1459 $(STRIP) $(INSTALLDIR)/ebtables/usr/lib/libebt*.so
1461 ebtables-clean:
1462 -@$(MAKE) -C ebtables clean
1464 #Roadkill
1465 glib/stamp-h1:
1466 @$(SEP)
1467 @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 \
1468 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 \
1469 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 \
1470 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 \
1471 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
1472 @$(MAKE) -C glib
1473 touch glib/stamp-h1
1475 glib: glib/stamp-h1
1477 glib-clean:
1478 -@$(MAKE) -C glib clean
1479 rm -f glib/stamp-h1
1481 glib-install: glib
1482 @$(MAKE) -C glib DESTDIR=$(INSTALLDIR)/glib install
1484 #Roadkill
1485 nocat/stamp-h1: glib-install
1486 @$(SEP)
1487 @cd nocat && \
1488 NC_CONF_PATH="/" \
1489 $(CONFIGURE) --with-firewall=iptables --with-glib-prefix="$(INSTALLDIR)/glib/usr" --localstatedir=/var --sysconfdir=/etc
1490 @$(MAKE) -C nocat
1492 echo *** integrate glib to nocat installdir
1493 install -d $(INSTALLDIR)/nocat/usr/lib
1494 install -D glib/.libs/libglib-1.2.so.0.0.10 $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1495 cd $(INSTALLDIR)/nocat/usr/lib && ln -s libglib-1.2.so.0.0.10 libglib-1.2.so.0
1496 $(STRIP) $(INSTALLDIR)/nocat/usr/lib/libglib-1.2.so.0.0.10
1497 touch nocat/stamp-h1
1499 nocat: nocat/stamp-h1
1501 nocat-clean:
1502 -@$(MAKE) -C nocat clean
1503 rm -f nocat/stamp-h1
1505 nocat-install:
1506 install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
1507 $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
1508 mkdir -p $(INSTALLDIR)/nocat/usr/libexec/nocat
1509 install -D nocat/libexec/iptables/* $(INSTALLDIR)/nocat/usr/libexec/nocat
1511 lzo/stamp-h1:
1512 cd lzo && \
1513 CFLAGS="-Os -Wall $(EXTRACFLAGS)" $(CONFIGURE) --enable-shared --enable-static
1514 touch lzo/stamp-h1
1516 lzo: lzo/stamp-h1
1518 lzo-clean:
1519 -@$(MAKE) -C lzo clean
1520 @rm -f lzo/stamp-h1
1522 lzo-install: lzo
1523 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1524 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
1525 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
1528 openvpn: openvpn/.conf openssl lzo
1530 openvpn/.conf:
1531 cd openvpn && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1532 LDFLAGS="-L$(TOP)/openssl -L$(TOP)/lzo/src/.libs -ffunction-sections -fdata-sections -Wl,--gc-sections" \
1533 $(CONFIGURE) --prefix= \
1534 --with-lzo-headers="$(TOP)/lzo/include" \
1535 --with-ssl-headers="$(TOP)/openssl/include/" \
1536 --with-iproute-path="/usr/sbin/ip" \
1537 --disable-debug --disable-plugins --enable-management --enable-small \
1538 --disable-selinux --disable-socks --enable-password-save
1539 touch openvpn/.conf
1541 openvpn-clean:
1542 -@$(MAKE) -C openvpn clean
1543 @rm -f openvpn/.conf
1545 openvpn-install: openvpn
1546 install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1547 $(STRIP) -s $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1548 chmod 0500 $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1550 #shibby
1551 libcurl/stamp-h1: zlib openssl
1552 cd libcurl && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1553 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1554 CPPFLAGS="-I$(TOP)/zlib" \
1555 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1556 $(CONFIGURE) --prefix=/usr --disable-thread --enable-shared --enable-static \
1557 --enable-ares --enable-cookies --enable-crypto-auth --enable-nonblocking \
1558 --enable-file --enable-ftp --enable-http --enable-ipv6 --enable-tftp \
1559 --disable-nls --disable-ares --disable-dict --disable-debug --disable-gopher \
1560 --disable-ldap --disable-manual --disable-telnet --disable-verbose \
1561 --with-random="/dev/urandom" --with-ssl="$(TOP)/openssl" \
1562 --without-gnutls --without-krb4 --without-libidn \
1563 --with-linux-headers=$(LINUXDIR)/include \
1564 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1565 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1566 touch libcurl/stamp-h1
1568 libcurl: libcurl/stamp-h1
1569 @$(MAKE) -C libcurl
1571 libcurl-clean:
1572 -@$(MAKE) -C libcurl clean
1573 @rm -f libcurl/stamp-h1 libcurl/Makefile
1575 libcurl-install: libcurl
1576 install -d $(INSTALLDIR)/libcurl/usr/lib
1577 install -D libcurl/lib/.libs/libcurl.so.4.2.0 $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1578 $(STRIP) -s $(INSTALLDIR)/libcurl/usr/lib/libcurl.so.4.2.0
1579 cd $(INSTALLDIR)/libcurl/usr/lib/ && \
1580 ln -sf libcurl.so.4.2.0 libcurl.so.4 && \
1581 ln -sf libcurl.so.4.2.0 libcurl.so
1583 libevent/stamp-h1:
1584 cd libevent && CC=$(CC) \
1585 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1586 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1587 $(CONFIGURE)
1588 touch libevent/stamp-h1
1590 libevent: libevent/stamp-h1
1591 @$(SEP)
1592 $(MAKE) -C libevent
1593 $(MAKE) -C libevent DESTDIR=$(TOP)/libevent/staged install
1595 libevent-clean:
1596 -@$(MAKE) -C libevent clean
1597 @rm -f libevent/stamp-h1 libevent/Makefile
1598 @rm -rf libevent/staged
1600 libevent-install: libevent
1601 install -d $(INSTALLDIR)/libevent/usr/lib
1602 install libevent/.libs/libevent-2.0.so.5.1.6 $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1603 $(STRIP) -s $(INSTALLDIR)/libevent/usr/lib/libevent-2.0.so.5
1605 libiconv/stamp-h1:
1606 cd libiconv && CC=$(CC) \
1607 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1608 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1609 $(CONFIGURE) --prefix=/usr --disable-nls --enable-static
1610 touch libiconv/stamp-h1
1612 libiconv: libiconv/stamp-h1
1613 @$(SEP)
1614 $(MAKE) -C libiconv
1616 libiconv-clean:
1617 -@$(MAKE) -C libiconv clean
1618 @rm -f libiconv/stamp-h1 libiconv/Makefile
1620 libiconv-install: libiconv
1621 install -d $(INSTALLDIR)/libiconv/usr/lib
1622 install libiconv/lib/.libs/libiconv.so.2.4.0 $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1623 $(STRIP)-s $(INSTALLDIR)/libiconv/usr/lib/libiconv.so.2
1625 transmission/stamp-h1: openssl libcurl libevent zlib libiconv
1626 cd transmission && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1627 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1628 --param large-function-growth=800 --param max-inline-insns-single=3000 \
1629 -ffunction-sections -fdata-sections" \
1630 LDFLAGS="-L$(TOP)/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC \
1631 -L$(TOP)/libiconv/lib/.libs -liconv" \
1632 CPPFLAGS="-I$(TOP)/zlib -I$(TOP)/libiconv/include" \
1633 ac_cv_header_libintl_h=yes HAVE_CXX=yes \
1634 am_cv_lib_iconv=yes ac_cv_func_iconv_open=yes \
1635 $(CONFIGURE) --target=mipsel-linux --prefix=/usr --disable-nls \
1636 --enable-lightweight --enable-largefile --enable-utp --without-gtk \
1637 LIBCURL_CFLAGS="-I$(TOP)/libcurl/include" \
1638 LIBCURL_LIBS="-L$(TOP)/libcurl/lib/.libs/ -lcurl" \
1639 LIBEVENT_CFLAGS="-I$(TOP)/libevent/include" \
1640 LIBEVENT_LIBS="-L$(TOP)/libevent/.libs -levent" \
1641 OPENSSL_CFLAGS="-I$(TOP)/openssl/include" \
1642 OPENSSL_LIBS="-L$(TOP)/openssl -lcrypto -lssl"
1643 touch transmission/stamp-h1
1645 transmission: transmission/stamp-h1
1646 @$(SEP)
1647 $(MAKE) -C transmission
1649 transmission-clean:
1650 -@$(MAKE) -C transmission clean
1651 @rm -f transmission/stamp-h1 transmission/Makefile
1653 transmission-install: transmission
1654 $(MAKE) -C transmission DESTDIR=$(INSTALLDIR)/transmission install-strip
1655 @rm -rf $(INSTALLDIR)/transmission/usr/share/man
1656 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-cli
1657 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-show
1658 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-edit
1659 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-create
1660 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-daemon
1661 ifeq ($(TCONFIG_TR_EXTRAS),y)
1662 $(STRIP) -s $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1663 else
1664 @rm -rf $(INSTALLDIR)/transmission/usr/bin/transmission-remote
1665 endif
1667 btgui:
1668 @$(SEP)
1670 btgui-install: btgui
1671 install -d $(INSTALLDIR)/btgui/usr/bin
1672 install -D transmission/btcheck $(INSTALLDIR)/btgui/usr/bin/btcheck
1674 libnfsidmap/stamp-h1:
1675 cd libnfsidmap && \
1676 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1677 ac_cv_func_malloc_0_nonnull=yes \
1678 ac_cv_func_realloc_0_nonnull=yes \
1679 $(CONFIGURE) --prefix=/usr --enable-shared --enable-static
1680 touch libnfsidmap/stamp-h1
1682 libnfsidmap: libnfsidmap/stamp-h1
1683 @$(SEP)
1684 $(MAKE) -C libnfsidmap
1686 libnfsidmap-clean:
1687 -@$(MAKE) -C libnfsidmap clean
1688 @rm -f libnfsidmap/stamp-h1
1689 @rm -rf libnfsidmap/staged
1691 libnfsidmap-install: libnfsidmap
1692 install -d $(TOP)/libnfsidmap/staged
1693 $(MAKE) -C libnfsidmap DESTDIR=$(TOP)/libnfsidmap/staged install
1695 portmap/stamp-h1:
1696 cd portmap \
1697 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1698 $(MAKE) -C portmap CC=$(CC) AR=$(AR) LD=$(LD) RANLIB=$(RANLIB) RPCUSER="nobody"
1699 touch portmap/stamp-h1
1701 portmap: portmap/stamp-h1
1702 @$(SEP)
1703 $(MAKE) -C portmap
1705 portmap-clean:
1706 -@$(MAKE) -C portmap clean
1707 @rm -f portmap/stamp-h1
1709 portmap-install: portmap
1710 install -d $(INSTALLDIR)/portmap/usr/sbin
1711 install -D portmap/portmap $(INSTALLDIR)/portmap/usr/sbin/portmap
1712 $(STRIP) -s $(INSTALLDIR)/portmap/usr/sbin/portmap
1714 e2fsprogs/stamp-h1:
1715 cd e2fsprogs && \
1716 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1717 $(CONFIGURE) --prefix=$(TOP)/e2fsprogs/staged --enable-shared --enable-static
1718 touch e2fsprogs/stamp-h1
1720 e2fsprogs: e2fsprogs/stamp-h1
1721 @$(SEP)
1722 $(MAKE) -C e2fsprogs
1724 e2fsprogs-clean:
1725 -@$(MAKE) -C e2fsprogs clean
1726 @rm -f e2fsprogs/stamp-h1
1727 @rm -f e2fsprogs/Makefile
1728 @rm -rf e2fsprogs/staged
1730 nfs-utils/stamp-h1: libevent-install e2fsprogs portmap libnfsidmap-install
1731 cd nfs-utils && STRIP='mipsel-uclibc-strip' \
1732 CFLAGS="-Os -Wall -fno-delete-null-pointer-checks -funit-at-a-time \
1733 -I$(TOP)/libevent/staged/usr/local/include -I$(TOP)/e2fsprogs/lib \
1734 -I$(TOP)/libnfsidmap/staged/usr/include -ffunction-sections -fdata-sections" \
1735 LDFLAGS="-L$(TOP)/libevent/staged/usr/local/lib -L$(TOP)/e2fsprogs/lib \
1736 -L$(TOP)/libnfsidmap/staged/usr/lib -ffunction-sections -fdata-sections -Wl,--gc-sections -fPIC" \
1737 ac_cv_func_malloc_0_nonnull=yes \
1738 ac_cv_func_realloc_0_nonnull=yes \
1739 $(CONFIGURE) --disable-gss --without-tcp-wrappers --enable-static --enable-shared \
1740 --enable-nfsv4 --enable-nfsv3
1741 touch nfs-utils/stamp-h1
1743 nfs-utils: nfs-utils/stamp-h1
1745 nfs-utils-clean:
1746 -@$(MAKE) -C nfs-utils clean
1747 @rm -f nfs-utils/stamp-h1
1749 nfs-utils-install: nfs-utils
1750 install -d $(INSTALLDIR)/nfs-utils/usr/sbin
1751 install -D nfs-utils/utils/mount/mount.nfs $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1752 install -D nfs-utils/utils/nfsd/nfsd $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1753 install -D nfs-utils/utils/showmount/showmount $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1754 install -D nfs-utils/utils/exportfs/exportfs $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1755 install -D nfs-utils/utils/statd/statd $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1756 install -D nfs-utils/utils/mountd/mountd $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1757 install -D nfs-utils/nfs.rc $(INSTALLDIR)/nfs-utils/usr/sbin/nfs.rc
1758 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mount.nfs
1759 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/nfsd
1760 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/showmount
1761 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/exportfs
1762 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/statd
1763 $(STRIP) -s $(INSTALLDIR)/nfs-utils/usr/sbin/mountd
1765 sd-idle/stamp-h1:
1766 cd sd-idle \
1767 CFLAGS="-Os -Wall --host=mipsel-linux --target=mipsel-linux $(EXTRACFLAGS)" \
1768 $(MAKE) -C sd-idle
1769 chmod 0755 sd-idle/sd-idle
1770 touch sd-idle/stamp-h1
1772 sd-idle-clean:
1773 -@$(MAKE) -C sd-idle clean
1774 @rm -f sd-idle/stamp-h1
1776 sd-idle-install: sd-idle/stamp-h1
1777 install -d $(INSTALLDIR)/sd-idle/usr/bin
1778 install -D sd-idle/sd-idle $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1779 $(STRIP) -s $(INSTALLDIR)/sd-idle/usr/bin/sd-idle
1781 snmp/stamp-h1:
1782 cd snmp && \
1783 CFLAGS="-Os -Wall $(EXTRACFLAGS)" \
1784 $(CONFIGURE) --prefix=/usr --with-endianness=little --enable-mini-agent --disable-debugging \
1785 --disable-privacy --without-opaque-special-types --with-persistent-directory=/tmp/snmp-persist \
1786 --with-default-snmp-version=3 --with-sys-contact=root --with-sys-location=Unknown --with-logfile=/dev/null \
1787 --with-out-transports=UDPIPv6,TCPIPv6,AAL5PVC,IPX,TCP,Unix --enable-shared=no --enable-static --with-gnu-ld \
1788 --enable-internal-md5 --with-copy-persistent-files=no --without-openssl -sysconfdir=/tmp \
1789 --with-mib-modules=mibII,host,mibII/ip,mibII/tcp,mibII/udp,mibII/icmp,mibII/var_route,mibII/kernel_linux,qos,ucd_snmp \
1790 --with-out-mib-modules=snmpv3mibs,agent_mips,agentx,notification,utilities,target --disable-ipv6 --with-defaults \
1791 --without-efence --without-rsaref --without-kmem-usage --without-rpm --without-dmalloc
1792 touch snmp/stamp-h1
1794 snmp: snmp/stamp-h1
1795 @$(SEP)
1796 $(MAKE) -C snmp
1798 snmp-clean:
1799 -@$(MAKE) -C snmp clean
1800 @rm -f snmp/stamp-h1
1802 snmp-install: snmp
1803 install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
1804 $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
1806 apcupsd/stamp-h1:
1807 cd apcupsd && touch autoconf/variables.mak && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1808 $(MAKE) configure && \
1809 LDFLAGS="-L$(TOOLCHAIN)/lib -ffunction-sections -fdata-sections" \
1810 $(CONFIGURE) --prefix=/usr --without-x --enable-shared --enable-static --enable-usb --disable-pcnet --enable-cgi \
1811 --disable-lgd --enable-net --enable-powerflute --sysconfdir=/usr/local/apcupsd --bindir=/bin \
1812 --disable-dumb --disable-snmp --disable-net-snmp --with-cgi-bin=/www/apcupsd --with-serial-dev= \
1813 touch apcupsd/stamp-h1
1815 apcupsd: apcupsd/stamp-h1
1816 $(MAKE) -C apcupsd
1818 apcupsd-clean:
1819 -@$(MAKE) -C apcupsd clean
1820 @rm -f apcupsd/stamp-h1
1821 @rm -f apcupsd/config*
1823 apcupsd-install: apcupsd
1824 $(MAKE) -C apcupsd DESTDIR=$(INSTALLDIR)/apcupsd install
1825 @rm -rf $(INSTALLDIR)/apcupsd/sbin/apctest
1826 @rm -rf $(INSTALLDIR)/apcupsd/www/apcupsd/ups*.cgi
1827 $(STRIP) $(INSTALLDIR)/apcupsd/sbin/*
1828 $(STRIP) $(INSTALLDIR)/apcupsd/www/apcupsd/*
1830 dnscrypt/stamp-h1:
1831 cd $(TOP)/dnscrypt && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1832 $(CONFIGURE) --prefix=/usr --disable-ssp --disable-largefile --disable-assert
1833 touch dnscrypt/stamp-h1
1835 dnscrypt: dnscrypt/stamp-h1
1837 dnscrypt-install: dnscrypt
1838 install -D dnscrypt/src/proxy/dnscrypt-proxy $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1839 install -D dnscrypt/src/hostip/hostip $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1840 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/dnscrypt-proxy
1841 $(STRIP) -s $(INSTALLDIR)/dnscrypt/usr/sbin/hostip
1843 dnscrypt-clean:
1844 -@$(MAKE) -c dnscrypt clean
1845 @rm -rf dnscrypt/stamp-h1 dnscrypt/src/dnscrypt-proxy/.deps dnscrypt/Makefile
1847 tor/stamp-h1: openssl zlib libevent
1848 cd $(TOP)/tor && CC=$(CC) STRIP='mipsel-uclibc-strip' \
1849 CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
1850 LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
1851 $(CONFIGURE) --prefix=/usr --with-libevent-dir=$(TOP)/libevent/staged/usr/local \
1852 --with-openssl-dir=$(TOP)/openssl --with-zlib-dir=$(TOP)/zlib
1853 touch tor/stamp-h1
1855 tor: tor/stamp-h1
1857 tor-install: tor
1858 install -D tor/src/or/tor $(INSTALLDIR)/tor/usr/sbin/tor
1859 $(STRIP) -s $(INSTALLDIR)/tor/usr/sbin/tor
1861 tor-clean:
1862 -@$(MAKE) -c tor clean
1863 @rm -rf tor/stamp-h1 tor/Makefile
1866 # Generic rules
1870 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
1873 %-clean:
1874 @-[ ! -d $* ] || $(MAKE) -C $* clean
1876 %-distclean:
1877 @-[ ! -d $* ] || $(MAKE) -C $* distclean
1879 %-install: %
1880 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1882 %-build:
1883 $(MAKE) $*-clean $*
1885 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1887 .PHONY: all clean distclean mrproper install package
1888 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1889 .PHONY: dummy libnet libpcap