Merge branch 'tomato-ND-usbmod-vpn' into tomato-ND-USBmod
[tomato.git] / release / src / router / Makefile
blob3b3ecae3424a2bca430954f62b221fee97c6ccde
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
20 ifeq ($(TOMATO_DEV),jon)
21 SEP=echo -e "\033[41;1m $@ \033[0m"
22 else
23 SEP=true
24 endif
27 # standard packages
29 obj-y += nvram
30 obj-y += shared
31 obj-y += prebuilt
32 obj-y += iptables
33 obj-y += rc
34 obj-y += iproute2
35 obj-y += rom
36 obj-y += others
37 obj-y += busybox
38 obj-y += httpd
39 obj-y += www
40 obj-y += bridge
41 obj-y += dnsmasq
42 obj-y += etc
43 obj-y += vlan
44 obj-y += ppp
45 obj-y += ttcp
46 obj-y += ntpc
47 obj-y += rstats
48 # obj-y += ebtables
49 # obj-y += libbcm
50 # obj-y += libbcmcrypto
51 # obj-y += nas
52 # obj-y += wlconf
54 # !!TB - updated Broadcom Wireless driver 4.150.10.X
55 obj-y += et
56 obj-y += libbcmcrypto
57 obj-y += wlconf
59 obj-y += mssl
60 obj-y += mdu
62 # !!TB
63 obj-y += p910nd
64 obj-y += scsi-idle
65 #obj-y += sendmail
66 obj-$(TCONFIG_FTP) += vsftpd
67 obj-$(TCONFIG_SAMBASRV) += samba
68 obj-$(TCONFIG_USB_EXTRAS) += mkdosfs
71 ifeq ($(TEST_MINIUPNPD),1)
72 obj-y += miniupnpd
73 else
74 obj-y += miniupnpd # !!TB
75 endif
79 # configurable packages
81 obj-$(TCONFIG_L2TP) += rp-l2tp
82 obj-$(TCONFIG_PPTP) += pptp-client
83 # obj-$(TCONFIG_HEARTBEAT) += bpalogin
84 # obj-$(TCONFIG_DDNS) += ipupdate
85 obj-$(TCONFIG_HTTPS) += openssl
86 obj-$(TCONFIG_HTTPS) += matrixssl
87 obj-$(TCONFIG_SSH) += dropbear
88 obj-$(TCONFIG_ZEBRA) += zebra
89 obj-$(TCONFIG_IPP2P) += ipp2p
90 obj-$(TCONFIG_LZO) += lzo
91 obj-$(TCONFIG_OPENVPN) += openvpn
93 ifeq ($(TCONFIG_L2TP),y)
94 NEED_PPPD = y
95 endif
96 ifeq ($(TCONFIG_PPTP),y)
97 NEED_PPPD = y
98 endif
99 obj-$(NEED_PPPD) += pppd
102 obj-clean := $(foreach obj, $(obj-y) $(obj-n) $(obj-), $(obj)-clean)
103 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
108 # Basic rules
111 all: clean-build libc $(obj-y) kernel
114 kernel: $(LINUXDIR)/.config
115 @$(SEP)
117 @if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
118 $(MAKE) -C $(LINUXDIR) zImage ; \
120 if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
121 $(MAKE) -C $(LINUXDIR) modules ; \
125 kmod: dummy
126 $(MAKE) -C $(LINUXDIR) modules
128 fooit:
129 @../btools/libfoo.pl
131 install package: $(obj-install) $(LINUXDIR)/.config
132 @$(SEP)
134 install -d $(TARGETDIR)
137 # kernel modules
138 $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR)
139 ##!!TB find $(TARGETDIR)/lib/modules -name *.o -exec mipsel-linux-strip --strip-unneeded {} \;
140 ##!!TB - do not strip ftp nat/conntrack, imq, scsi_mod and loop kernel modules (needed to keep parameters)
141 find $(TARGETDIR)/lib/modules ! \( -name imq.o -prune \) ! \( -name *ftp.o -prune \) ! \( -name scsi_mod.o -prune \) ! \( -name loop.o -prune \) -a -name *.o -exec mipsel-linux-strip --strip-unneeded {} \;
143 -cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/net && mv diag/* . && rm -rf diag
145 # nice and clean
146 -cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/net && mv et.4702/* . && rm -rf et.4702 || true
147 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/net && mv et/* . && rm -rf et
148 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/net && mv wl/* . && rm -rf wl
149 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv cifs/* . && rm -rf cifs
150 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv jffs2/* . && rm -rf jffs2 || true
151 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv jffs/* . && rm -rf jffs || true
152 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/lib && mv zlib_inflate/* . && rm -rf zlib_inflate
153 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/lib && mv zlib_deflate/* . && rm -rf zlib_deflate
154 rm -rf $(TARGETDIR)/lib/modules/2.4.20/pcmcia
156 ##!!TB
157 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv ext2/* . && rm -rf ext2 || true
158 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv ext3/* . && rm -rf ext3 || true
159 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv jbd/* . && rm -rf jbd || true
160 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv fat/* . && rm -rf fat || true
161 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv vfat/* . && rm -rf vfat || true
162 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv ntfs/* . && rm -rf ntfs || true
163 ifneq ($(TCONFIG_SAMBASRV),y)
164 rm -rf $(TARGETDIR)/lib/modules/2.4.20/kernel/fs/nls || true
165 endif
166 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/fs && mv nls/* . && rm -rf nls || true
167 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/usb && mv hcd/* . && rm -rf hcd || true
168 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/usb && mv host/* . && rm -rf host || true
169 cd $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/usb && mv storage/* . && rm -rf storage || true
171 # misc
172 for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
173 (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
174 done
176 ifneq ($(TCONFIG_JFFS2),y)
177 rm -f $(TARGETDIR)/lib/modules/2.4.20/kernel/fs/jffs2.o || true
178 rm -f $(TARGETDIR)/lib/modules/2.4.20/kernel/fs/jffs.o || true
179 rm -rf $(TARGETDIR)/lib/modules/2.4.20/kernel/lib/zlib_*
180 endif
182 ifneq ($(TCONFIG_CIFS),y)
183 rm -f $(TARGETDIR)/lib/modules/2.4.20/kernel/fs/cifs.o
184 endif
186 ifneq ($(TCONFIG_L7),y)
187 rm -f $(TARGETDIR)/lib/modules/2.4.20/kernel/net/ipv4/netfilter/ipt_layer7.o
188 rm -f $(TARGETDIR)/usr/lib/iptables/libipt_layer7.so
189 endif
191 # uClibc
192 install $(LIBDIR)/ld-uClibc.so.0 $(TARGETDIR)/lib/
193 install $(LIBDIR)/libcrypt.so.0 $(TARGETDIR)/lib/
194 install $(LIBDIR)/libc.so.0 $(TARGETDIR)/lib/
195 install $(LIBDIR)/libdl.so.0 $(TARGETDIR)/lib/
196 install $(LIBDIR)/libm.so.0 $(TARGETDIR)/lib/
197 ifeq ($(TCONFIG_SSH),y)
198 # libutil is not used when excluding SSH, and libfoo.pl goes into
199 # an infinite loop if it is included. So only include it when using SSH.
200 install $(LIBDIR)/libutil.so.0 $(TARGETDIR)/lib/
201 endif
202 install $(LIBDIR)/libnsl.so.0 $(TARGETDIR)/lib/
204 @cd $(TARGETDIR) && $(TOP)/others/rootprep.sh
206 @echo ---
207 busybox/examples/depmod.pl -k $(LINUXDIR)/vmlinux -b $(TARGETDIR)/lib/modules/2.4.20/
208 @echo ---
210 @rm -f $(TARGETDIR)/lib/modules/2.4.20/build
212 @../btools/libfoo.pl
213 @chmod 0555 $(TARGETDIR)/lib/*.so*
215 # separated extra stuff
216 # !!TB - moved to run after libfoo.pl - to make sure shared libs include all symbols needed by extras
217 @rm -rf $(PLATFORMDIR)/extras
218 @mkdir $(PLATFORMDIR)/extras
219 @mv $(TARGETDIR)/lib/modules/2.4.20/kernel/net/ipv4/ip_gre.o $(PLATFORMDIR)/extras/
220 ifneq ($(TCONFIG_OPENVPN),y)
221 @mv $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/net/tun.o $(PLATFORMDIR)/extras/
222 endif
223 #!!TB
224 @mv $(TARGETDIR)/lib/modules/2.4.20/kernel/fs/ntfs.o $(PLATFORMDIR)/extras/ || true
225 @mv $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/usb/scanner.o $(PLATFORMDIR)/extras/ || true
226 ifneq ($(TCONFIG_USB_EXTRAS),y)
227 @mv $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/block/loop.o $(PLATFORMDIR)/extras/ || true
228 @rm -rf $(TARGETDIR)/lib/modules/2.4.20/kernel/drivers/block || true
229 endif
231 @mkdir -p $(TARGETDIR)/rom/etc/l7-protocols
232 ifeq ($(TCONFIG_L7PAT),y)
233 @cd layer7 && ./squish.sh
234 cp layer7/squished/*.pat $(TARGETDIR)/rom/etc/l7-protocols
235 endif
237 @$(MAKE) -C $(SRCBASE)/linux/linux/scripts/squashfs mksquashfs-lzma
238 @$(SRCBASE)/linux/linux/scripts/squashfs/mksquashfs-lzma $(TARGETDIR) $(PLATFORMDIR)/target.image | tee target.info
240 # Package kernel and filesystem
241 # if grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
242 # cp $(PLATFORMDIR)/target.image $(LINUXDIR)/arch/mips/ramdisk/$${CONFIG_EMBEDDED_RAMDISK_IMAGE} ; \
243 # $(MAKE) -C $(LINUXDIR) zImage ; \
244 # else \
245 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz $(PLATFORMDIR)/ ; \
246 # trx -o $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image ; \
247 # fi
249 # Pad self-booting Linux to a 64 KB boundary
250 # cp $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage $(PLATFORMDIR)/
251 # dd conv=sync bs=64k < $(PLATFORMDIR)/zImage > $(PLATFORMDIR)/linux.bin
252 # Append filesystem to self-booting Linux
253 # cat $(PLATFORMDIR)/target.image >> $(PLATFORMDIR)/linux.bin
256 libc: $(LIBDIR)/ld-uClibc.so.0
257 $(MAKE) -C ../../../tools-src/uClibc all
258 $(MAKE) -C ../../../tools-src/uClibc install
262 # cleaners
265 clean: clean-build $(obj-clean)
266 rm -rf layer7/squished
267 make -C config clean
269 clean-build: dummy
270 rm -rf $(TARGETDIR)
271 rm -rf $(INSTALLDIR)
272 rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.image
273 rm -rf $(PLATFORMDIR)/extras
275 distclean: clean
276 ifneq ($(INSIDE_MAK),1)
277 $(MAKE) -C .. $@ INSIDE_MAK=1
278 endif
279 -rm -f $(LIBDIR)/*.so.0 $(LIBDIR)/*.so
282 # configuration
285 CONFIG_IN := config/config.in
287 config/conf config/mconf:
288 @$(MAKE) -C config
290 rconf: config/conf
291 @config/conf $(CONFIG_IN)
293 rmconf: config/mconf
294 @config/mconf $(CONFIG_IN)
296 roldconf: config/conf
297 @config/conf -o $(CONFIG_IN)
299 kconf:
300 @$(MAKE) -C $(LINUXDIR) config
302 kmconf:
303 @$(MAKE) -C $(LINUXDIR) menuconfig
305 koldconf:
306 @$(MAKE) -C $(LINUXDIR) oldconfig
308 config conf: rconf kconf
310 menuconfig mconf: rmconf kmconf
312 oldconfig oldconf: roldconf koldconf
316 # overrides and extra dependencies
319 busybox: dummy
320 $(MAKE) -C busybox
321 # V=1
323 busybox-install:
324 rm -rf $(INSTALLDIR)/busybox
325 $(MAKE) -C busybox install CONFIG_PREFIX=$(INSTALLDIR)/busybox
327 busybox-test: dummy
328 $(MAKE) -C busybox objsizes CFLAGS="-Os"
330 # 1.2:
331 # busybox: busybox/include/bb_config.h
332 # @$(MAKE) -C busybox CROSS_CFLAGS="-mips2"
333 # busybox/include/bb_config.h:
334 # @$(MAKE) -C busybox oldconfig
335 # @$(MAKE) -C busybox clean
336 # busybox-install:
337 # rm -rf $(INSTALLDIR)/busybox
338 # $(MAKE) -C busybox install PREFIX=$(INSTALLDIR)/busybox
340 httpd: matrixssl shared nvram mssl
341 @$(SEP)
342 @$(MAKE) -C httpd
345 matrixssl:
346 @$(SEP)
347 @$(MAKE) -C matrixssl/src
349 matrixssl-install:
350 @true
352 matrixssl-clean:
353 $(MAKE) -C matrixssl/src clean
356 openssl-install:
357 install -D openssl/libcrypto.so $(INSTALLDIR)/openssl/usr/lib/libcrypto.so
358 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so
360 install -D -m 500 openssl/apps/openssl $(INSTALLDIR)/openssl/usr/sbin/openssl
361 $(STRIP) $(INSTALLDIR)/openssl/usr/sbin/openssl
363 install -D -m 0500 httpd/gencert.sh $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
365 # perl -e 'while (<>) { s/.SECS/time()-(24*60*60)/e; print; }' < httpd/gencert.sh > $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
366 # chmod 0500 $(INSTALLDIR)/openssl/usr/sbin/gencert.sh
368 ifeq ($(TCONFIG_FTP_SSL),y)
369 # !!TB
370 install -D openssl/libssl.so $(INSTALLDIR)/openssl/usr/lib/libssl.so
371 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so
372 endif
373 ifeq ($(TCONFIG_OPENVPN),y)
374 ifneq ($(TCONFIG_FTP_SSL),y)
375 install -D openssl/libssl.so $(INSTALLDIR)/openssl/usr/lib/libssl.so
376 $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so
377 endif
378 endif
380 mssl: matrixssl
382 mdu: shared mssl
384 rc: nvram shared
387 bridge:
388 @$(SEP)
389 @$(MAKE) -C bridge brctl/brctl
391 bridge-install:
392 install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
393 $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
396 dnsmasq-install:
397 install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
398 $(STRIP) $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
400 iptables:
401 @$(SEP)
402 $(MAKE) -C iptables BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR)
404 iptables-install:
405 install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
406 cd $(INSTALLDIR)/iptables/usr/sbin && \
407 ln -sf iptables iptables-restore
409 install -d $(INSTALLDIR)/iptables/usr/lib/iptables
410 install -D iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables/
412 install -D iptables/libiptc.so $(INSTALLDIR)/iptables/usr/lib/libiptc.so
414 $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
415 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
416 $(STRIP) $(INSTALLDIR)/iptables/usr/lib/libiptc.so
418 iptables-clean:
419 -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
421 ppp:
422 @$(SEP)
423 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp
424 # $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp DFLAGS="-DDEBUG -DDEBUGALL"
426 ppp-%:
427 $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/ppp
431 upnp: nvram shared iptables
433 # miniupnpd-install:
434 # install -D miniupnpd/miniupnpd $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
435 # $(STRIP) $(INSTALLDIR)/miniupnpd/usr/sbin/miniupnpd
437 nvram: shared
439 # !!TB
440 p910nd: shared
441 sendmail: shared
442 samba: shared
443 miniupnpd: iptables
445 shared: busybox
447 # !!TB
448 vsftpd: shared openssl
449 @$(SEP)
450 $(MAKE) -C vsftpd
452 vsftpd-install:
453 install -D vsftpd/vsftpd $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
454 $(STRIP) -s $(INSTALLDIR)/vsftpd/usr/sbin/vsftpd
456 vlan:
457 @$(SEP)
458 @$(MAKE) -C vlan CROSS=$(CROSS_COMPILE) # STRIPTOOL=$(STRIP)
460 vlan-install:
461 $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) INSTALLDIR=$(INSTALLDIR) install # STRIPTOOL=$(STRIP)
462 $(STRIP) $(INSTALLDIR)/vlan/usr/sbin/vconfig
465 pptp-client-install:
466 install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
467 $(STRIP) $(INSTALLDIR)/pptp-client/usr/sbin/pptp
470 pppd:
471 @$(SEP)
472 @$(MAKE) -C pppd/pppd
474 pppd-clean:
475 $(MAKE) -C pppd/pppd clean
477 pppd-install:
478 install -D pppd/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
479 $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
481 # ipupdate-install:
482 # install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
483 # $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
486 zebra:
487 @$(SEP)
488 @$(MAKE) -C zebra CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
490 zebra-install:
491 install -D zebra/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
492 install -D zebra/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
493 install -D zebra/lib/libzebra.so $(INSTALLDIR)/zebra/usr/lib/libzebra.so
494 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
495 $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
496 $(STRIP) $(INSTALLDIR)/zebra/usr/lib/libzebra.so
499 rp-l2tp-install:
500 install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
501 install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
502 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
503 install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
504 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
505 install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
506 $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
509 bpalogin-install:
510 install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
511 $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
514 # libnet:
515 # @$(SEP)
516 # @-mkdir -p libnet/lib
517 # @$(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
519 # libpcap:
520 # @$(SEP)
521 # @$(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
523 libbcm:
524 @[ ! -f libbcm/Makefile ] || $(MAKE) -C libbcm
526 libbcm-install:
527 install -D libbcm/libbcm.so $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
528 $(STRIP) $(INSTALLDIR)/libbcm/usr/lib/libbcm.so
531 iproute2-install:
532 install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
533 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
534 install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
535 $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
538 ntpc: nvram shared
541 dropbear: dropbear/config.h
542 @$(SEP)
543 @make -C dropbear PROGRAMS="dropbear dbclient dropbearkey scp" MULTI=1
545 dropbear-install:
546 install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
547 $(STRIP) $(INSTALLDIR)/dropbear/usr/bin/dropbearmulti
548 cd $(INSTALLDIR)/dropbear/usr/bin && \
549 ln -sf dropbearmulti dropbear && \
550 ln -sf dropbearmulti dropbearconvert && \
551 ln -sf dropbearmulti dropbearkey && \
552 ln -sf dropbearmulti dbclient && \
553 ln -sf dropbearmulti ssh && \
554 ln -sf dropbearmulti scp
556 dropbear-clean:
557 @make -C dropbear clean
559 dropbear/config.h:
560 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
561 make -C dropbear clean
564 ebtables: dummy
565 @make -C ebtables
567 ebtables-install: dummy
568 install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
570 mkdir -p $(INSTALLDIR)/ebtables/usr/lib/
571 cp ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
572 cp ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/
574 ebtables-clean:
575 make -C ebtables clean
578 lzo-install:
579 install -D lzo/src/.libs/liblzo2.so $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
580 $(STRIP) $(INSTALLDIR)/lzo/usr/lib/liblzo2.so.2
581 cd $(INSTALLDIR)/lzo/usr/lib && ln -sf liblzo2.so.2 liblzo2.so
584 openvpn-install:
585 install -D -m 500 openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
586 $(STRIP) $(INSTALLDIR)/openvpn/usr/sbin/openvpn
590 # Generic rules
594 @[ ! -d $* ] || ( $(SEP); $(MAKE) -C $* )
597 %-clean:
598 @-[ ! -d $* ] || $(MAKE) -C $* clean
600 %-install:
601 @[ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
603 %-build:
604 $(MAKE) $*-clean $*
606 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
608 .PHONY: all clean distclean mrproper install package
609 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
610 .PHONY: dummy libnet libpcap