2 # Broadcom Linux Router Makefile
4 # Copyright 2005, Broadcom Corporation
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.
16 # TOMATO_EXPERIMENTAL=1
21 SEP
=echo
"\033[41;1m $@ \033[0m"
47 # !!TB - updated Broadcom Wireless driver
56 obj-
$(TCONFIG_USB
) += p910nd
57 obj-
$(TCONFIG_USB
) += scsi-idle
58 obj-
$(TCONFIG_USB
) += libusb10
59 obj-
$(TCONFIG_USB
) += libusb
60 obj-
$(TCONFIG_USB
) += usbmodeswitch
62 obj-
$(TCONFIG_FTP
) += vsftpd
63 obj-
$(TCONFIG_SAMBASRV
) += samba
64 obj-
$(TCONFIG_NTFS
) += ntfs-3g
71 # configurable packages
73 obj-
$(TCONFIG_L2TP
) += rp-l2tp
74 obj-
$(TCONFIG_PPTP
) += pptp-client
75 obj-
$(TCONFIG_HTTPS
) += openssl
76 obj-
$(TCONFIG_HTTPS
) += matrixssl
77 obj-
$(TCONFIG_SSH
) += dropbear
78 obj-
$(TCONFIG_ZEBRA
) += zebra
79 # obj-$(TCONFIG_IPP2P) += ipp2p
81 ifeq ($(TCONFIG_L2TP
),y
)
84 ifeq ($(TCONFIG_PPTP
),y
)
87 obj-
$(NEED_PPPD
) += pppd
90 obj-clean
:= $(foreach obj
, $(obj-y
) $(obj-n
) $(obj-
), $(obj
)-clean)
91 obj-install
:= $(foreach obj
,$(obj-y
),$(obj
)-install)
99 all: clean-build libc
$(obj-y
) kernel
102 kernel
: $(LINUXDIR
)/.config
105 @if
! grep
-q
"CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR
)/.config
; then \
106 $(MAKE
) -C
$(LINUXDIR
) zImage
; \
108 if grep
-q
"CONFIG_MODULES=y" $(LINUXDIR
)/.config
; then \
109 $(MAKE
) -C
$(LINUXDIR
) modules
; \
114 $(MAKE
) -C
$(LINUXDIR
) modules
117 cd
$(TARGETDIR
)/lib
/modules
/* && find
-name
"*.o" -exec mv
-i
{} . \
; || true
118 cd
$(TARGETDIR
)/lib
/modules
/* && find
-type d
-delete || true
120 install package
: $(obj-install
) $(LINUXDIR
)/.config
123 install -d
$(TARGETDIR
)
127 $(MAKE
) -C
$(LINUXDIR
) modules_install DEPMOD
=/bin
/true INSTALL_MOD_PATH
=$(TARGETDIR
)
128 ##!!TB find $(TARGETDIR)/lib/modules -name *.o -exec mipsel-linux-strip --strip-unneeded {} \;
129 find
$(TARGETDIR
)/lib
/modules
-name
*.o
-exec
$(STRIP
) --strip-debug
{} \
;
131 -cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv diag
/* .
&& rm -rf diag
134 -cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv et
.4702/* .
&& rm -rf et
.4702 || true
135 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv et
/* .
&& rm -rf et
136 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv wl
/* .
&& rm -rf wl
137 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv cifs
/* .
&& rm -rf cifs
138 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv jffs2
/* .
&& rm -rf jffs2 || true
139 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv jffs
/* .
&& rm -rf jffs || true
140 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
&& mv zlib_inflate
/* .
&& rm -rf zlib_inflate || true
141 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
&& mv zlib_deflate
/* .
&& rm -rf zlib_deflate || true
142 rm -rf
$(TARGETDIR
)/lib
/modules
/*/pcmcia
145 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ext2
/* .
&& rm -rf ext2 || true
146 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ext3
/* .
&& rm -rf ext3 || true
147 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv jbd
/* .
&& rm -rf jbd || true
148 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv fat
/* .
&& rm -rf fat || true
149 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv vfat
/* .
&& rm -rf vfat || true
150 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv fuse
/* .
&& rm -rf fuse || true
151 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ntfs
/* .
&& rm -rf ntfs || true
152 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv smbfs
/* .
&& rm -rf smbfs || true
153 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv reiserfs
/* .
&& rm -rf reiserfs || true
154 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv hfsplus
/* .
&& rm -rf hfsplus || true
155 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv lockd
/* .
&& rm -rf lockd || true
156 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nfsd
/* .
&& rm -rf nfsd || true
157 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nfs
/* .
&& rm -rf nfs || true
158 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv xfs
/* .
&& rm -rf xfs || true
159 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nls
/* .
&& rm -rf nls || true
160 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
&& mv sunrpc
/* .
&& rm -rf sunrpc || true
161 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv hcd
/* .
&& rm -rf hcd || true
162 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv host
/* .
&& rm -rf host || true
163 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv storage
/* .
&& rm -rf storage || true
164 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv serial
/* .
&& rm -rf serial || true
165 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media
&& mv video
/* .
&& rm -rf video || true
168 for
dir in
$(wildcard $(patsubst %,$(INSTALLDIR
)/%,$(obj-y
))) ; do \
169 (cd
$${dir} && tar cpf
- .
) |
(cd
$(TARGETDIR
) && tar xpf
-) \
172 ifneq ($(TCONFIG_JFFS2
),y
)
173 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/jffs2.o || true
174 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/jffs.o || true
175 rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
/zlib_
* || true
178 ifneq ($(TCONFIG_CIFS
),y
)
179 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/cifs.o
182 ifneq ($(TCONFIG_L7
),y
)
183 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/ipv4
/netfilter
/ipt_layer7.o
184 rm -f
$(TARGETDIR
)/usr
/lib
/iptables
/libipt_layer7.so
188 install $(LIBDIR
)/ld-uClibc.so
.0 $(TARGETDIR
)/lib
/
189 install $(LIBDIR
)/libcrypt.so
.0 $(TARGETDIR
)/lib
/
190 install $(LIBDIR
)/libpthread.so
.0 $(TARGETDIR
)/lib
/
191 install $(LIBDIR
)/libgcc_s.so
.1 $(TARGETDIR
)/lib
/
192 $(STRIP
) $(TARGETDIR
)/lib
/libgcc_s.so
.1
193 install $(LIBDIR
)/libc.so
.0 $(TARGETDIR
)/lib
/
194 install $(LIBDIR
)/libdl.so
.0 $(TARGETDIR
)/lib
/
195 install $(LIBDIR
)/libm.so
.0 $(TARGETDIR
)/lib
/
196 install $(LIBDIR
)/libnsl.so
.0 $(TARGETDIR
)/lib
/
197 ifeq ($(TCONFIG_SSH
),y
)
198 install $(LIBDIR
)/libutil.so
.0 $(TARGETDIR
)/lib
/
201 @cd
$(TARGETDIR
) && $(TOP
)/others
/rootprep.sh
204 busybox
/examples
/depmod-t.pl
-k
$(LINUXDIR
)/vmlinux
-b
$(TARGETDIR
)/lib
/modules
/*/
205 @mv
$(TARGETDIR
)/lib
/modules
/*/modules.dep
$(TARGETDIR
)/lib
/modules
/
208 @
rm -f
$(TARGETDIR
)/lib
/modules
/*/build
211 @chmod
0555 $(TARGETDIR
)/lib
/*.so
*
212 @chmod
0555 $(TARGETDIR
)/usr
/lib
/*.so
*
214 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
215 # separated extra stuff
216 @
rm -rf
$(PLATFORMDIR
)/extras
217 @mkdir
$(PLATFORMDIR
)/extras
218 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/ipv4
/ip_gre.o
$(PLATFORMDIR
)/extras
/
219 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/tun.o
$(PLATFORMDIR
)/extras
/
222 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ntfs.o
$(PLATFORMDIR
)/extras
/ || true
223 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/smbfs.o
$(PLATFORMDIR
)/extras
/ || true
224 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/reiserfs.o
$(PLATFORMDIR
)/extras
/ || true
225 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/hfsplus.o
$(PLATFORMDIR
)/extras
/ || true
226 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nfs.o
$(PLATFORMDIR
)/extras
/ || true
227 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nfsd.o
$(PLATFORMDIR
)/extras
/ || true
228 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/lockd.o
$(PLATFORMDIR
)/extras
/ || true
229 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/sunrpc.o
$(PLATFORMDIR
)/extras
/ || true
230 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/xfs.o
$(PLATFORMDIR
)/extras
/ || true
231 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/scanner.o
$(PLATFORMDIR
)/extras
/ || true
232 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/usbserial.o
$(PLATFORMDIR
)/extras
/ || true
233 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ftdi_sio.o
$(PLATFORMDIR
)/extras
/ || true
234 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/option.o
$(PLATFORMDIR
)/extras
/ || true
235 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/pl2303.o
$(PLATFORMDIR
)/extras
/ || true
236 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/sierra.o
$(PLATFORMDIR
)/extras
/ || true
237 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/acm.o
$(PLATFORMDIR
)/extras
/ || true
238 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ipw.o
$(PLATFORMDIR
)/extras
/ || true
239 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/audio.o
$(PLATFORMDIR
)/extras
/ || true
240 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ov51
*.o
$(PLATFORMDIR
)/extras
/ || true
241 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/pwc
*.o
$(PLATFORMDIR
)/extras
/ || true
242 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media
/*.o
$(PLATFORMDIR
)/extras
/ || true
243 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media || true
244 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/sound
/*.o
$(PLATFORMDIR
)/extras
/ || true
245 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/sound || true
247 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/ppp_mppe_mppc.o
$(PLATFORMDIR
)/extras
/ || true
248 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/ppp_deflate.o
$(PLATFORMDIR
)/extras
/ || true
249 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/pptp.o
$(PLATFORMDIR
)/extras
/
250 @mkdir
-p
$(PLATFORMDIR
)/extras
/crypto
251 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/crypto
/*.o
$(PLATFORMDIR
)/extras
/crypto
/ || true
252 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/crypto || true
253 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
/*.o
$(PLATFORMDIR
)/extras
/ || true
254 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib || true
255 ifneq ($(TCONFIG_SAMBASRV
),y
)
256 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nls_
*.o
$(PLATFORMDIR
)/extras
/ || true
258 ifneq ($(TCONFIG_USB
),y
)
259 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/*.o
$(PLATFORMDIR
)/extras
/ || true
260 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb || true
261 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/scsi
/*.o
$(PLATFORMDIR
)/extras
/ || true
262 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/scsi || true
263 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ext2.o
$(PLATFORMDIR
)/extras
/ || true
264 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ext3.o
$(PLATFORMDIR
)/extras
/ || true
265 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/jbd.o
$(PLATFORMDIR
)/extras
/ || true
266 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/fat.o
$(PLATFORMDIR
)/extras
/ || true
267 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/vfat.o
$(PLATFORMDIR
)/extras
/ || true
268 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/fuse.o
$(PLATFORMDIR
)/extras
/ || true
270 ifneq ($(TCONFIG_USB_EXTRAS
),y
)
271 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/block
/loop.o
$(PLATFORMDIR
)/extras
/ || true
272 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/block || true
274 @mkdir
-p
$(PLATFORMDIR
)/extras
/lib
275 @mv
$(TARGETDIR
)/usr
/lib
/libusb
* $(PLATFORMDIR
)/extras
/lib
/ || true
276 @mkdir
-p
$(PLATFORMDIR
)/extras
/apps
277 @mv
$(TARGETDIR
)/usr
/sbin
/usb_modeswitch
$(PLATFORMDIR
)/extras
/apps
/ || true
278 @cp usbmodeswitch
/usb_modeswitch.conf
$(PLATFORMDIR
)/extras
/apps
/usb_modeswitch.conf || true
280 @mkdir
-p
$(TARGETDIR
)/rom
/etc
/l7-protocols
281 ifeq ($(TCONFIG_L7PAT
),y
)
282 @cd layer7
&& .
/squish.sh
283 cp layer7
/squished
/*.pat
$(TARGETDIR
)/rom
/etc
/l7-protocols
286 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs mksquashfs-lzma
287 @
$(LINUXDIR
)/scripts
/squashfs
/mksquashfs-lzma
$(TARGETDIR
) $(PLATFORMDIR
)/target.image | tee target.
info
289 # Package kernel and filesystem
290 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
291 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
292 # $(MAKE) -C $(LINUXDIR) zImage ; \
294 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
295 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
298 # Pad self-booting Linux to a 64 KB boundary
299 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
300 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
301 # Append filesystem to self-booting Linux
302 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
305 libc
: $(LIBDIR
)/ld-uClibc.so
.0
306 # $(MAKE) -C ../../../tools-src/uClibc all
307 # $(MAKE) -C ../../../tools-src/uClibc install
314 clean: clean-build
$(obj-clean
)
315 rm -rf layer7
/squished
321 rm -f
$(PLATFORMDIR
)/linux.trx
$(PLATFORMDIR
)/vmlinuz
$(PLATFORMDIR
)/target.image
322 rm -rf
$(PLATFORMDIR
)/extras
325 ifneq ($(INSIDE_MAK
),1)
326 $(MAKE
) -C ..
$@ INSIDE_MAK
=1
328 -rm -f
$(LIBDIR
)/*.so
.0 $(LIBDIR
)/*.so
334 CONFIG_IN
:= config
/config.in
336 config
/conf config
/mconf
:
340 @config
/conf
$(CONFIG_IN
)
343 @config
/mconf
$(CONFIG_IN
)
345 roldconf
: config
/conf
346 @config
/conf
-o
$(CONFIG_IN
)
349 @
$(MAKE
) -C
$(LINUXDIR
) config
352 @
$(MAKE
) -C
$(LINUXDIR
) menuconfig
355 @
$(MAKE
) -C
$(LINUXDIR
) oldconfig
357 config conf
: rconf kconf
359 menuconfig mconf
: rmconf kmconf
361 oldconfig oldconf
: roldconf koldconf
365 # overrides and extra dependencies
369 @
$(MAKE
) -C busybox CFLAGS_busybox
="$(EXTRA_CFLAGS)"
374 rm -rf
$(INSTALLDIR
)/busybox
375 $(MAKE
) -C busybox
install CONFIG_PREFIX
=$(INSTALLDIR
)/busybox
378 $(MAKE
) -C busybox
distclean
381 $(MAKE
) -C busybox menuconfig
384 $(MAKE
) -C busybox objsizes CFLAGS
="-Os"
387 httpd
: matrixssl shared nvram mssl
392 @
$(MAKE
) -C www
install INSTALLDIR
=$(INSTALLDIR
)/www TOMATO_EXPERIMENTAL
=$(TOMATO_EXPERIMENTAL
)
396 @
$(MAKE
) -C matrixssl
/src
402 $(MAKE
) -C matrixssl
/src
clean
406 install -D openssl
/libcrypto.so
$(INSTALLDIR
)/openssl
/usr
/lib
/libcrypto.so
407 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/lib
/libcrypto.so
409 install -D openssl
/apps
/openssl
$(INSTALLDIR
)/openssl
/usr
/sbin
/openssl
410 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/sbin
/openssl
411 chmod
0500 $(INSTALLDIR
)/openssl
/usr
/sbin
/openssl
413 install -D
-m
0500 httpd
/gencert.sh
$(INSTALLDIR
)/openssl
/usr
/sbin
/gencert.sh
415 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
416 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
418 ifeq ($(TCONFIG_FTP_SSL
),y
)
420 install -D openssl
/libssl.so
$(INSTALLDIR
)/openssl
/usr
/lib
/libssl.so
421 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/lib
/libssl.so
433 @
$(MAKE
) -C bridge brctl
/brctl
436 install -D bridge
/brctl
/brctl
$(INSTALLDIR
)/bridge
/usr
/sbin
/brctl
437 $(STRIP
) $(INSTALLDIR
)/bridge
/usr
/sbin
/brctl
441 @
$(MAKE
) -C dnsmasq COPTS
="-DNO_IPV6 -DNO_SCRIPT $(EXTRA_CFLAGS)"
444 install -D dnsmasq
/src
/dnsmasq
$(INSTALLDIR
)/dnsmasq
/usr
/sbin
/dnsmasq
445 $(STRIP
) $(INSTALLDIR
)/dnsmasq
/usr
/sbin
/dnsmasq
449 $(MAKE
) -C iptables BINDIR
=/usr
/sbin LIBDIR
=/usr
/lib KERNEL_DIR
=$(LINUXDIR
) COPT_FLAGS
="-Os $(EXTRA_CFLAGS)"
452 install -D iptables
/iptables
$(INSTALLDIR
)/iptables
/usr
/sbin
/iptables
453 cd
$(INSTALLDIR
)/iptables
/usr
/sbin
&& \
454 ln
-sf iptables iptables-restore
456 install -d
$(INSTALLDIR
)/iptables
/usr
/lib
/iptables
457 install -D iptables
/extensions
/*.so
$(INSTALLDIR
)/iptables
/usr
/lib
/iptables
/
459 install -D iptables
/libiptc.so
$(INSTALLDIR
)/iptables
/usr
/lib
/libiptc.so
461 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/sbin
/iptables
462 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/lib
/iptables
/*.so
463 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/lib
/libiptc.so
466 -$(MAKE
) -C iptables KERNEL_DIR
=$(LINUXDIR
) clean
470 $(MAKE
) -C ppp
/pppoecd
$* INSTALLDIR
=$(INSTALLDIR
)/ppp
471 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
474 $(MAKE
) -C ppp
/pppoecd
$* INSTALLDIR
=$(INSTALLDIR
)/ppp
477 upnp
: nvram shared iptables
481 $(MAKE
) -C miniupnpd
-f Makefile.tomato
484 -$(MAKE
) -C miniupnpd
-f Makefile.tomato
clean
487 install -D miniupnpd
/miniupnpd
$(INSTALLDIR
)/miniupnpd
/usr
/sbin
/miniupnpd
488 $(STRIP
) $(INSTALLDIR
)/miniupnpd
/usr
/sbin
/miniupnpd
493 vsftpd
: shared openssl
498 install -D vsftpd
/vsftpd
$(INSTALLDIR
)/vsftpd
/usr
/sbin
/vsftpd
499 $(STRIP
) -s
$(INSTALLDIR
)/vsftpd
/usr
/sbin
/vsftpd
503 CC
=$(CC
) CFLAGS
="-g -Os $(EXTRA_CFLAGS)" $(CONFIGURE
) --host
=mipsel-linux
--enable-shared
=no
--enable-static
=no \
504 --disable-library
--disable-ldconfig
--disable-mount-helper
--with-fuse
=internal
506 ntfs-3g
: ntfs-3g
/Makefile
507 @
$(MAKE
) -C ntfs-3g CFLAGS
="-g -Os -Wall $(EXTRA_CFLAGS)"
510 @
$(MAKE
) -C ntfs-3g
clean || true
512 ntfs-3g-install
: ntfs-3g
513 install -D ntfs-3g
/src
/ntfs-3g
$(INSTALLDIR
)/ntfs-3g
/bin
/ntfs-3g
514 $(STRIP
) -s
$(INSTALLDIR
)/ntfs-3g
/bin
/ntfs-3g
515 install -d
$(INSTALLDIR
)/ntfs-3g
/sbin
&& cd
$(INSTALLDIR
)/ntfs-3g
/sbin
&& \
516 ln
-sf ..
/bin
/ntfs-3g mount.ntfs-3g
&& \
517 ln
-sf ..
/bin
/ntfs-3g mount.ntfs
519 libusb10
/Makefile
: libusb10
/Makefile.in
520 cd libusb10
&& CFLAGS
="-Os -Wall $(EXTRA_CFLAGS)" \
521 $(CONFIGURE
) --host
=mipsel-linux
--prefix=/usr ac_cv_lib_rt_clock_gettime
=no
523 libusb10
: libusb10
/Makefile
526 libusb10-install
: libusb10
527 install -D libusb10
/libusb
/.libs
/libusb-1.0.so
.0.0.0 $(INSTALLDIR
)/libusb10
/usr
/lib
/libusb-1.0.so
.0
528 $(STRIP
) $(INSTALLDIR
)/libusb10
/usr
/lib
/*.so.
*
529 cd
$(INSTALLDIR
)/libusb10
/usr
/lib
&& \
530 ln
-sf libusb-1.0.so
.0 libusb-1.0.so
.0.0.0 && \
531 ln
-sf libusb-1.0.so
.0 libusb-1.0.so
533 libusb
/Makefile
: libusb
/Makefile.in
534 cd libusb
&& CFLAGS
="-Wall -Os $(EXTRA_CFLAGS)" \
535 $(CONFIGURE
) --host
=mipsel-linux
--prefix=/usr \
536 LIBUSB_1_0_CFLAGS
="-I$(TOP)/libusb10/libusb" \
537 LIBUSB_1_0_LIBS
="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 \
538 -Wl,-R/usr/lib:/opt/usr/lib:/usr/local/share"
540 libusb
: libusb10 libusb
/Makefile
543 libusb-install
: libusb
544 install -D libusb
/libusb
/.libs
/libusb-0.1.so
.4.4.4 $(INSTALLDIR
)/libusb
/usr
/lib
/libusb-0.1.so
.4
545 $(STRIP
) $(INSTALLDIR
)/libusb
/usr
/lib
/*.so.
*
546 cd
$(INSTALLDIR
)/libusb
/usr
/lib
&& \
547 ln
-sf libusb-0.1.so
.4 libusb-0.1.so
.4.4.4 && \
548 ln
-sf libusb-0.1.so
.4 libusb.so
550 usbmodeswitch
: libusb
551 $(MAKE
) -C
$@ CC
=$(CC
) CCFLAGS
="-Wall -Os $(EXTRA_CFLAGS) \
552 -Wl,-R/usr/lib:/opt/usr/lib:/usr/local/share \
553 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0 \
554 -I$(TOP)/libusb/libusb -L$(TOP)/libusb/libusb/.libs -lusb"
556 usbmodeswitch-install
:
557 install -D usbmodeswitch
/usb_modeswitch
$(INSTALLDIR
)/usbmodeswitch
/usr
/sbin
/usb_modeswitch
558 $(STRIP
) -s
$(INSTALLDIR
)/usbmodeswitch
/usr
/sbin
/usb_modeswitch
570 @
$(MAKE
) -C vlan CROSS
=$(CROSS_COMPILE
) # STRIPTOOL=$(STRIP)
573 $(MAKE
) -C vlan CROSS
=$(CROSS_COMPILE
) INSTALLDIR
=$(INSTALLDIR
) install # STRIPTOOL=$(STRIP)
574 $(STRIP
) $(INSTALLDIR
)/vlan
/usr
/sbin
/vconfig
578 install -D pptp-client
/pptp
$(INSTALLDIR
)/pptp-client
/usr
/sbin
/pptp
579 $(STRIP
) $(INSTALLDIR
)/pptp-client
/usr
/sbin
/pptp
584 @
$(MAKE
) -C pppd
/pppd
587 $(MAKE
) -C pppd
/pppd
clean
590 install -D pppd
/pppd
/pppd
$(INSTALLDIR
)/pppd
/usr
/sbin
/pppd
591 $(STRIP
) $(INSTALLDIR
)/pppd
/usr
/sbin
/pppd
594 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
595 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
600 cd zebra
&& rm -f config.cache
&& CC
=$(CC
) AR
=$(AR
) RANLIB
=$(RANLIB
) LD
=$(LD
) CFLAGS
="-Os -Wall $(EXTRA_CFLAGS)" $(CONFIGURE
) \
601 --host
=mipsel-linux
--sysconfdir
=/etc \
602 --enable-netlink
--disable-ipv6
--disable-ripngd
--disable-ospfd
--disable-doc \
603 --disable-ospf6d
--disable-bgpd
--disable-bgpd-announce
604 @
$(MAKE
) -C zebra CC
=$(CC
) AR
=$(AR
) RANLIB
=$(RANLIB
) LD
=$(LD
)
607 install -D zebra
/zebra
/zebra
$(INSTALLDIR
)/zebra
/usr
/sbin
/zebra
608 install -D zebra
/ripd
/ripd
$(INSTALLDIR
)/zebra
/usr
/sbin
/ripd
609 install -D zebra
/lib
/libzebra.so
$(INSTALLDIR
)/zebra
/usr
/lib
/libzebra.so
610 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/sbin
/zebra
611 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/sbin
/ripd
612 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/lib
/libzebra.so
616 install -d
$(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
617 install rp-l2tp
/handlers
/*.so
$(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
618 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
/*.so
619 install -D rp-l2tp
/handlers
/l2tp-control
$(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tp-control
620 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tp-control
621 install -D rp-l2tp
/l2tpd
$(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tpd
622 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tpd
626 install -D bpalogin
/bpalogin
$(INSTALLDIR
)/bpalogin
/usr
/sbin
/bpalogin
627 $(STRIP
) $(INSTALLDIR
)/bpalogin
/usr
/sbin
/bpalogin
632 # @-mkdir -p libnet/lib
633 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
637 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
640 @
[ ! -f libbcm
/Makefile
] ||
$(MAKE
) -C libbcm
643 install -D libbcm
/libbcm.so
$(INSTALLDIR
)/libbcm
/usr
/lib
/libbcm.so
644 $(STRIP
) $(INSTALLDIR
)/libbcm
/usr
/lib
/libbcm.so
648 install -D iproute2
/tc
/tc
$(INSTALLDIR
)/iproute2
/usr
/sbin
/tc
649 $(STRIP
) $(INSTALLDIR
)/iproute2
/usr
/sbin
/tc
650 install -D iproute2
/ip
/ip
$(INSTALLDIR
)/iproute2
/usr
/sbin
/ip
651 $(STRIP
) $(INSTALLDIR
)/iproute2
/usr
/sbin
/ip
657 dropbear
: dropbear
/config.h
659 @make
-C dropbear PROGRAMS
="dropbear dbclient dropbearkey scp" MULTI
=1
662 install -D dropbear
/dropbearmulti
$(INSTALLDIR
)/dropbear
/usr
/bin
/dropbearmulti
663 $(STRIP
) $(INSTALLDIR
)/dropbear
/usr
/bin
/dropbearmulti
664 cd
$(INSTALLDIR
)/dropbear
/usr
/bin
&& \
665 ln
-sf dropbearmulti dropbear
&& \
666 ln
-sf dropbearmulti dropbearconvert
&& \
667 ln
-sf dropbearmulti dropbearkey
&& \
668 ln
-sf dropbearmulti dbclient
&& \
669 ln
-sf dropbearmulti ssh
&& \
670 ln
-sf dropbearmulti scp
673 @make
-C dropbear
clean
676 cd dropbear
&& CFLAGS
="-O2 -Wall $(EXTRA_CFLAGS)" ac_cv_func_logout
=no ac_cv_func_logwtmp
=no .
/configure
--host
=mipsel-linux
--disable-zlib
--enable-syslog
--disable-lastlog
--disable-utmp
--disable-utmpx
--disable-wtmp
--disable-wtmpx
--disable-pututline
--disable-pututxline
--disable-loginfunc
--disable-largefile
677 make
-C dropbear
clean
679 igmpproxy
/src
/Makefile
: igmpproxy
/src
/Makefile.in
680 cd igmpproxy
&& CFLAGS
="-O2 -Wall $(EXTRA_CFLAGS)" \
681 $(CONFIGURE
) --prefix=/usr
683 igmpproxy
: igmpproxy
/src
/Makefile
685 @
$(MAKE
) -C igmpproxy
/src
688 install -D igmpproxy
/src
/igmpproxy
$(INSTALLDIR
)/igmpproxy
/usr
/sbin
/igmpproxy
689 $(STRIP
) $(INSTALLDIR
)/igmpproxy
/usr
/sbin
/igmpproxy
692 $(MAKE
) -C igmpproxy
/src
clean
693 rm -f igmpproxy
/src
/Makefile
699 ebtables-install
: dummy
700 install -D ebtables
/ebtables
$(INSTALLDIR
)/ebtables
/usr
/sbin
/ebtables
702 mkdir
-p
$(INSTALLDIR
)/ebtables
/usr
/lib
/
703 cp ebtables
/*.so
$(INSTALLDIR
)/ebtables
/usr
/lib
/
704 cp ebtables
/extensions
/*.so
$(INSTALLDIR
)/ebtables
/usr
/lib
/
707 make
-C ebtables
clean
714 @
[ ! -d
$* ] ||
( $(SEP
); $(MAKE
) -C
$* )
718 @
-[ ! -d
$* ] ||
$(MAKE
) -C
$* clean
721 @
[ ! -d
$* ] ||
$(MAKE
) -C
$* install INSTALLDIR
=$(INSTALLDIR
)/$*
726 $(obj-y
) $(obj-n
) $(obj-clean
) $(obj-install
): dummy
728 .PHONY
: all clean distclean mrproper
install package
729 .PHONY
: conf mconf oldconf kconf kmconf config menuconfig oldconfig
730 .PHONY
: dummy libnet libpcap