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.
21 SEP
=echo
"\033[41;1m $@ \033[0m"
48 # !!TB - updated Broadcom Wireless driver
57 obj-
$(TCONFIG_USB
) += p910nd
58 obj-
$(TCONFIG_USB
) += scsi-idle
59 obj-
$(TCONFIG_USB
) += libusb10
60 obj-
$(TCONFIG_USB
) += libusb
61 obj-
$(TCONFIG_USB
) += usbmodeswitch
63 obj-
$(TCONFIG_FTP
) += vsftpd
64 obj-
$(TCONFIG_SAMBASRV
) += samba
65 obj-
$(TCONFIG_NTFS
) += ntfs-3g
72 # configurable packages
74 obj-
$(TCONFIG_L2TP
) += rp-l2tp
75 obj-
$(TCONFIG_PPTP
) += pptp-client
76 obj-
$(TCONFIG_HTTPS
) += openssl
77 obj-
$(TCONFIG_HTTPS
) += matrixssl
78 obj-
$(TCONFIG_SSH
) += dropbear
79 obj-
$(TCONFIG_ZEBRA
) += zebra
80 # obj-$(TCONFIG_IPP2P) += ipp2p
82 ifeq ($(TCONFIG_L2TP
),y
)
85 ifeq ($(TCONFIG_PPTP
),y
)
88 obj-
$(NEED_PPPD
) += pppd
91 obj-clean
:= $(foreach obj
, $(obj-y
) $(obj-n
) $(obj-
), $(obj
)-clean)
92 obj-install
:= $(foreach obj
,$(obj-y
),$(obj
)-install)
100 all: clean-build libc
$(obj-y
) kernel
103 kernel
: $(LINUXDIR
)/.config
106 @if
! grep
-q
"CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR
)/.config
; then \
107 $(MAKE
) -C
$(LINUXDIR
) zImage
; \
109 if grep
-q
"CONFIG_MODULES=y" $(LINUXDIR
)/.config
; then \
110 $(MAKE
) -C
$(LINUXDIR
) modules
; \
115 ifeq ($(CONFIG_LINUX26
),y
)
116 $(MAKE
) -C
$(SRCBASE
)/lzma-loader CROSS_COMPILE
=$(CROSS_COMPILE
) LD
=$(LD
) LZMAPATH
=$(LINUXDIR
)/scripts
/squashfs
/lzma
/C
/Compress
/Lzma
all
118 $(MAKE
) -C
$(SRCBASE
)/lzma-loader CROSS_COMPILE
=$(CROSS_COMPILE
) LD
=$(LD
)
121 lzma-loader-install
: lzma-loader
126 $(MAKE
) -C
$(LINUXDIR
) modules
129 cd
$(TARGETDIR
)/lib
/modules
/* && find
-name
"*.o" -exec mv
-i
{} . \
; || true
130 cd
$(TARGETDIR
)/lib
/modules
/* && find
-type d
-delete || true
132 install package
: $(obj-install
) $(LINUXDIR
)/.config
135 install -d
$(TARGETDIR
)
139 $(MAKE
) -C
$(LINUXDIR
) modules_install DEPMOD
=/bin
/true INSTALL_MOD_PATH
=$(TARGETDIR
)
140 ##!!TB find $(TARGETDIR)/lib/modules -name *.o -exec mipsel-linux-strip --strip-unneeded {} \;
141 find
$(TARGETDIR
)/lib
/modules
-name
*.o
-exec
$(STRIP
) --strip-debug
{} \
;
143 -cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv diag
/* .
&& rm -rf diag
146 -cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv et
.4702/* .
&& rm -rf et
.4702 || true
147 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv et
/* .
&& rm -rf et
148 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
&& mv wl
/* .
&& rm -rf wl
149 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv cifs
/* .
&& rm -rf cifs
150 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv jffs2
/* .
&& rm -rf jffs2
151 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
&& mv zlib_inflate
/* .
&& rm -rf zlib_inflate
152 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
&& mv zlib_deflate
/* .
&& rm -rf zlib_deflate
153 rm -rf
$(TARGETDIR
)/lib
/modules
/*/pcmcia
156 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ext2
/* .
&& rm -rf ext2 || true
157 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ext3
/* .
&& rm -rf ext3 || true
158 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv jbd
/* .
&& rm -rf jbd || true
159 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv fat
/* .
&& rm -rf fat || true
160 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv vfat
/* .
&& rm -rf vfat || true
161 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv fuse
/* .
&& rm -rf fuse || true
162 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv ntfs
/* .
&& rm -rf ntfs || true
163 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv smbfs
/* .
&& rm -rf smbfs || true
164 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv reiserfs
/* .
&& rm -rf reiserfs || true
165 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv hfsplus
/* .
&& rm -rf hfsplus || true
166 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv lockd
/* .
&& rm -rf lockd || true
167 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nfsd
/* .
&& rm -rf nfsd || true
168 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nfs
/* .
&& rm -rf nfs || true
169 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv xfs
/* .
&& rm -rf xfs || true
170 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
&& mv nls
/* .
&& rm -rf nls || true
171 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
&& mv sunrpc
/* .
&& rm -rf sunrpc || true
172 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv hcd
/* .
&& rm -rf hcd || true
173 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv host
/* .
&& rm -rf host || true
174 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv storage
/* .
&& rm -rf storage || true
175 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
&& mv serial
/* .
&& rm -rf serial || true
176 cd
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media
&& mv video
/* .
&& rm -rf video || true
179 for
dir in
$(wildcard $(patsubst %,$(INSTALLDIR
)/%,$(obj-y
))) ; do \
180 (cd
$${dir} && tar cpf
- .
) |
(cd
$(TARGETDIR
) && tar xpf
-) \
183 ifneq ($(TCONFIG_JFFS2
),y
)
184 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/jffs2.o
185 rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
/zlib_
*
188 ifneq ($(TCONFIG_CIFS
),y
)
189 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/cifs.o
192 ifneq ($(TCONFIG_L7
),y
)
193 rm -f
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/ipv4
/netfilter
/ipt_layer7.o
194 rm -f
$(TARGETDIR
)/usr
/lib
/iptables
/libipt_layer7.so
198 install $(LIBDIR
)/ld-uClibc.so
.0 $(TARGETDIR
)/lib
/
199 install $(LIBDIR
)/libcrypt.so
.0 $(TARGETDIR
)/lib
/
200 install $(LIBDIR
)/libpthread.so
.0 $(TARGETDIR
)/lib
/
201 install $(LIBDIR
)/libgcc_s.so
.1 $(TARGETDIR
)/lib
/
202 $(STRIP
) $(TARGETDIR
)/lib
/libgcc_s.so
.1
203 install $(LIBDIR
)/libc.so
.0 $(TARGETDIR
)/lib
/
204 install $(LIBDIR
)/libdl.so
.0 $(TARGETDIR
)/lib
/
205 install $(LIBDIR
)/libm.so
.0 $(TARGETDIR
)/lib
/
206 install $(LIBDIR
)/libnsl.so
.0 $(TARGETDIR
)/lib
/
207 ifeq ($(TCONFIG_SSH
),y
)
208 install $(LIBDIR
)/libutil.so
.0 $(TARGETDIR
)/lib
/
211 @cd
$(TARGETDIR
) && $(TOP
)/others
/rootprep.sh
214 busybox
/examples
/depmod.pl
-k
$(LINUXDIR
)/vmlinux
-b
$(TARGETDIR
)/lib
/modules
/*/
215 @mv
$(TARGETDIR
)/lib
/modules
/*/modules.dep
$(TARGETDIR
)/lib
/modules
/
218 @
rm -f
$(TARGETDIR
)/lib
/modules
/*/build
221 @chmod
0555 $(TARGETDIR
)/lib
/*.so
*
223 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
224 # separated extra stuff
225 @
rm -rf
$(PLATFORMDIR
)/extras
226 @mkdir
$(PLATFORMDIR
)/extras
227 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/ipv4
/ip_gre.o
$(PLATFORMDIR
)/extras
/
228 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/tun.o
$(PLATFORMDIR
)/extras
/
231 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ntfs.o
$(PLATFORMDIR
)/extras
/ || true
232 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/smbfs.o
$(PLATFORMDIR
)/extras
/ || true
233 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/reiserfs.o
$(PLATFORMDIR
)/extras
/ || true
234 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/hfsplus.o
$(PLATFORMDIR
)/extras
/ || true
235 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nfs.o
$(PLATFORMDIR
)/extras
/ || true
236 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nfsd.o
$(PLATFORMDIR
)/extras
/ || true
237 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/lockd.o
$(PLATFORMDIR
)/extras
/ || true
238 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/net
/sunrpc.o
$(PLATFORMDIR
)/extras
/ || true
239 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/xfs.o
$(PLATFORMDIR
)/extras
/ || true
240 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/scanner.o
$(PLATFORMDIR
)/extras
/ || true
241 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/usbserial.o
$(PLATFORMDIR
)/extras
/ || true
242 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ftdi_sio.o
$(PLATFORMDIR
)/extras
/ || true
243 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/option.o
$(PLATFORMDIR
)/extras
/ || true
244 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/pl2303.o
$(PLATFORMDIR
)/extras
/ || true
245 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/sierra.o
$(PLATFORMDIR
)/extras
/ || true
246 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/acm.o
$(PLATFORMDIR
)/extras
/ || true
247 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ipw.o
$(PLATFORMDIR
)/extras
/ || true
248 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/audio.o
$(PLATFORMDIR
)/extras
/ || true
249 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/ov51
*.o
$(PLATFORMDIR
)/extras
/ || true
250 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/pwc
*.o
$(PLATFORMDIR
)/extras
/ || true
251 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media
/*.o
$(PLATFORMDIR
)/extras
/ || true
252 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/media || true
253 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/sound
/*.o
$(PLATFORMDIR
)/extras
/ || true
254 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/sound || true
256 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/ppp_mppe_mppc.o
$(PLATFORMDIR
)/extras
/ || true
257 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/ppp_deflate.o
$(PLATFORMDIR
)/extras
/ || true
258 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/net
/pptp.o
$(PLATFORMDIR
)/extras
/
259 @mkdir
-p
$(PLATFORMDIR
)/extras
/crypto
260 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/crypto
/*.o
$(PLATFORMDIR
)/extras
/crypto
/ || true
261 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/crypto || true
262 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib
/*.o
$(PLATFORMDIR
)/extras
/ || true
263 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/lib || true
264 ifneq ($(TCONFIG_SAMBASRV
),y
)
265 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/nls_
*.o
$(PLATFORMDIR
)/extras
/ || true
267 ifneq ($(TCONFIG_USB
),y
)
268 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb
/*.o
$(PLATFORMDIR
)/extras
/ || true
269 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/usb || true
270 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/scsi
/*.o
$(PLATFORMDIR
)/extras
/ || true
271 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/scsi || true
272 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ext2.o
$(PLATFORMDIR
)/extras
/ || true
273 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/ext3.o
$(PLATFORMDIR
)/extras
/ || true
274 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/jbd.o
$(PLATFORMDIR
)/extras
/ || true
275 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/fat.o
$(PLATFORMDIR
)/extras
/ || true
276 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/vfat.o
$(PLATFORMDIR
)/extras
/ || true
277 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/fs
/fuse.o
$(PLATFORMDIR
)/extras
/ || true
279 ifneq ($(TCONFIG_USB_EXTRAS
),y
)
280 @mv
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/block
/loop.o
$(PLATFORMDIR
)/extras
/ || true
281 @
rm -rf
$(TARGETDIR
)/lib
/modules
/*/kernel
/drivers
/block || true
283 @mkdir
-p
$(PLATFORMDIR
)/extras
/lib
284 @mv
$(TARGETDIR
)/usr
/lib
/libusb
* $(PLATFORMDIR
)/extras
/lib
/ || true
285 @mkdir
-p
$(PLATFORMDIR
)/extras
/apps
286 @mv
$(TARGETDIR
)/usr
/sbin
/usb_modeswitch
$(PLATFORMDIR
)/extras
/apps
/ || true
287 @cp usbmodeswitch
/usb_modeswitch.conf
$(PLATFORMDIR
)/extras
/apps
/usb_modeswitch.conf || true
289 @mkdir
-p
$(TARGETDIR
)/rom
/etc
/l7-protocols
290 ifeq ($(TCONFIG_L7PAT
),y
)
291 @cd layer7
&& .
/squish.sh
292 cp layer7
/squished
/*.pat
$(TARGETDIR
)/rom
/etc
/l7-protocols
295 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs mksquashfs-lzma
296 @
$(LINUXDIR
)/scripts
/squashfs
/mksquashfs-lzma
$(TARGETDIR
) $(PLATFORMDIR
)/target.image | tee target.
info
298 # Package kernel and filesystem
299 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
300 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
301 # $(MAKE) -C $(LINUXDIR) zImage ; \
303 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
304 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
307 # Pad self-booting Linux to a 64 KB boundary
308 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
309 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
310 # Append filesystem to self-booting Linux
311 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
314 libc
: $(LIBDIR
)/ld-uClibc.so
.0
315 # $(MAKE) -C ../../../tools-src/uClibc all
316 # $(MAKE) -C ../../../tools-src/uClibc install
323 clean: clean-build
$(obj-clean
)
324 rm -rf layer7
/squished
330 rm -f
$(PLATFORMDIR
)/linux.trx
$(PLATFORMDIR
)/vmlinuz
$(PLATFORMDIR
)/target.image
331 rm -rf
$(PLATFORMDIR
)/extras
334 ifneq ($(INSIDE_MAK
),1)
335 $(MAKE
) -C ..
$@ INSIDE_MAK
=1
337 -rm -f
$(LIBDIR
)/*.so
.0 $(LIBDIR
)/*.so
343 CONFIG_IN
:= config
/config.in
345 config
/conf config
/mconf
:
349 @config
/conf
$(CONFIG_IN
)
352 @config
/mconf
$(CONFIG_IN
)
354 roldconf
: config
/conf
355 @config
/conf
-o
$(CONFIG_IN
)
358 @
$(MAKE
) -C
$(LINUXDIR
) config
361 @
$(MAKE
) -C
$(LINUXDIR
) menuconfig
364 @
$(MAKE
) -C
$(LINUXDIR
) oldconfig
366 config conf
: rconf kconf
368 menuconfig mconf
: rmconf kmconf
370 oldconfig oldconf
: roldconf koldconf
374 # overrides and extra dependencies
378 @
$(MAKE
) -C busybox CFLAGS_busybox
="$(EXTRACFLAGS)"
383 rm -rf
$(INSTALLDIR
)/busybox
384 $(MAKE
) -C busybox
install CONFIG_PREFIX
=$(INSTALLDIR
)/busybox
387 $(MAKE
) -C busybox
distclean
390 $(MAKE
) -C busybox menuconfig
393 httpd
: matrixssl shared nvram mssl
398 @
$(MAKE
) -C www
install INSTALLDIR
=$(INSTALLDIR
)/www TOMATO_EXPERIMENTAL
=$(TOMATO_EXPERIMENTAL
)
402 @
$(MAKE
) -C matrixssl
/src
408 $(MAKE
) -C matrixssl
/src
clean
412 install -D openssl
/libcrypto.so
$(INSTALLDIR
)/openssl
/usr
/lib
/libcrypto.so
413 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/lib
/libcrypto.so
415 install -D
-m
500 openssl
/apps
/openssl
$(INSTALLDIR
)/openssl
/usr
/sbin
/openssl
416 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/sbin
/openssl
418 install -D
-m
0500 httpd
/gencert.sh
$(INSTALLDIR
)/openssl
/usr
/sbin
/gencert.sh
420 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
421 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
423 ifeq ($(TCONFIG_FTP_SSL
),y
)
425 install -D openssl
/libssl.so
$(INSTALLDIR
)/openssl
/usr
/lib
/libssl.so
426 $(STRIP
) $(INSTALLDIR
)/openssl
/usr
/lib
/libssl.so
438 @
$(MAKE
) -C bridge brctl
/brctl
441 install -D bridge
/brctl
/brctl
$(INSTALLDIR
)/bridge
/usr
/sbin
/brctl
442 $(STRIP
) $(INSTALLDIR
)/bridge
/usr
/sbin
/brctl
446 install -D dnsmasq
/src
/dnsmasq
$(INSTALLDIR
)/dnsmasq
/usr
/sbin
/dnsmasq
447 $(STRIP
) $(INSTALLDIR
)/dnsmasq
/usr
/sbin
/dnsmasq
451 $(MAKE
) -C iptables BINDIR
=/usr
/sbin LIBDIR
=/usr
/lib KERNEL_DIR
=$(LINUXDIR
)
454 install -D iptables
/iptables
$(INSTALLDIR
)/iptables
/usr
/sbin
/iptables
455 cd
$(INSTALLDIR
)/iptables
/usr
/sbin
&& \
456 ln
-sf iptables iptables-restore
458 install -d
$(INSTALLDIR
)/iptables
/usr
/lib
/iptables
459 install -D iptables
/extensions
/*.so
$(INSTALLDIR
)/iptables
/usr
/lib
/iptables
/
461 install -D iptables
/libiptc.so
$(INSTALLDIR
)/iptables
/usr
/lib
/libiptc.so
463 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/sbin
/iptables
464 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/lib
/iptables
/*.so
465 $(STRIP
) $(INSTALLDIR
)/iptables
/usr
/lib
/libiptc.so
468 -$(MAKE
) -C iptables KERNEL_DIR
=$(LINUXDIR
) clean
472 $(MAKE
) -C ppp
/pppoecd
$* INSTALLDIR
=$(INSTALLDIR
)/ppp
473 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
476 $(MAKE
) -C ppp
/pppoecd
$* INSTALLDIR
=$(INSTALLDIR
)/ppp
479 upnp
: nvram shared iptables
483 $(MAKE
) -C miniupnpd
-f Makefile.tomato
486 -$(MAKE
) -C miniupnpd
-f Makefile.tomato
clean
489 install -D miniupnpd
/miniupnpd
$(INSTALLDIR
)/miniupnpd
/usr
/sbin
/miniupnpd
490 $(STRIP
) $(INSTALLDIR
)/miniupnpd
/usr
/sbin
/miniupnpd
495 vsftpd
: shared openssl
500 install -D vsftpd
/vsftpd
$(INSTALLDIR
)/vsftpd
/usr
/sbin
/vsftpd
501 $(STRIP
) -s
$(INSTALLDIR
)/vsftpd
/usr
/sbin
/vsftpd
505 CC
=$(CC
) CFLAGS
="-Os $(EXTRACFLAGS)" $(CONFIGURE
) --host
=mipsel-linux
--enable-shared
=no
--enable-static
=no \
506 --disable-library
--disable-ldconfig
--disable-mount-helper
--with-fuse
=internal \
507 --disable-posix-acls
--disable-nfconv
--disable-dependency-tracking
509 ntfs-3g
: ntfs-3g
/Makefile
510 @
$(MAKE
) -C ntfs-3g CFLAGS
="-Os -Wall $(EXTRACFLAGS)"
513 @
$(MAKE
) -C ntfs-3g
clean || true
515 ntfs-3g-install
: ntfs-3g
516 install -D ntfs-3g
/src
/ntfs-3g
$(INSTALLDIR
)/ntfs-3g
/bin
/ntfs-3g
517 $(STRIP
) -s
$(INSTALLDIR
)/ntfs-3g
/bin
/ntfs-3g
518 install -d
$(INSTALLDIR
)/ntfs-3g
/sbin
&& cd
$(INSTALLDIR
)/ntfs-3g
/sbin
&& \
519 ln
-sf ..
/bin
/ntfs-3g mount.ntfs-3g
&& \
520 ln
-sf ..
/bin
/ntfs-3g mount.ntfs
522 libusb10
/Makefile
: libusb10
/Makefile.in
523 cd libusb10
&& CFLAGS
="-Os -Wall $(EXTRACFLAGS)" \
524 $(CONFIGURE
) --host
=mipsel-linux
--prefix=/usr ac_cv_lib_rt_clock_gettime
=no
526 libusb10
: libusb10
/Makefile
529 libusb10-install
: libusb10
530 install -D libusb10
/libusb
/.libs
/libusb-1.0.so
.0.0.0 $(INSTALLDIR
)/libusb10
/usr
/lib
/libusb-1.0.so
.0
531 $(STRIP
) $(INSTALLDIR
)/libusb10
/usr
/lib
/*.so.
*
532 cd
$(INSTALLDIR
)/libusb10
/usr
/lib
&& \
533 ln
-sf libusb-1.0.so
.0 libusb-1.0.so
.0.0.0 && \
534 ln
-sf libusb-1.0.so
.0 libusb-1.0.so
536 libusb
/Makefile
: libusb
/Makefile.in
537 cd libusb
&& CFLAGS
="-Wall -Os $(EXTRACFLAGS)" \
538 $(CONFIGURE
) --host
=mipsel-linux
--prefix=/usr \
539 LIBUSB_1_0_CFLAGS
="-I$(TOP)/libusb10/libusb" \
540 LIBUSB_1_0_LIBS
="-L$(TOP)/libusb10/libusb/.libs -lusb-1.0 \
541 -Wl,-R/usr/lib:/opt/usr/lib:/usr/local/share"
543 libusb
: libusb10 libusb
/Makefile
546 libusb-install
: libusb
547 install -D libusb
/libusb
/.libs
/libusb-0.1.so
.4.4.4 $(INSTALLDIR
)/libusb
/usr
/lib
/libusb-0.1.so
.4
548 $(STRIP
) $(INSTALLDIR
)/libusb
/usr
/lib
/*.so.
*
549 cd
$(INSTALLDIR
)/libusb
/usr
/lib
&& \
550 ln
-sf libusb-0.1.so
.4 libusb-0.1.so
.4.4.4 && \
551 ln
-sf libusb-0.1.so
.4 libusb.so
553 usbmodeswitch
: libusb
554 $(MAKE
) -C
$@ CC
=$(CC
) CCFLAGS
="-Wall -Os $(EXTRACFLAGS) \
555 -Wl,-R/usr/lib:/opt/usr/lib:/usr/local/share \
556 -I$(TOP)/libusb10/libusb -L$(TOP)/libusb10/libusb/.libs -lusb-1.0 \
557 -I$(TOP)/libusb/libusb -L$(TOP)/libusb/libusb/.libs -lusb"
559 usbmodeswitch-install
:
560 install -D usbmodeswitch
/usb_modeswitch
$(INSTALLDIR
)/usbmodeswitch
/usr
/sbin
/usb_modeswitch
561 $(STRIP
) -s
$(INSTALLDIR
)/usbmodeswitch
/usr
/sbin
/usb_modeswitch
573 @
$(MAKE
) -C vlan CROSS
=$(CROSS_COMPILE
) # STRIPTOOL=$(STRIP)
576 $(MAKE
) -C vlan CROSS
=$(CROSS_COMPILE
) INSTALLDIR
=$(INSTALLDIR
) install # STRIPTOOL=$(STRIP)
577 $(STRIP
) $(INSTALLDIR
)/vlan
/usr
/sbin
/vconfig
581 install -D pptp-client
/pptp
$(INSTALLDIR
)/pptp-client
/usr
/sbin
/pptp
582 $(STRIP
) $(INSTALLDIR
)/pptp-client
/usr
/sbin
/pptp
587 @
$(MAKE
) -C pppd
/pppd
590 $(MAKE
) -C pppd
/pppd
clean
593 install -D pppd
/pppd
/pppd
$(INSTALLDIR
)/pppd
/usr
/sbin
/pppd
594 $(STRIP
) $(INSTALLDIR
)/pppd
/usr
/sbin
/pppd
597 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
598 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
603 cd zebra
&& rm -f config.cache
&& CC
=$(CC
) AR
=$(AR
) RANLIB
=$(RANLIB
) CFLAGS
="-g -Os -Wall" $(CONFIGURE
) \
604 --host
=mipsel-linux
--prefix=/usr
/local
/zebra \
605 --enable-netlink
--disable-ipv6
--disable-ripngd
--disable-ospfd
--disable-doc \
606 --disable-ospf6d
--disable-bgpd
--disable-bgpd-announce
607 @
$(MAKE
) -C zebra CC
=$(CC
) AR
=$(AR
) RANLIB
=$(RANLIB
)
610 install -D zebra
/zebra
/zebra
$(INSTALLDIR
)/zebra
/usr
/sbin
/zebra
611 install -D zebra
/ripd
/ripd
$(INSTALLDIR
)/zebra
/usr
/sbin
/ripd
612 install -D zebra
/lib
/libzebra.so
$(INSTALLDIR
)/zebra
/usr
/lib
/libzebra.so
613 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/sbin
/zebra
614 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/sbin
/ripd
615 $(STRIP
) $(INSTALLDIR
)/zebra
/usr
/lib
/libzebra.so
619 install -d
$(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
620 install rp-l2tp
/handlers
/*.so
$(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
621 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/lib
/l2tp
/*.so
622 install -D rp-l2tp
/handlers
/l2tp-control
$(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tp-control
623 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tp-control
624 install -D rp-l2tp
/l2tpd
$(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tpd
625 $(STRIP
) $(INSTALLDIR
)/rp-l2tp
/usr
/sbin
/l2tpd
629 install -D bpalogin
/bpalogin
$(INSTALLDIR
)/bpalogin
/usr
/sbin
/bpalogin
630 $(STRIP
) $(INSTALLDIR
)/bpalogin
/usr
/sbin
/bpalogin
635 # @-mkdir -p libnet/lib
636 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
640 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
643 @
[ ! -f libbcm
/Makefile
] ||
$(MAKE
) -C libbcm
646 install -D libbcm
/libbcm.so
$(INSTALLDIR
)/libbcm
/usr
/lib
/libbcm.so
647 $(STRIP
) $(INSTALLDIR
)/libbcm
/usr
/lib
/libbcm.so
651 install -D iproute2
/tc
/tc
$(INSTALLDIR
)/iproute2
/usr
/sbin
/tc
652 $(STRIP
) $(INSTALLDIR
)/iproute2
/usr
/sbin
/tc
653 install -D iproute2
/ip
/ip
$(INSTALLDIR
)/iproute2
/usr
/sbin
/ip
654 $(STRIP
) $(INSTALLDIR
)/iproute2
/usr
/sbin
/ip
660 dropbear
: dropbear
/config.h
662 @make
-C dropbear PROGRAMS
="dropbear dbclient dropbearkey scp" MULTI
=1
665 install -D dropbear
/dropbearmulti
$(INSTALLDIR
)/dropbear
/usr
/bin
/dropbearmulti
666 $(STRIP
) $(INSTALLDIR
)/dropbear
/usr
/bin
/dropbearmulti
667 cd
$(INSTALLDIR
)/dropbear
/usr
/bin
&& \
668 ln
-sf dropbearmulti dropbear
&& \
669 ln
-sf dropbearmulti dropbearconvert
&& \
670 ln
-sf dropbearmulti dropbearkey
&& \
671 ln
-sf dropbearmulti dbclient
&& \
672 ln
-sf dropbearmulti ssh
&& \
673 ln
-sf dropbearmulti scp
676 @make
-C dropbear
clean
679 cd dropbear
&& CFLAGS
="-O2 -Wall" 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
680 make
-C dropbear
clean
682 igmpproxy
/src
/Makefile
: igmpproxy
/src
/Makefile.in
683 cd igmpproxy
&& CFLAGS
="-O2 -Wall" \
684 $(CONFIGURE
) --prefix=/usr
686 igmpproxy
: igmpproxy
/src
/Makefile
688 @
$(MAKE
) -C igmpproxy
/src
691 install -D igmpproxy
/src
/igmpproxy
$(INSTALLDIR
)/igmpproxy
/usr
/sbin
/igmpproxy
692 $(STRIP
) $(INSTALLDIR
)/igmpproxy
/usr
/sbin
/igmpproxy
695 $(MAKE
) -C igmpproxy
/src
clean
696 rm -f igmpproxy
/src
/Makefile
702 ebtables-install
: dummy
703 install -D ebtables
/ebtables
$(INSTALLDIR
)/ebtables
/usr
/sbin
/ebtables
705 mkdir
-p
$(INSTALLDIR
)/ebtables
/usr
/lib
/
706 cp ebtables
/*.so
$(INSTALLDIR
)/ebtables
/usr
/lib
/
707 cp ebtables
/extensions
/*.so
$(INSTALLDIR
)/ebtables
/usr
/lib
/
710 make
-C ebtables
clean
717 @
[ ! -d
$* ] ||
( $(SEP
); $(MAKE
) -C
$* )
721 @
-[ ! -d
$* ] ||
$(MAKE
) -C
$* clean
724 @
[ ! -d
$* ] ||
$(MAKE
) -C
$* install INSTALLDIR
=$(INSTALLDIR
)/$*
729 $(obj-y
) $(obj-n
) $(obj-clean
) $(obj-install
): dummy
731 .PHONY
: all clean distclean mrproper
install package
732 .PHONY
: conf mconf oldconf kconf kmconf config menuconfig oldconfig
733 .PHONY
: dummy libnet libpcap