root/src/router/Makefile

Revision 3918, 49.1 kB (checked in by BrainSlayer, 3 years ago)

watchdog and kernel update

Line 
1 # Broadcom Linux Router Makefile
2 #
3 # Copyright 2001-2003, Broadcom Corporation
4 # All Rights Reserved.
5 #
6 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
7 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
8 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
9 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
10 #
11 # $Id: Makefile,v 1.2 2005/09/26 11:06:58 seg Exp $
12 #
13
14 include .config
15 ifneq ($(wildcard ../cy_conf.mak),)
16   include ../cy_conf.mak
17 endif
18
19 #
20 # Paths
21 #
22 SER_MODULES:=sl tm rr maxfwd usrloc registrar dbtext textops nathelper
23 SER_MODULE_FILES:=$(foreach module,$(SER_MODULES),ser/modules/$(module)/$(module).so)
24
25 # Source bases
26 export PLATFORM LINUXDIR LIBDIR USRLIBDIR
27 export TOP := $(shell pwd)
28 export SRCBASE := $(shell (cd $(TOP)/.. && pwd -P))
29
30 #
31 # Cross-compile environment variables
32 #
33
34 # Build platform
35 export BUILD := i386-pc-linux-gnu
36 export HOSTCC := gcc
37
38 # uClibc wrapper
39 ifeq ($(CONFIG_UCLIBC),y)
40 export PLATFORM := $(PLATFORM)-uclibc
41 endif
42
43 export LINUXVER := 2.4.34-pre2
44 ifeq ($(CONFIG_MSSID),y)
45 export LINUXDIR := $(SRCBASE)/linux/brcm/linux.v24
46 else
47 export LINUXDIR := $(SRCBASE)/linux/brcm/linux.v23
48 endif
49
50 ifeq ($(PLATFORM),mipsel)
51 export CROSS_COMPILE := mipsel-linux-
52 export CONFIGURE := ./configure mipsel-linux --build=$(BUILD)
53 export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/../mipsel-linux && pwd -P)
54 endif
55
56 ifeq ($(PLATFORM),mipsel-uclibc)
57 export CROSS_COMPILE := mipsel-linux-uclibc-
58 export CONFIGURE := ./configure mipsel-linux --build=$(BUILD)
59 export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/.. && pwd -P)
60 endif
61
62 ifeq ($(CONFIG_BCMWPA2),y)
63 export CFLAGS += -DBCMWPA2
64 endif
65
66 export ARCH:= mipsel
67 export ARCHITECTURE:= broadcom
68 export BASEOPT:=-Os
69 export COPTS:=$(BASEOPT) -pipe -mips32 -mtune=mips32 -funit-at-a-time
70 export CC := $(CROSS_COMPILE)gcc
71 export AR := $(CROSS_COMPILE)ar
72 export AS := $(CROSS_COMPILE)as
73 export LD := $(CROSS_COMPILE)ld
74 export NM := $(CROSS_COMPILE)nm
75 export RANLIB := $(CROSS_COMPILE)ranlib
76 export STRIP := @true
77 export SIZE := $(CROSS_COMPILE)size
78
79 export CFLAGS :=$(BASEOPT) -pipe -mips32 -mtune=mips32 -funit-at-a-time
80 export LDFLAGS := -s
81
82 #
83 # Install and target directories
84 #
85
86 export PLATFORMDIR := $(TOP)/$(PLATFORM)
87 export INSTALLDIR := $(PLATFORMDIR)/install
88 export TARGETDIR := $(PLATFORMDIR)/target
89
90
91 obj-y += libcrypto
92 #
93 # Configuration
94 #
95 CONFIG_IPTABLES=y
96 #CONFIG_WLC=y
97 obj-$(CONFIG_OPENSSL) += openssl
98 obj-$(CONFIG_MATRIXSSL) += matrixssl
99 obj-$(CONFIG_HTTPD) += httpd validate
100 obj-$(CONFIG_RC) += rc services
101 #obj-$(CONFIG_LIBBCM) += libbcm
102 obj-$(CONFIG_SHARED) += shared
103 obj-$(CONFIG_WWW) += www
104 obj-$(CONFIG_GLIBC) += lib.mipsel
105 obj-$(CONFIG_UCLIBC) += lib.mipsel
106 obj-$(CONFIG_BUSYBOX) += busybox net-tools
107 obj-$(CONFIG_DNSMASQ) += dnsmasq
108 obj-$(CONFIG_IPTABLES) += iptables
109 obj-$(CONFIG_LIBIPT) += iptables
110 obj-$(CONFIG_IPSEC) += ipsec
111 obj-$(CONFIG_LIBPCAP) += libpcap
112 obj-$(CONFIG_LIBNET) += libnet
113 obj-$(CONFIG_TCPDUMP) += tcpdump
114 obj-$(CONFIG_KISMETDRONE) += kismet
115 obj-$(CONFIG_NETSTATNAT) += netstatnat
116
117 ifneq ($(CONFIG_MADWIFI),y)
118 obj-$(CONFIG_UTILS) += utils
119 obj-$(CONFIG_NAS) += nas
120 obj-$(CONFIG_WLCONF) += wlconf
121 endif
122 obj-$(CONFIG_SES) += ses
123 obj-$(CONFIG_WPA_SUPPLICANT) += wpa_supplicant
124 obj-$(CONFIG_NETCONF) += netconf
125 obj-$(CONFIG_NTP) += ntpclient
126 obj-$(CONFIG_NVRAM) += nvram
127 obj-$(CONFIG_PPP) += ppp
128 # AhMan March 19 2005
129 obj-$(CONFIG_PPPOE) += pppoe
130 obj-$(CONFIG_UDHCPD) += udhcpd
131 obj-$(CONFIG_UPNP) += upnp
132 obj-$(CONFIG_MADWIFI) += madwifi
133 obj-$(CONFIG_ETC) += etc
134 #obj-$(CONFIG_VLAN) += vlan
135 obj-$(CONFIG_WIRELESS_TOOLS) += wireless-tools
136 obj-$(CONFIG_DROPBEAR_SSHD) += zlib dropbear
137 obj-$(CONFIG_IPROUTE2) += iproute2
138 obj-$(CONFIG_EBTABLES) += ebtables
139 obj-$(CONFIG_PPTPD) += pptpd
140 obj-$(CONFIG_PIPSEC) += pipsec
141 obj-$(CONFIG_FROTTLE) += frottle
142 obj-$(CONFIG_WOL) += wol
143 obj-$(CONFIG_SNMP) += snmp
144 obj-$(CONFIG_BRIDGE) += bridge
145 obj-$(CONFIG_RADVD) += radvd
146 obj-$(CONFIG_RFLOW) += rflow
147 #obj-$(CONFIG_ADM6996) += adm6996
148 obj-$(CONFIG_SPUTNIK_APD) += sputnik
149
150 ##################################################################
151 CONFIG_OTHERS=y
152 #obj-$(CONFIG_ADM6996) += adm6996
153 obj-$(CONFIG_L2TP) += rp-l2tp
154
155 obj-$(CONFIG_CHILLISPOT) += chillispot
156 obj-$(CONFIG_DHCPFORWARD) += dhcpforwarder
157 obj-$(CONFIG_PARPROUTED) += parprouted
158 obj-$(CONFIG_HEARTBEAT) += bpalogin
159 #obj-$(CONFIG_TFTPD) += tftpd
160 obj-$(CONFIG_CRON) += cron
161 obj-$(CONFIG_PPTP) += pptp-client
162 obj-$(CONFIG_PPPD) += pppd
163 obj-$(CONFIG_ZEBRA) += zebra
164 obj-$(CONFIG_BIRD) += bird
165 obj-$(CONFIG_DDNS) += inadyn
166 obj-$(CONFIG_OTHERS) += others
167 obj-$(CONFIG_EOU) += eou
168 obj-$(CONFIG_SER) += ser
169 obj-$(CONFIG_NOCAT) += nocat
170 obj-$(CONFIG_RTPPROXY) += rtpproxy
171 obj-$(CONFIG_SAMBA) += samba
172 obj-$(CONFIG_RADAUTH) += radauth
173 obj-$(CONFIG_MMC) += mmc
174 obj-$(CONFIG_ZEROIP) += shat
175 obj-$(CONFIG_KAID) += kaid
176 #obj-$(CONFIG_ROBOCFG) += robocfg
177 obj-$(CONFIG_MULTICAST) += igmp-proxy
178 obj-$(CONFIG_SKYTRON) += skytron
179 obj-$(CONFIG_OPENVPN) += openvpn
180 obj-$(CONFIG_OLSRD) += olsrd
181 #obj-$(CONFIG_E2FSPROGS) += e2fsprogs
182 obj-$(CONFIG_HTTPREDIRECT) += http-redirect
183 obj-$(CONFIG_SMTPREDIRECT) += smtp-redirect
184 obj-$(CONFIG_WLC) += wlc
185 obj-$(CONFIG_OVERCLOCKING) += overclocking
186 obj-$(CONFIG_PROXYWATCHDOG) += proxywatchdog
187 obj-$(CONFIG_JFFS2) += jffs2
188 obj-$(CONFIG_LANGUAGE) += language
189 obj-$(CONFIG_NETWORKSETTINGS) += networksettings
190 obj-$(CONFIG_ROUTERSTYLE) += routerstyle
191 obj-$(CONFIG_SCHEDULER) += scheduler
192 obj-$(CONFIG_SYSLOG) += syslog
193 obj-$(CONFIG_TELNET) += telnet
194 obj-$(CONFIG_WDSWATCHDOG) += wdswatchdog
195 obj-$(CONFIG_IPV6) += ipv6
196 obj-$(CONFIG_CONNTRACK) += conntrack
197 obj-$(CONFIG_MEDIASERVER) += mediaserver
198 obj-$(CONFIG_RADIOOFF) += radiooff
199 obj-y += sprom
200
201
202
203 obj-clean := $(foreach obj,$(obj-y) $(obj-n),$(obj)-clean)
204 obj-install := $(foreach obj,$(obj-y),$(obj)-install)
205 obj-distclean := $(foreach obj,$(obj-y) $(obj-n),$(obj)-distclean)
206
207 #
208 # Basic rules
209 #
210
211 all: clean_target $(obj-y) $(LINUXDIR)/.config
212         # Also build kernel
213         # Also build kernel
214         if ! grep -q "CONFIG_EMBEDDED_RAMDISK=y" $(LINUXDIR)/.config ; then \
215             $(MAKE) -C $(LINUXDIR) zImage ; \
216         fi
217         if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
218             $(MAKE) -C $(LINUXDIR) modules ; \
219         fi
220
221        
222 clean: $(obj-clean)
223         rm -f .config.old .config.cmd
224         rm -rf $(INSTALLDIR)
225         rm -rf $(TARGETDIR)
226         rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.squashfs
227
228 clean_target:
229         rm -rf $(TARGETDIR)
230         rm -f $(PLATFORMDIR)/linux.trx $(PLATFORMDIR)/vmlinuz $(PLATFORMDIR)/target.squashfs
231
232 distclean mrproper: $(obj-distclean) clean_target
233         rm -rf $(INSTALLDIR)
234         $(MAKE) -C $(LINUXDIR) distclean
235         $(MAKE) -C $(LINUXDIR)/arch/mips/bcm947xx/compressed clean
236         #rm -f $(PLATFORMDIR)/zImage $(PLATFORMDIR)/linux.bin
237         $(MAKE) -C config clean
238         rm -f .config $(LINUXDIR)/.config
239         rm -f .config.old .config.cmd
240
241 optimize-lib:
242 #       ../../tools/optimize_lib.sh netconf/ libnetconf.so libnetconf.a libnetconf_min.so $(TARGETDIR) $(TARGETDIR)/usr/lib/libnetconf.so
243         ../../tools/optimize_lib.sh shared/ libshared.so libshared.a libshared_min.so $(TARGETDIR) $(TARGETDIR)/usr/lib/libshared.so
244 #       ../../tools/optimize_lib.sh lib/ libm.so libm.a libm_min.so $(TARGETDIR) $(TARGETDIR)/lib/libm.so.0
245         ../../tools/optimize_lib.sh lib/ libpthread.so libpthread.a libphread_min.so $(TARGETDIR) $(TARGETDIR)/lib/libpthread.so.0
246 #       ../../tools/optimize_lib.sh services/ services.so services.a services_min.so $(TARGETDIR) $(TARGETDIR)/usr/lib/services.so
247 #  ../../tools/optimize_lib.sh iptables/ libiptables.so libiptables.a libiptables_min.so $(TARGETDIR) $(TARGETDIR)/usr/lib/libiptables.so
248
249
250 install package: $(filter-out lib.mipsel-install,$(obj-install)) $(LINUXDIR)/.config
251         install -d $(TARGETDIR)
252         for dir in $(wildcard $(patsubst %,$(INSTALLDIR)/%,$(obj-y))) ; do \
253             (cd $${dir} && tar cpf - .) | (cd $(TARGETDIR) && tar xpf -) \
254         done
255         # optimize the crypto library by removing unneeded symbols
256         #[ ! -d libcrypto ] || $(MAKE) -C libcrypto optimize
257         #[ ! -d libcrypto ] || $(MAKE) -C libcrypto optimize
258         # Install (and possibly optimize) C library
259         $(MAKE) lib.mipsel-install
260         # optimize the others library by removing unneeded symbols
261         $(MAKE) optimize-lib
262         # Install modules into filesystem
263         if grep -q "CONFIG_MODULES=y" $(LINUXDIR)/.config ; then \
264             $(MAKE) -C $(LINUXDIR) modules_install DEPMOD=/bin/true INSTALL_MOD_PATH=$(TARGETDIR) ; \
265         fi
266 ifeq ($(CONFIG_MADWIFI),y)
267         rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl
268 endif
269 #       mkdir -p $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net/ctmisc
270 #       cp ../wl/ctmisc/ctmisc.o $(TARGETDIR)/lib/modules/2.4.32/kernel/drivers/net/ctmisc
271        
272 #       find $(TARGETDIR) -name "wl_*.o"  | xargs rm -rf
273         # quick n dirty - stuff Nikki's module where it belongs
274         #mkdir $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996
275         if [ "$(CONFIG_MMC)" = "y" ] ; then \
276         mkdir -p $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/mmc ; \
277         cp mmc/mmc.o $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/mmc ; \
278         fi ;
279 #ifeq ($(CONFIG_MSSID),y)
280 #       cp adm6996.v24/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
281 #else   
282 #       cp adm6996/adm6996.o $(TARGETDIR)/lib/modules/2.4.32-rc3/kernel/drivers/net/adm6996/adm6996.o
283 #endif
284
285         rm -f $(TARGETDIR)/lib/modules/$(LINUXVER)/build
286         mv $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/diag/* $(TARGETDIR)/lib/modules/$(LINUXVER)
287 ifneq ($(CONFIG_DIST),"micro")
288         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/led/* $(TARGETDIR)/lib/modules/$(LINUXVER)
289 endif
290         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/switch/* $(TARGETDIR)/lib/modules/$(LINUXVER)
291 #ifeq ($(CONFIG_MSSID),y)
292 #       cp ../wl/wl/wl_v24.o $(TARGETDIR)/lib/modules/2.4.33-rc1/wl.o
293 #else
294         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wl/* $(TARGETDIR)/lib/modules/$(LINUXVER)
295 ifneq ($(CONFIG_DIST),"micro")
296         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/drivers/net/wireless/* $(TARGETDIR)/lib/modules/$(LINUXVER)
297 endif
298 #endif
299 #       mv $(TARGETDIR)/lib/modules/2.4.33-pre3/kernel/fs/fat/* $(TARGETDIR)/lib/modules/2.4.33-pre3
300 ifneq ($(CONFIG_DIST),"micro")
301         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/jffs2/* $(TARGETDIR)/lib/modules/$(LINUXVER)
302         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/smbfs/* $(TARGETDIR)/lib/modules/$(LINUXVER)
303         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/fs/ext2/* $(TARGETDIR)/lib/modules/$(LINUXVER)
304 endif
305 #       mv $(TARGETDIR)/lib/modules/2.4.33-pre3/kernel/fs/vfat/* $(TARGETDIR)/lib/modules/2.4.33-prc1re3
306 ifneq ($(CONFIG_DIST),"micro")
307 ifneq ($(CONFIG_MSSID),y)
308         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/lib/* $(TARGETDIR)/lib/modules/$(LINUXVER)
309 endif
310 endif
311 ifneq ($(CONFIG_DIST),"micro")
312         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/net/bridge/netfilter/* $(TARGETDIR)/lib/modules/$(LINUXVER)
313 endif
314         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/net/ipv4/netfilter/* $(TARGETDIR)/lib/modules/$(LINUXVER)
315         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/net/ipv4/* $(TARGETDIR)/lib/modules/$(LINUXVER)
316 ifneq ($(CONFIG_DIST),"micro")
317         mv -f $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel/net/ipv6/* $(TARGETDIR)/lib/modules/$(LINUXVER)
318 endif
319         rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/kernel
320         rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/pcmcia
321         rm -rf $(TARGETDIR)/lib/modules/$(LINUXVER)/netfilter
322         mipsel-linux-strip --strip-unneeded --remove-section=.comment $(TARGETDIR)/lib/modules/$(LINUXVER)/*.o         
323         # Prepare filesystem
324         cd $(TARGETDIR) && $(TOP)/misc/rootprep.sh
325         # Make sure mksquashfs-2.0 is used
326 #       $(MAKE) -C $(LINUXDIR)/scripts/squashfs mksquashfs
327         cd $(TARGETDIR)  &&  find . -iname "CVS" | xargs rm -rf
328         cd $(TARGETDIR)  &&  find . -iname ".svn" | xargs rm -rf
329 ifeq ($(CONFIG_KAID),y)
330         cp kaid/kaid $(TARGETDIR)/usr/sbin
331 endif
332         mv $(TARGETDIR)/usr/lib/services.so $(TARGETDIR)/lib
333         cp $(LINUXDIR)/arch/mips/bcm947xx/compressed/piggy mipsel-uclibc/vmlinux
334         ../../opt/loader-0.02/lzma e mipsel-uclibc/vmlinux mipsel-uclibc/vmlinuz
335 #endif
336 #
337 # Configuration rules
338 #
339 fixkc: $(LINUXDIR)/.config
340         cp $(LINUXDIR)/.config /tmp/config.$$$$ ; \
341   if [ "$(CONFIG_IPSEC_TUNNEL)" = "y" ] ; then \
342     sed -e '/^CONFIG_IPSEC_TUNNEL=.*$$/d' \
343                                 -e '/^CONFIG_CRYPTO=.*$$/d' \
344         -e '/^CONFIG_CIPHERS=.*$$/d' \
345         -e '/^CONFIG_DIGESTS=.*$$/d' \
346         -e '/^CONFIG_CIPHER_DES=.*$$/d' \
347         -e '/^CONFIG_CIPHER_3DES=.*$$/d' \
348         -e '/^CONFIG_CIPHER_AES=.*$$/d' \
349         -e '/^CONFIG_DIGEST_MD5=.*$$/d' \
350         -e '/^CONFIG_DIGEST_SHA1=.*$$/d' \
351         /tmp/config.$$$$ > /tmp/config.n.$$$$ ; \
352     mv -f /tmp/config.n.$$$$ /tmp/config.$$$$ ; \
353     echo 'CONFIG_IPSEC_TUNNEL=y' >> /tmp/config.$$$$ ; \
354     echo 'CONFIG_CRYPTO=y' >> /tmp/config.$$$$ ; \
355     echo 'CONFIG_DIGESTS=y' >> /tmp/config.$$$$ ; \
356     echo 'CONFIG_CIPHERS=y' >> /tmp/config.$$$$ ; \
357     if [ "$(CONFIG_IPSEC_TUNNEL_MD5)" = "y" ] ; then \
358       echo 'CONFIG_DIGEST_MD5=y' >> /tmp/config.$$$$ ; \
359     fi ; \
360     if [ "$(CONFIG_IPSEC_TUNNEL_SHA1)" = "y" ] ; then \
361       echo 'CONFIG_DIGEST_SHA1=y' >> /tmp/config.$$$$ ; \
362     fi ; \
363     if [ "$(CONFIG_IPSEC_TUNNEL_DES)" = "y" ] ; then \
364       echo 'CONFIG_CIPHER_DES=y' >> /tmp/config.$$$$ ; \
365     fi ; \
366     if [ "$(CONFIG_IPSEC_TUNNEL_3DES)" = "y" ] ; then \
367       echo 'CONFIG_CIPHER_3DES=y' >> /tmp/config.$$$$ ; \
368     fi ; \
369     if [ "$(CONFIG_IPSEC_TUNNEL_AES)" = "y" ] ; then \
370       echo 'CONFIG_CIPHER_AES=y' >> /tmp/config.$$$$ ; \
371     fi ; \
372   fi && mv /tmp/config.$$$$ $(LINUXDIR)/.config
373
374
375 conf mconf:
376         $(MAKE) -C config
377         @./config/$@ ./config/Config
378         $(MAKE) fixkc
379         # Also configure kernel
380         $(MAKE) k$@
381
382 oldconf: .config
383         $(MAKE) -C config
384         @./config/conf -o ./config/Config
385         $(MAKE) fixkc
386         # Also configure kernel
387         $(MAKE) k$@
388
389 kconf:
390         $(MAKE) -C $(LINUXDIR) config
391
392 kmconf:
393         $(MAKE) -C $(LINUXDIR) menuconfig
394
395 koldconf: $(LINUXDIR)/.config
396         $(MAKE) -C $(LINUXDIR) oldconfig
397
398 # Convenience
399 config: conf
400
401 menuconfig: mconf
402
403 oldconfig: oldconf
404
405 # Default configurations
406 .config:
407         cp config/defconfig $@
408         $(MAKE) oldconfig
409
410 $(LINUXDIR)/.config:
411         cp $(LINUXDIR)/arch/mips/defconfig-bcm947xx $@
412
413 #
414 # Overrides
415 #
416
417
418 matrixssl:
419         $(MAKE) -C matrixssl/src all
420
421 matrixssl-install:
422         echo "nischt"
423 #       install -D matrixssl/src/libmatrixssl.so $(INSTALLDIR)/matrixssl/usr/lib/libmatrixssl.so
424 #       $(STRIP) $(INSTALLDIR)/matrixssl/usr/lib/libmatrixssl.so
425
426 matrixssl-clean:
427         $(MAKE) -C matrixssl/src clean
428
429
430 openssl:
431         $(MAKE) -C openssl
432
433 openssl-install:
434         install -D openssl/libcrypto.so.0.9.8 $(INSTALLDIR)/openssl/usr/lib/libcrypto.so
435         $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libcrypto.so
436         install -D openssl/libssl.so.0.9.8 $(INSTALLDIR)/openssl/usr/lib/libssl.so
437         $(STRIP) $(INSTALLDIR)/openssl/usr/lib/libssl.so
438
439 openssl-clean:
440         $(MAKE) -C openssl clean
441
442 rp-l2tp-install:
443         install -d $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
444         install rp-l2tp/handlers/*.so $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp
445         $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/lib/l2tp/*.so
446         install -D rp-l2tp/handlers/l2tp-control $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
447         $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tp-control
448         install -D rp-l2tp/l2tpd $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
449         $(STRIP) $(INSTALLDIR)/rp-l2tp/usr/sbin/l2tpd
450
451 libpcap:
452         $(MAKE) -C libpcap CC=$(CC) AR=$(AR) RANLIB=$(RANLIB) libpcap.so
453
454 libpcap-install:
455 #       install -d $(INSTALLDIR)/libpcap/usr/lib
456 #       install libpcap/libpcap.so $(INSTALLDIR)/libpcap/usr/lib
457 #       $(STRIP) $(INSTALLDIR)/libpcap/usr/lib/libpcap.so
458
459 eou: libnet libpcap
460         [ ! -d eou ] || $(MAKE) -C eou
461
462 eou-install:
463         [ ! -d eou ] || install -D eou/eou $(INSTALLDIR)/eou/usr/sbin/eou
464         $(STRIP) $(INSTALLDIR)/eou/usr/sbin/eou
465
466 ses:
467         [ ! -f ses/Makefile ] || $(MAKE) -C ses
468
469 ses-install:
470         install -D ses/ses/ses $(INSTALLDIR)/ses/usr/sbin/ses
471         $(STRIP) $(INSTALLDIR)/ses/usr/sbin/ses
472
473 libnet:
474         -mkdir -p libnet/lib
475         $(MAKE) -C libnet CC=$(CC) AR=$(AR) RANLIB=$(RANLIB)
476
477
478 httpd: nvram shared hsiab matrixssl www-install
479         $(MAKE) -C httpd
480
481 httpd-clean:
482         $(MAKE) -C httpd clean
483
484
485 rc: netconf nvram shared hsiab libnet dnsmasq bird dropbear zlib iproute2 dhcpforwarder pppd rflow iptables
486
487 www www-%:
488
489
490 ifeq ($(KROMOGUI),y)
491         $(MAKE) -C kromo/$(WEB_PAGE) $* INSTALLDIR=$(INSTALLDIR)/www
492 else
493         $(MAKE) -C www/$(WEB_PAGE) $* INSTALLDIR=$(INSTALLDIR)/www
494 endif
495
496 www-distclean www-clean:
497 ifeq ($(KROMOGUI),y)
498         $(MAKE) -C kromo/$(WEB_PAGE) clean
499 else
500         $(MAKE) -C www/$(WEB_PAGE) clean
501 endif
502
503
504 bridge:
505         $(MAKE) -C bridge brctl/brctl
506 # bridge:
507 #       $(MAKE) -C bridge brctl/brctl
508
509 bridge-clean:
510         @echo "Cleaning bridge"
511         @if [ -e bridge/libbridge/libbridge.a ]; then\
512                 rm bridge/brctl/*.o bridge/libbridge/*.a bridge/libbridge/*.o;\
513         else echo "Nothing to clean";\
514         fi;
515
516 bridge-install:
517         install -D bridge/brctl/brctl $(INSTALLDIR)/bridge/usr/sbin/brctl
518         $(STRIP) $(INSTALLDIR)/bridge/usr/sbin/brctl
519
520 busybox-config:
521         cd busybox && rm -f Config.h && ln -sf configs/$(CONFIG_BUSYBOX_CONFIG).h Config.h
522
523 busybox: busybox-config rc net-tools
524 ifeq ($(CONFIG_DIST),"micro")
525 #       cp busybox/.config_micro busybox/sysdeps/linux/defconfig
526         cp busybox/.config_micro busybox/.config
527         cd busybox && make oldconfig
528 else
529 ifeq ($(CONFIG_DIST),"mini")
530 #       cp busybox/.config_mini busybox/sysdeps/linux/defconfig
531         cp busybox/.config_mini busybox/.config
532         cd busybox && make oldconfig
533 else
534 #       cp busybox/.config_std busybox/sysdeps/linux/defconfig
535         cp busybox/.config_std busybox/.config
536         cd busybox && make oldconfig
537 endif
538 endif
539        
540         make -C busybox clean
541         rm -f busybox/busybox
542         $(MAKE) -C busybox STRIPTOOL=$(STRIP)
543
544 busybox-install:
545         $(MAKE) -C busybox STRIPTOOL=$(STRIP) PREFIX=$(INSTALLDIR)/busybox install
546
547 busybox-clean: busybox-config
548         $(MAKE) -C busybox clean
549
550 busybox-distclean: busybox-config
551         $(MAKE) -C busybox clean
552         $(MAKE) -C busybox/scripts/config clean
553         rm -f busybox/.depend busybox/include/config.h busybox/scripts/mkdep
554
555 dnsmasq:
556         $(MAKE) -C dnsmasq/contrib/wrt CFLAGS="$(COPTS) -DNEED_PRINTF"
557         $(MAKE) -C dnsmasq COPTS=-DHAVE_BROKEN_RTC CFLAGS="$(COPTS) -DNEED_PRINTF"
558
559 dnsmasq-install:
560         install -D dnsmasq/contrib/wrt/lease_update.sh $(INSTALLDIR)/dnsmasq/etc/lease_update.sh
561         install -D dnsmasq/contrib/wrt/dhcp_release $(INSTALLDIR)/dnsmasq/usr/sbin/dhcp_release
562         install -D dnsmasq/src/dnsmasq $(INSTALLDIR)/dnsmasq/usr/sbin/dnsmasq
563
564 dnsmasq-clean:
565         $(MAKE) -C dnsmasq clean
566         $(MAKE) -C dnsmasq/contrib/wrt clean
567
568
569 iptables:
570         $(MAKE) -C iptables.linksys BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR)
571         $(MAKE) -C iptables DO_MULTI=1 BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR)
572
573 iptables-devel:
574         $(MAKE) -C iptables install-devel KERNEL_DIR=$(LINUXDIR)
575
576
577 iptables-install:
578 ifeq ($(CONFIG_IPTABLES),y)
579 #       install -d $(INSTALLDIR)/iptables/usr/lib/iptables
580 #       install iptables/extensions/*.so $(INSTALLDIR)/iptables/usr/lib/iptables
581 #       $(STRIP) $(INSTALLDIR)/iptables/usr/lib/iptables/*.so
582         install -D iptables/iptables $(INSTALLDIR)/iptables/usr/sbin/iptables
583 #       $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables
584 #       install -D iptables/iptables-restore $(INSTALLDIR)/iptables/usr/sbin/iptables-restore
585 #       $(STRIP) $(INSTALLDIR)/iptables/usr/sbin/iptables-restore
586
587         ifeq ($(CONFIG_L7),y)
588           install -d $(TARGETDIR)/etc/l7-protocols
589           cp -rp l7/* $(TARGETDIR)/etc/l7-protocols/
590         endif
591 else
592         # So that generic rule does not take precedence
593         @true
594 endif
595
596 iptables-clean:
597         -$(MAKE) -C iptables.linksys KERNEL_DIR=$(LINUXDIR) clean
598         -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) clean
599
600 iptables-distclean:
601         -$(MAKE) -C iptables KERNEL_DIR=$(LINUXDIR) distclean
602
603 netconf: iptables
604
605
606 pptpd:
607 ifeq ($(CONFIG_PPTPD),y)
608         $(MAKE) -C pptpd
609 else
610         @true
611 endif
612
613 pptpd-clean:
614         $(MAKE) -C pptpd clean
615
616 pptpd-install:
617 ifeq ($(CONFIG_PPTPD),y)
618         install -D pptpd/pptpd $(INSTALLDIR)/pptpd/usr/sbin/pptpd
619         install -D pptpd/pptpctrl $(INSTALLDIR)/pptpd/usr/sbin/pptpctrl
620         install -D pptpd/bcrelay $(INSTALLDIR)/pptpd/usr/sbin/bcrelay
621         install -D pptpd/config/pptp.webservices $(INSTALLDIR)/pptpd/etc/config/pptp.webservices
622 else
623         # So that generic rule does not take precedence
624         @true
625 endif
626
627 pipsec:
628 ifeq ($(CONFIG_PIPSEC),y)
629         $(MAKE) -C pipsec
630 else
631         @true
632 endif
633
634 pipsec-clean:
635         $(MAKE) -C pipsec clean
636
637 pipsec-install:
638 ifeq ($(CONFIG_PIPSEC),y)
639         install -D pipsec/pipsecd $(INSTALLDIR)/pipsec/usr/sbin/pipsecd
640         $(STRIP) $(INSTALLDIR)/pipsec/usr/sbin/pipsecd
641 else
642         # So that generic rule does not take precedence
643         @true
644 endif
645
646 snmp:
647 ifeq ($(CONFIG_SNMP),y)
648         cd snmp && . ./conf.sh
649         $(MAKE) -C snmp
650 else
651         @true
652 endif
653
654 snmp-clean:
655         $(MAKE) -C snmp clean
656         rm -f $(INSTALLDIR)/etc/snmp
657
658 snmp-install:
659 ifeq ($(CONFIG_SNMP),y)
660         install -D snmp/agent/snmpd $(INSTALLDIR)/snmp/usr/sbin/snmpd
661         install -D snmp/config/snmp.webservices $(INSTALLDIR)/snmp/etc/config/snmp.webservices
662         $(STRIP) $(INSTALLDIR)/snmp/usr/sbin/snmpd
663         ln -sf /tmp/etc/snmp $(TARGETDIR)/etc/snmp
664 else
665         # So that generic rule does not take precedence
666         @true
667 endif
668
669 wol:
670         cd wol && ./configure --disable-nls --host=mipsel-linux CC=$(CC) CFLAGS="$(COPTS)"
671         $(MAKE) -C wol
672
673 wol-clean:
674         $(MAKE) -C wol clean
675
676 wol-install:
677         install -D wol/src/wol $(INSTALLDIR)/wol/usr/sbin/wol
678         $(STRIP) $(INSTALLDIR)/wol/usr/sbin/wol
679
680 dhcpforwarder:
681         cd dhcpforwarder && ./configure --host=$(ARCH)-linux-elf --sysconfdir=/tmp/dhcp-fwd CC=$(ARCH)-linux-uclibc-gcc CFLAGS="-Os -mips32 -mtune=mips32 -funit-at-a-time -pipe -DHAVE_MALLOC=1 -Drpl_malloc=malloc"
682         $(MAKE) -C dhcpforwarder
683
684 dhcpforwarder-install:
685         @true
686 #install -D dhcpforwarder/dhcp-fwd $(INSTALLDIR)/dhcpforwarder/usr/sbin/dhcp-fwd
687 #$(STRIP) $(INSTALLDIR)/dhcpforwarder/usr/sbin/dhcp-fwd
688
689 dhcpforwarder-clean:
690         $(MAKE) -C dhcpforwarder clean
691
692 rtpproxy:
693         $(MAKE) -C rtpproxy
694
695 rtpproxy-install:
696
697         install -D rtpproxy/rtpproxy $(INSTALLDIR)/rtpproxy/usr/bin/rtpproxy
698        
699 rtpproxy-clean:
700         $(MAKE) -C rtpproxy clean
701
702 shat:
703         make -C shat/src
704
705 shat-install:
706         install -D shat/src/shatd $(INSTALLDIR)/shat/usr/sbin/shatd
707         install -D shat/src/shatc $(INSTALLDIR)/shat/usr/sbin/shatc
708         install -D shat/config/shat.webhotspot $(INSTALLDIR)/shat/etc/config/shat.webhotspot
709         install -D shat/config/shat.nvramconfig $(INSTALLDIR)/shat/etc/config/shat.nvramconfig
710         install -D shat/config/shat.startup $(INSTALLDIR)/shat/etc/config/shat.startup
711
712        
713 shat-clean:
714         make -C shat/src clean
715
716 radauth:
717 ifeq ($(CONFIG_CHILLILOCAL),y)
718         install -D chillispot/config/fon.nvramconfig $(INSTALLDIR)/chillispot/etc/config/fon.nvramconfig
719         install -D chillispot/config/fon.webhotspot $(INSTALLDIR)/chillispot/etc/config/fon.webhotspot
720 endif
721         $(MAKE) -C radauth
722
723 radauth-install:
724         install -D radauth/config/wrt-radauth.startup $(INSTALLDIR)/radauth/etc/config/wrt-radauth.startup
725         install -D radauth/wrt-radauth $(INSTALLDIR)/radauth/usr/sbin/wrt-radauth
726 #       install -D radauth/radius-client $(INSTALLDIR)/radauth/usr/sbin/radius-client
727 #       install -D radauth/radiusallow $(INSTALLDIR)/radauth/usr/sbin/radiusallow
728 #       install -D radauth/radiusdisallow $(INSTALLDIR)/radauth/usr/sbin/radiusdisallow
729         install -D radauth/macupd $(INSTALLDIR)/radauth/usr/sbin/macupd
730 ifeq ($(CONFIG_RADLOCAL),y)
731         install -D chillispot/config/iradius.nvramconfig $(INSTALLDIR)/chillispot/etc/config/iradius.nvramconfig
732         install -D chillispot/config/iradius.webhotspot $(INSTALLDIR)/chillispot/etc/config/iradius.webhotspot
733         install -D chillispot/config/iradius.startup $(INSTALLDIR)/chillispot/etc/config/iradius.startup
734 endif
735        
736 radauth-clean:
737         $(MAKE) -C radauth clean
738        
739 samba:
740         $(MAKE) -C samba/source bin/smbmnt
741         $(MAKE) -C samba/source bin/smbmount
742
743 samba-install:
744         install -D samba/source/bin/smbmnt $(INSTALLDIR)/samba/usr/sbin/smbmnt
745         install -D samba/source/bin/smbmount $(INSTALLDIR)/samba/usr/sbin/smbmount
746         install -D samba/smb.conf $(INSTALLDIR)/samba/usr/lib/smb.conf
747         install -D samba/config/sambafs.webconfig $(INSTALLDIR)/samba/etc/config/sambafs.webconfig
748         install -D samba/config/sambafs.startup $(INSTALLDIR)/samba/etc/config/sambafs.startup
749         install -D samba/config/sambafs.nvramconfig $(INSTALLDIR)/samba/etc/config/sambafs.nvramconfig
750
751
752 samba-clean:
753         $(MAKE) -C samba/source clean
754
755 mmc:
756         $(MAKE) -C mmc
757
758 mmc-install:
759         install -D  mmc/mmc.o $(INSTALLDIR)/mmc/lib/modules/$(LINUXVER)/mmc.o
760         install -D  mmc/config/mmc.webconfig $(INSTALLDIR)/mmc/etc/config/mmc.webconfig
761         install -D  mmc/config/mmc.startup $(INSTALLDIR)/mmc/etc/config/mmc.startup
762         install -D  mmc/config/mmc.nvramconfig $(INSTALLDIR)/mmc/etc/config/mmc.nvramconfig
763
764 mmc-clean:
765         $(MAKE) -C mmc clean
766 ser:
767
768         $(MAKE) -C ser modules all ARCH=mipsel CFLAGS="$(COPTS)" extra_defs="-DUSE_PTHREAD_MUTEX "
769
770
771 ser-install:
772 #       $(MAKE) -C ser install ARCH=mipsel CC=mipsel-linux-uclibc-gcc CFLAGS="-Os -pipe -mips32 -mtune=mips32" BASEDIR=$(INSTALLDIR)
773        
774         install -D ser/ser $(INSTALLDIR)/ser/usr/sbin/ser
775         mkdir -p $(INSTALLDIR)/ser/usr/lib/ser/modules
776         mkdir -p $(INSTALLDIR)/ser/etc/config
777         cp -a ser/etc/config/* $(INSTALLDIR)/ser/etc/config/
778         cp -a $(SER_MODULE_FILES) $(INSTALLDIR)/ser/usr/lib/ser/modules/
779         install -D ser/scripts/sc $(INSTALLDIR)/ser/usr/sbin/serctl
780         mkdir -p $(INSTALLDIR)/ser/etc/ser
781         install -D ser/etc/ser.cfg $(INSTALLDIR)/ser/etc/ser/ser.cfg
782         install -D ser/etc/version $(INSTALLDIR)/ser/etc/ser/version
783         install -D ser/etc/subscriber $(INSTALLDIR)/ser/etc/ser/subscriber
784         install -D ser/etc/location $(INSTALLDIR)/ser/etc/ser/location
785         install -D ser/etc/aliases $(INSTALLDIR)/ser/etc/ser/aliases
786         install -D ser/etc/S78sipath $(INSTALLDIR)/ser/etc/init.d/S78sipath
787         install -D ser/etc/ip-up $(INSTALLDIR)/ser/etc/ppp/ip-up
788         mv $(INSTALLDIR)/ser/usr/lib/ser/modules/nathelper.so $(INSTALLDIR)/ser/usr/lib/ser/modules/inner_nathelper.so
789
790
791
792
793 ser-clean:
794         $(MAKE) -C ser clean
795         rm -rf $(INSTALLDIR)/ser/*
796         rm -rf $(INSTALLDIR)/www/*
797                        
798 nocat:
799         cd glib && ./config.sh
800         make -C glib
801         cd nocat && . ./config.sh
802         make -C nocat
803
804 nocat-clean:
805         make -C nocat clean
806        
807
808 nocat-install:
809         install -D nocat/src/splashd $(INSTALLDIR)/nocat/usr/sbin/splashd
810         $(STRIP) $(INSTALLDIR)/nocat/usr/sbin/splashd
811         mkdir -p ${INSTALLDIR}/nocat/etc
812         ln -sf /tmp/etc/nocat.conf $(INSTALLDIR)/nocat/etc/nocat.conf
813         mkdir -p $(INSTALLDIR)/nocat/usr/libexec
814         cp -r nocat/libexec/iptables $(INSTALLDIR)/nocat/usr/libexec/nocat
815 ifeq ($(CONFIG_RAMSKOV),y)
816         install -D nocat/config_redirect/nocat.webhotspot $(INSTALLDIR)/nocat/etc/config/nocat.webhotspot
817         install -D nocat/config_redirect/nocat.nvramconfig $(INSTALLDIR)/nocat/etc/config/nocat.nvramconfig
818         install -D nocat/config_redirect/nocat.startup $(INSTALLDIR)/nocat/etc/config/nocat.startup
819         install -D nocat/config_redirect/nocat.header $(INSTALLDIR)/nocat/etc/config/nocat.header
820         install -D nocat/config_redirect/nocat.footer $(INSTALLDIR)/nocat/etc/config/nocat.footer
821 else
822         install -D nocat/config/nocat.webhotspot $(INSTALLDIR)/nocat/etc/config/nocat.webhotspot
823         install -D nocat/config/nocat.nvramconfig $(INSTALLDIR)/nocat/etc/config/nocat.nvramconfig
824         install -D nocat/config/nocat.startup $(INSTALLDIR)/nocat/etc/config/nocat.startup
825 endif
826 http-redirect:
827         @true
828
829 http-redirect-clean:
830         @true
831
832 http-redirect-install:
833         install -D http-redirect/http-redirect.nvramconfig $(INSTALLDIR)/http-redirect/etc/config/http-redirect.nvramconfig
834         install -D http-redirect/http-redirect.webhotspot $(INSTALLDIR)/http-redirect/etc/config/http-redirect.webhotspot
835         install -D http-redirect/http-redirect.startup $(INSTALLDIR)/http-redirect/etc/config/http-redirect.startup
836
837
838 smtp-redirect:
839         @true
840
841 smtp-redirect-clean:
842         @true
843
844 smtp-redirect-install:
845         install -D smtp-redirect/smtp-redirect.nvramconfig $(INSTALLDIR)/smtp-redirect/etc/config/smtp-redirect.nvramconfig
846         install -D smtp-redirect/smtp-redirect.webhotspot $(INSTALLDIR)/smtp-redirect/etc/config/smtp-redirect.webhotspot
847         install -D smtp-redirect/smtp-redirect.startup $(INSTALLDIR)/smtp-redirect/etc/config/smtp-redirect.startup
848
849                
850 chillispot:
851         cd chillispot && ./configure --host=$(ARCH)-linux-elf CFLAGS="$(COPTS) -DHAVE_MALLOC=1 -Drpl_malloc=malloc"
852         $(MAKE) -C chillispot
853
854 chillispot-install:
855 ifneq ($(CONFIG_FON),y)
856         install -D chillispot/config/chillispot.nvramconfig $(INSTALLDIR)/chillispot/etc/config/chillispot.nvramconfig
857         install -D chillispot/config/chillispot.webhotspot $(INSTALLDIR)/chillispot/etc/config/chillispot.webhotspot
858 endif
859 ifeq ($(CONFIG_CHILLILOCAL),y)
860         install -D chillispot/config/fon.nvramconfig $(INSTALLDIR)/chillispot/etc/config/fon.nvramconfig
861         install -D chillispot/config/fon.webhotspot $(INSTALLDIR)/chillispot/etc/config/fon.webhotspot
862 endif
863         install -D chillispot/src/chilli $(INSTALLDIR)/chillispot/usr/sbin/chilli
864         $(STRIP) $(INSTALLDIR)/chillispot/usr/sbin/chilli
865
866 chillispot-clean:
867         $(MAKE) -C chillispot clean
868
869 frottle:
870 ifeq ($(CONFIG_FROTTLE),y)
871         $(MAKE) -C frottle
872 else
873         @true
874 endif
875
876 frottle-clean:
877         $(MAKE) -C frottle clean
878
879 frottle-install:
880 ifeq ($(CONFIG_FROTTLE),y)
881         install -D frottle/frottle $(INSTALLDIR)/frottle/usr/sbin/frottle
882         $(STRIP) $(INSTALLDIR)/frottle/usr/sbin/frottle
883 else
884         # So that generic rule does not take precedence
885         @true
886 endif
887
888
889 e2fsprogs:
890         cd e2fsprogs && ./configure --host=mipsel-linux CFLAGS="-Os" CC="$(CROSS_COMPILE)gcc $(COPTS)" --with-gnu-ld --disable-rpath --disable-shared --enable-static --enable-elf-shlibs --enable-dynamic-e2fsck
891         make -C e2fsprogs
892
893 e2fsprogs-install:
894         mkdir -p $(INSTALLDIR)/e2fsprogs/sbin
895         cp e2fsprogs/misc/mke2fs.static $(INSTALLDIR)/e2fsprogs/sbin/mke2fs
896
897
898 ebtables:
899         $(MAKE) -C ebtables static BINDIR=/usr/sbin LIBDIR=/usr/lib KERNEL_DIR=$(LINUXDIR) KERNEL_INCLUDES=$(LINUXDIR)/include
900
901 ebtables-install:
902 ifeq ($(CONFIG_EBTABLES),y)
903         install -D ebtables/ebtables $(INSTALLDIR)/ebtables/usr/sbin/ebtables
904 #       install -d $(INSTALLDIR)/ebtables/usr/lib
905 #       install ebtables/extensions/*.so $(INSTALLDIR)/ebtables/usr/lib/
906 #       install ebtables/*.so $(INSTALLDIR)/ebtables/usr/lib/
907 #       $(STRIP) $(INSTALLDIR)/ebtables/usr/sbin/ebtables
908 else
909         # So that generic rule does not take precedence
910         @true
911 endif
912
913 ebtables-clean:
914         -$(MAKE) -C ebtables KERNEL_DIR=$(LINUXDIR) clean
915
916
917 ntpclient-install:
918         install -D ntpclient/ntpclient $(INSTALLDIR)/ntpclient/usr/sbin/ntpclient
919         $(STRIP) $(INSTALLDIR)/ntpclient/usr/sbin/ntpclient
920
921 # AhMan March 19 2005
922 pppoe pppoe-%:
923         $(MAKE) -C ppp/pppoecd $* INSTALLDIR=$(INSTALLDIR)/pppoe
924
925 ppp:
926         $(MAKE) -C rp-pppoe-3.5/src
927 ppp-clean:
928         $(MAKE) -C rp-pppoe-3.5/src clean
929
930 ppp-install:
931         install -D rp-pppoe-3.5/src/pppoe $(INSTALLDIR)/ppp/usr/sbin/pppoe
932 #       $(STRIP) $(INSTALLDIR)/ppp/usr/sbin/pppoe
933 ifeq ($(CONFIG_PPPOERELAY),y)
934         install -D rp-pppoe-3.5/src/pppoe-relay $(INSTALLDIR)/ppp/usr/sbin/pppoe-relay
935         install -D rp-pppoe-3.5/config/pppoe-relay.nvramconfig $(INSTALLDIR)/ppp/etc/config/pppoe-relay.nvramconfig
936         install -D rp-pppoe-3.5/config/pppoe-relay.webservices $(INSTALLDIR)/ppp/etc/config/pppoe-relay.webservices
937         install -D rp-pppoe-3.5/config/pppoe-relay.startup $(INSTALLDIR)/ppp/etc/config/pppoe-relay.startup
938 #       $(STRIP) $(INSTALLDIR)/ppp/usr/sbin/pppoe-relay
939 else
940         rm -f $(INSTALLDIR)/ppp/usr/sbin/pppoe-relay
941 endif
942         install -D rp-pppoe-3.5/config/rppppoe.startup $(INSTALLDIR)/ppp/etc/config/rppppoe.startup
943         install -D rp-pppoe-3.5/config/rppppoe.nvramconfig $(INSTALLDIR)/ppp/etc/config/rppppoe.nvramconfig
944
945 ifeq ($(CONFIG_PPPOESERVER),y)
946         install -D rp-pppoe-3.5/src/pppoe-server $(INSTALLDIR)/ppp/usr/sbin/pppoe-server
947         $(STRIP) $(INSTALLDIR)/ppp/usr/sbin/pppoe-server
948 else
949         rm -f $(INSTALLDIR)/ppp/usr/sbin/pppoe-server
950 endif
951 ifeq ($(CONFIG_PPPOESNIFF),y)
952         install -D rp-pppoe-3.5/src/pppoe-sniff $(INSTALLDIR)/ppp/usr/sbin/pppoe-sniff
953         $(STRIP) $(INSTALLDIR)/ppp/usr/sbin/pppoe-sniff
954 else
955         rm -f $(INSTALLDIR)/ppp/usr/sbin/pppoe-sniff
956 endif
957
958 udhcpd-clean:
959         make -C udhcpc clean
960         make -C udhcpd clean
961        
962 udhcpd: shared nvram
963         make -C udhcpc
964         make -C udhcpd
965
966 udhcpd-install:
967         install -D udhcpd/udhcpd $(INSTALLDIR)/udhcpd/usr/sbin/udhcpd
968         install -D udhcpd/dumpleases $(INSTALLDIR)/udhcpd/usr/sbin/dumpleases
969         install -D udhcpd/config/dhcpd.webservices $(INSTALLDIR)/udhcpd/etc/config/dhcpd.webservices
970         install -D udhcpd/config/dhcpd.startup $(INSTALLDIR)/udhcpd/etc/config/dhcpd.startup
971         $(STRIP) $(INSTALLDIR)/udhcpd/usr/sbin/udhcpd
972         $(STRIP) $(INSTALLDIR)/udhcpd/usr/sbin/dumpleases
973         install -D udhcpc/udhcpc $(INSTALLDIR)/udhcpd/usr/sbin/udhcpc
974 #       cd $(INSTALLDIR)/udhcpd/usr/sbin && ln -sf udhcpd udhcpc
975
976 upnp: netconf nvram shared
977
978 upnp-distclean: upnp-clean
979         rm -f $(SRCBASE)/tools/upnp/upnp/linux/libupnp.a
980
981 wlconf: nvram shared
982
983 vlan:
984         $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) STRIPTOOL=$(STRIP)
985
986 vlan-install:
987         $(MAKE) -C vlan CROSS=$(CROSS_COMPILE) STRIPTOOL=$(STRIP) INSTALLDIR=$(INSTALLDIR) install
988
989 vlan-clean:
990         $(MAKE) -C vlan clean
991
992 vlan-distclean: vlan-clean
993         rm -f vlan/vconfig
994
995 nas nas-clean nas-distclean:
996         # So that generic rule does not take precedence
997         @true
998
999 nas-install:
1000 ifeq ($(CONFIG_MSSID),y)
1001         install -D nas/nas $(INSTALLDIR)/nas/usr/sbin/nas
1002 else
1003         install -D nas/nas.v23 $(INSTALLDIR)/nas/usr/sbin/nas
1004 endif
1005         $(STRIP) $(INSTALLDIR)/nas/usr/sbin/nas
1006         cd $(INSTALLDIR)/nas/usr/sbin && ln -sf nas nas4not && ln -sf nas nas4wds
1007
1008 ########################################################################
1009 # Below is added by CT
1010
1011 tftpd tftpd-clean tftpd-distclean:
1012         # So that generic rule does not take precedence
1013         @true
1014
1015 tftpd-install:
1016         install -D tftpd/tftpd $(INSTALLDIR)/tftpd/usr/sbin/tftpd
1017         $(STRIP) $(INSTALLDIR)/tftpd/usr/sbin/tftpd
1018
1019 cron-install:
1020         #install -d $(INSTALLDIR)/cron/etc/cron.d
1021         install -D cron/cron $(INSTALLDIR)/cron/usr/sbin/cron
1022         $(STRIP) $(INSTALLDIR)/cron/usr/sbin/cron
1023
1024 pptp-client:
1025         $(MAKE) -C pptp-client
1026
1027 pptp-client-clean:
1028         $(MAKE) -C pptp-client clean
1029
1030 pptp-client-install:
1031 ifneq ($(CONFIG_NEWMEDIA),y)
1032         install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1033         install -D pptp-client/config/pptpd_client.ip-up $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.ip-up
1034         install -D pptp-client/config/pptpd_client.ip-down $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.ip-down
1035         install -D pptp-client/config/pptpd_client.nvramconfig $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.nvramconfig
1036         install -D pptp-client/config/pptpd_client.webservices $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.webservices
1037         install -D pptp-client/config/pptpd_client.options $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.options
1038         install -D pptp-client/config/pptpd_client.sh $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.sh
1039         install -D pptp-client/config/pptpd_client.startup $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.startup
1040         install -D pptp-client/config/pptpd_client.vpn $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.vpn
1041         install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1042 else
1043         install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1044         install -D pptp-client/config2/pptpd_client.ip-up $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.ip-up
1045         install -D pptp-client/config2/pptpd_client.ip-down $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.ip-down
1046         install -D pptp-client/config2/pptpd_client.nvramconfig $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.nvramconfig
1047         install -D pptp-client/config2/pptpd_client.webconfig $(INSTALLDIR)/pptp-client/etc/config/1pptpd_client.webconfig
1048         install -D pptp-client/config2/pptpd_client.options $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.options
1049         install -D pptp-client/config2/pptpd_client.sh $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.sh
1050         install -D pptp-client/config2/pptpd_client.wanup $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.wanup
1051         install -D pptp-client/config2/pptpd_client.vpn $(INSTALLDIR)/pptp-client/etc/config/pptpd_client.vpn
1052         install -D pptp-client/pptp $(INSTALLDIR)/pptp-client/usr/sbin/pptp
1053 endif
1054
1055 netstatnat:
1056         $(MAKE) -C netstatnat
1057
1058 netstatnat-clean:
1059         $(MAKE) -C netstatnat clean
1060
1061 netstatnat-install:
1062         install -D netstatnat/netstat-nat $(INSTALLDIR)/netstatnat/usr/sbin/netstat-nat
1063         $(STRIP) $(INSTALLDIR)/netstatnat/usr/sbin/netstat-nat
1064
1065 pppd-symlinks:
1066         - (cd pppd.new ; \
1067         ln -s linux/Makefile.top Makefile ; \
1068         ln -s Makefile.linux pppd/Makefile ; \
1069         ln -s Makefile.linux chat/Makefile ; \
1070         ln -s Makefile.linux pppd/plugins/Makefile ; \
1071         ln -s Makefile.linux pppd/plugins/radius/Makefile ; \
1072         ln -s Makefile.linux pppd/plugins/rp-pppoe/Makefile ; \
1073         ln -s Makefile.linux pppd/plugins/pppoatm/Makefile ; \
1074         ln -s Makefile.linux pppdump/Makefile ; \
1075         ln -s Makefile.linux pppstats/Makefile ; \
1076         )
1077
1078 pppd: pppd-symlinks
1079         $(MAKE) -C pppd.new/pppd
1080 ifeq ($(CONFIG_PPPSTATS),y)
1081         $(MAKE) -C pppd.new/pppstats
1082 endif
1083 ifeq ($(CONFIG_RADIUSPLUGIN),y)
1084         $(MAKE) -C pppd.new/pppd/plugins/radius
1085 endif
1086 #       $(MAKE) -C pppd.new/pppd/plugins/pppoatm
1087
1088
1089 pppd-clean pppd-distclean: pppd-symlinks
1090         $(MAKE) -C pppd.new/pppd clean
1091
1092 pppd-install:
1093         install -D pppd.new/pppd/pppd $(INSTALLDIR)/pppd/usr/sbin/pppd
1094 ifeq ($(CONFIG_PPPSTATS),y)
1095         install -D pppd.new/pppstats/pppstats $(INSTALLDIR)/pppd/usr/sbin/pppstats
1096 else
1097         rm -rf $(INSTALLDIR)/pppd/usr/sbin/pppstats
1098 endif
1099 ifeq ($(CONFIG_RADIUSPLUGIN),y)
1100         install -D pppd.new/pppd/plugins/radius/radius.so $(INSTALLDIR)/pppd/usr/lib/pppd/radius.so
1101         install -D pppd.new/pppd/plugins/radius/radattr.so $(INSTALLDIR)/pppd/usr/lib/pppd/radattr.so
1102         install -D pppd.new/pppd/plugins/radius/radrealms.so $(INSTALLDIR)/pppd/usr/lib/pppd/radrealms.so
1103         install -d $(INSTALLDIR)/pppd/etc/radiusclient
1104         cp pppd.new/pppd/plugins/radius/radiusclient/etc/issue $(INSTALLDIR)/pppd/etc/radiusclient/issue
1105         cp pppd.new/pppd/plugins/radius/radiusclient/etc/port-id-map $(INSTALLDIR)/pppd/etc/radiusclient/port-id-map
1106         cp pppd.new/pppd/plugins/radius/radiusclient/etc/dictionary $(INSTALLDIR)/pppd/etc/radiusclient/dictionary
1107         cp pppd.new/pppd/plugins/radius/radiusclient/etc/dictionary.microsoft $(INSTALLDIR)/pppd/etc/radiusclient/dictionary.microsoft
1108         chmod 0644 $(INSTALLDIR)/pppd/etc/radiusclient/*
1109 else
1110         rm -rf $(INSTALLDIR)/pppd/usr/lib/pppd/rad*.so
1111         rm -rf $(INSTALLDIR)/pppd/etc/radiusclient
1112 endif
1113         rm -rf $(INSTALLDIR)/pppd/usr/lib/pppd/rp-pppoe.so
1114
1115 #       $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppd
1116 ifeq ($(CONFIG_PPPSTATS),y)
1117         $(STRIP) $(INSTALLDIR)/pppd/usr/sbin/pppstats
1118 endif
1119
1120 # ipupdate-install:
1121 # #     @true
1122 #       install -D ipupdate/ez-ipupdate $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1123 #       $(STRIP) $(INSTALLDIR)/ipupdate/usr/sbin/ez-ipupdate
1124
1125 inadyn:
1126         $(MAKE) -C inadyn
1127
1128 inadyn-install:
1129         install -D inadyn/bin/linux/inadyn $(INSTALLDIR)/inadyn/usr/sbin/inadyn
1130         $(STRIP) $(INSTALLDIR)/inadyn/usr/sbin/inadyn
1131
1132 inadyn-clean:
1133         $(MAKE) -C inadyn clean
1134
1135 zebra:
1136 ifeq ($(CONFIG_ZEBRA),y)
1137         $(MAKE) -C quagga CC=$(CC)
1138 endif
1139
1140 zebra-install:
1141 ifeq ($(CONFIG_ZEBRA),y)
1142         install -D quagga/zebra/zebra $(INSTALLDIR)/zebra/usr/sbin/zebra
1143         install -D quagga/ripd/ripd $(INSTALLDIR)/zebra/usr/sbin/ripd
1144         install -D quagga/ospfd/ospfd $(INSTALLDIR)/zebra/usr/sbin/ospfd
1145         $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/zebra
1146         $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ripd
1147         $(STRIP) $(INSTALLDIR)/zebra/usr/sbin/ospfd
1148 else
1149         rm -rf $(INSTALLDIR)/zebra/usr/sbin/zebra
1150         rm -rf $(INSTALLDIR)/zebra/usr/sbin/ripd
1151         rm -rf $(INSTALLDIR)/zebra/usr/sbin/ospfd
1152 endif
1153
1154 bird-symlinks:
1155         $(MAKE) -C bird/obj .dir-stamp
1156         mkdir -p bird/obj/conf bird/obj/lib
1157         - (cd bird/obj/conf ; \
1158         ln -s ../../conf/cf-lex.l cf-lex.l ; \
1159         ln -s ../../conf/conf.c conf.c ; \
1160         ln -s ../../conf/conf.h conf.h ; \
1161         ln -s ../../sysdep/unix/config.Y config.Y ; \
1162         ln -s ../../sysdep/unix/krt.Y krt.Y ; \
1163         ln -s ../../sysdep/linux/netlink/netlink.Y netlink.Y ; \
1164         )
1165         - (cd bird/obj/lib ; \
1166         ln -s ../../lib/birdlib.h birdlib.h ; \
1167         ln -s ../../lib/bitops.c bitops.c ; \
1168         ln -s ../../lib/bitops.h bitops.h ; \
1169         ln -s ../../lib/checksum.c checksum.c ; \
1170         ln -s ../../lib/checksum.h checksum.h ; \
1171         ln -s ../../sysdep/unix/endian.h endian.h ; \
1172         ln -s ../../lib/event.c event.c ; \
1173         ln -s ../../lib/event.h event.h ; \
1174         ln -s ../../sysdep/unix/io.c io.c ; \
1175         ln -s ../../lib/ip.c ip.c ; \
1176         ln -s ../../lib/ip.h ip.h ; \
1177         ln -s ../../lib/ipv4.c ipv4.c ; \
1178         ln -s ../../lib/ipv4.h ipv4.h ; \
1179         ln -s ../../sysdep/unix/krt.c krt.c ; \
1180         ln -s ../../sysdep/unix/krt.h krt.h ; \
1181         ln -s ../../sysdep/linux/netlink/krt-iface.h krt-iface.h ; \
1182         ln -s ../../sysdep/linux/netlink/krt-scan.h krt-scan.h ; \
1183         ln -s ../../sysdep/linux/netlink/krt-set.h krt-set.h ; \
1184         ln -s ../../lib/lists.c lists.c ; \
1185         ln -s ../../lib/lists.h lists.h ; \
1186         ln -s ../../sysdep/unix/log.c log.c ; \
1187         ln -s ../../sysdep/unix/main.c main.c ; \
1188         ln -s ../../lib/md5.c md5.c ; \
1189         ln -s ../../lib/md5.h md5.h ; \
1190         ln -s ../../lib/mempool.c mempool.c ; \
1191         ln -s ../../sysdep/linux/netlink/netlink.c netlink.c ; \
1192         ln -s ../../lib/patmatch.c patmatch.c ; \
1193         ln -s ../../lib/printf.c printf.c ; \
1194         ln -s ../../sysdep/unix/random.c random.c ; \
1195         ln -s ../../lib/resource.c resource.c ; \
1196         ln -s ../../lib/resource.h resource.h ; \
1197         ln -s ../../lib/slab.c slab.c ; \
1198         ln -s ../../lib/slists.c slists.c ; \
1199         ln -s ../../lib/slists.h slists.h ; \
1200         ln -s ../../lib/socket.h socket.h ; \
1201         ln -s ../../lib/string.h string.h ; \
1202         ln -s ../../sysdep/linux/sysio.h sysio.h ; \
1203         ln -s ../../sysdep/unix/timer.h timer.h ; \
1204         ln -s ../../lib/unaligned.h unaligned.h ; \
1205         ln -s ../../sysdep/unix/unix.h unix.h ; \
1206         ln -s ../../lib/xmalloc.c xmalloc.c ; \
1207         )
1208
1209 bird: bird-symlinks
1210         $(MAKE) -C bird
1211
1212 bird-install:
1213         @true
1214 #       install -D bird/bird $(INSTALLDIR)/bird/usr/sbin/bird
1215 #       $(STRIP) $(INSTALLDIR)/bird/usr/sbin/bird
1216
1217 bird-clean:
1218         $(MAKE) -C bird clean
1219
1220 bird-distclean:
1221         $(MAKE) -C bird clean
1222         rm -rf bird/obj/nest bird/obj/filter bird/obj/proto
1223         rm -f bird/obj/.dir-stamp
1224
1225 shorewall-install:
1226         install -D shorewall/common.def     $(INSTALLDIR)/shorewall/usr/sbin/common.def
1227         install -D shorewall/firewall       $(INSTALLDIR)/shorewall/usr/sbin/firewall
1228         install -D shorewall/functions      $(INSTALLDIR)/shorewall/usr/sbin/functions
1229         install -D shorewall/shorewall      $(INSTALLDIR)/shorewall/usr/sbin/shorewall
1230         install -D shorewall/shorewall.conf $(INSTALLDIR)/shorewall/usr/sbin/shorewall.conf
1231         install -D shorewall/version        $(INSTALLDIR)/shorewall/usr/sbin/version
1232
1233 shorewall-clean:
1234         $(MAKE) -C shorewall clean
1235
1236
1237 bpalogin-install:
1238         install -D bpalogin/bpalogin $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1239         $(STRIP) $(INSTALLDIR)/bpalogin/usr/sbin/bpalogin
1240
1241 dropbear: zlib
1242         cd dropbear && ./configure --host=$(ARCH)-linux --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx --disable-libutil CC=$(ARCH)-linux-uclibc-gcc CFLAGS="-I../zlib $(COPTS) -L../zlib" LDFLAGS="-L../zlib" host_alias=$(ARCH)-linux
1243         $(MAKE) -C dropbear PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" SCPPROGRESS=1 MULTI=1
1244
1245 dropbear-install:
1246         install -D dropbear/config/sshd.webservices $(INSTALLDIR)/dropbear/etc/config/sshd.webservices
1247 #       install -D dropbear/dropbearmulti $(INSTALLDIR)/dropbear/usr/sbin/dropbear
1248 #       $(STRIP) $(INSTALLDIR)/dropbear/usr/sbin/dropbear
1249 #       cd $(INSTALLDIR)/dropbear/usr/sbin && ln -sf dropbear dropbearconvert && ln -sf dropbear dropbearkey && ln -sf dropbear dbclient
1250 #       mkdir -p $(INSTALLDIR)/dropbear/usr/bin
1251 #       cd $(INSTALLDIR)/dropbear/usr/bin && ln -sf /usr/sbin/dropbear ssh && ln -sf /usr/sbin/dropbear scp
1252
1253 iproute2:
1254         $(MAKE) -C iproute2 all
1255
1256 iproute2-install:
1257         chmod 0644 iproute2/tc/tc
1258         install -D iproute2/tc/tc $(INSTALLDIR)/iproute2/usr/sbin/tc
1259 #       $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/tc
1260         chmod 0644 iproute2/ip/ip
1261         install -D iproute2/ip/ip $(INSTALLDIR)/iproute2/usr/sbin/ip
1262 #       $(STRIP) $(INSTALLDIR)/iproute2/usr/sbin/ip
1263 ifeq ($(CONFIG_WSHAPER),y)
1264         chmod 0644 iproute2/wshaper.htb
1265         install -D iproute2/wshaper.htb $(INSTALLDIR)/iproute2/usr/sbin/wshaper
1266 else
1267         @true
1268 endif
1269
1270 ifeq ($(CONFIG_SVQOS),y)
1271         chmod 0644 iproute2/svqos.htb
1272         install -D iproute2/svqos.htb $(INSTALLDIR)/iproute2/usr/sbin/svqos
1273         chmod 0644 iproute2/svqos.hfsc
1274         install -D iproute2/svqos.hfsc $(INSTALLDIR)/iproute2/usr/sbin/svqos2
1275 else
1276         @true
1277 endif
1278
1279 adm6996:
1280 ifeq ($(CONFIG_MSSID),y)
1281         $(MAKE) -C adm6996.v24
1282 else
1283         $(MAKE) -C adm6996
1284 endif
1285
1286 adm6996-install:
1287 ifeq ($(CONFIG_MSSID),y)
1288         install -D adm6996.v24/adm6996.o $(INSTALLDIR)/adm6996/lib/modules/$(LINUXVER)/kernel/drivers/net/adm6996/adm6996.o
1289 else
1290         install -D adm6996/adm6996.o $(INSTALLDIR)/adm6996/lib/modules/$(LINUXVER)/kernel/drivers/net/adm6996/adm6996.o
1291 endif
1292 #       $(STRIP) $(INSTALLDIR)/adm6996/lib/adm6996.o
1293
1294 igmp-proxy-clean:
1295         make -C igmp-proxy clean
1296
1297 igmp-proxy:
1298         make -C igmp-proxy
1299
1300 igmp-proxy-install:
1301         install -D igmp-proxy/igmprt $(INSTALLDIR)/igmp-proxy/usr/sbin/igmprt
1302
1303
1304
1305 parprouted:
1306 ifeq ($(CONFIG_PARPROUTED),y)
1307         $(MAKE) -C parprouted
1308 else
1309         @true
1310 endif
1311
1312 parprouted-clean:
1313         $(MAKE) -C parprouted clean
1314
1315 parprouted-install:
1316 ifeq ($(CONFIG_PARPROUTED),y)
1317         install -D parprouted/parprouted $(INSTALLDIR)/parprouted/usr/sbin/parprouted
1318         $(STRIP) $(INSTALLDIR)/parprouted/usr/sbin/parprouted
1319 else
1320         # So that generic rule does not take precedence
1321         @true
1322 endif
1323
1324 wpa_supplicant:
1325 ifeq ($(CONFIG_WPA_SUPPLICANT),y)
1326 #       rm -f openssl/*.so
1327         $(MAKE) -C wpa_supplicant
1328 else
1329         @true
1330 endif
1331
1332 wpa_supplicant-clean:
1333         $(MAKE) -C wpa_supplicant clean
1334
1335 wpa_supplicant-install:
1336 ifeq ($(CONFIG_WPA_SUPPLICANT),y)
1337         install -D wpa_supplicant/wpa_supplicant $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_supplicant
1338         install -D wpa_supplicant/wpa_passphrase $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_passphrase
1339         install -D wpa_supplicant/wpa_cli $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_cli
1340         $(STRIP) $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_supplicant
1341         $(STRIP) $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_passphrase
1342         $(STRIP) $(INSTALLDIR)/wpa_supplicant/usr/sbin/wpa_cli
1343 else
1344         # So that generic rule does not take precedence
1345         @true
1346 endif
1347
1348 madwifi:
1349         cd $(HAL)/linux && make TARGET=mips-le-elf clean \
1350         &&  make TARGET=mips-le-elf \
1351         && make TARGET=mips-le-elf release)
1352        
1353         make -C madwifi/madwifi KERNELPATH=$(LINUXDIR) TARGET=mips-le-elf ATH_RATE=ath_rate/sample
1354
1355 madwifi-clean:
1356         make -C madwifi/madwifi clean KERNELPATH=$(LINUXDIR) TARGET=mips-le-elf ATH_RATE=ath_rate/sample
1357
1358 madwifi-install:
1359         make -C madwifi/madwifi/tools BINDIR=$(INSTALLDIR)/madwifi/bin install
1360
1361 #       mkdir -p $(INSTALLDIR)/madwifi/lib/modules/2.4.33-pre2
1362 #       cp -fpR ./madwifi-ng/net80211/wlan*.o \
1363 #               ./madwifi-ng/openhal/ath_hal.o \
1364 #               ./madwifi-ng/ath_rate/sample/ath_rate_sample.o \
1365 #               ./madwifi-ng/ath/ath_pci.o \
1366 #               $(INSTALLDIR)/madwifi/lib/modules/2.4.33-pre2/
1367 #       mkdir -p $(INSTALLDIR)/madwifi/usr/sbin
1368 #       cp -fpR madwifi-ng/tools/athstats \
1369 #               madwifi-ng/tools/athdebug \
1370 #               madwifi-ng/tools/80211stats \
1371 #               madwifi-ng/tools/80211debug \
1372 #               madwifi-ng/tools/athctrl \
1373 #               madwifi-ng/tools/athkey \
1374 #               madwifi-ng/tools/wlanconfig \
1375 #               $(INSTALLDIR)/madwifi/usr/sbin
1376
1377
1378 sputnik:
1379         @true
1380
1381 sputnik-clean:
1382         @true
1383
1384 sputnik-install:
1385         mkdir -p $(INSTALLDIR)/sputnik/etc/config
1386         cp -fpR sputnik/config/* $(INSTALLDIR)/sputnik/etc/config
1387 #       mkdir -p $(INSTALLDIR)/sputnik/www/images
1388 #       cp -fpR sputnik/images/* $(INSTALLDIR)/sputnik/www/images
1389         install -D sputnik/$(ARCH)/sputnik $(INSTALLDIR)/sputnik/usr/sbin/sputnik
1390         install -D sputnik/$(ARCH)/libiksemel.so $(INSTALLDIR)/sputnik/usr/lib/libiksemel.so
1391
1392 openvpn:
1393         cd lzo && ./configure --host=$(ARCH)-linux CFLAGS="$(COPTS)"
1394         make -C lzo clean
1395         make -C lzo
1396         make -C openssl
1397         rm -f openssl/*.so*
1398 ifeq ($(CONFIG_NEWMEDIA),y)
1399         cd openvpn && ./configure --host=$(ARCH)-linux CPPFLAGS="-I../lzo/include -I../openssl/include -L../lzo -L../openssl -L../lzo/src/.libs" --enable-static --disable-shared --disable-pthread --disable-plugins --disable-debug --enable-password-save --enable-management --disable-socks --enable-lzo --enable-small --enable-server --disable-http CFLAGS="$(COPTS)" LDFLAGS="-L../openssl -L../lzo -L../lzo/src/.libs"
1400         make -C openvpn clean
1401 else
1402         cd openvpn && ./configure --host=$(ARCH)-linux CPPFLAGS="-I../lzo/include -I../openssl/include -L../lzo -L../openssl -L../lzo/src/.libs" --enable-static --disable-shared --disable-pthread --disable-plugins --disable-debug --disable-management --disable-socks --enable-lzo --enable-small --enable-server --enable-http --enable-password-save CFLAGS="$(COPTS)" LDFLAGS="-L../openssl -L../lzo -L../lzo/src/.libs"
1403         make -C openvpn clean
1404 endif
1405         make -C openvpn
1406
1407 openvpn-install:
1408         install -D openvpn/openvpn $(INSTALLDIR)/openvpn/usr/sbin/openvpn
1409 ifneq ($(CONFIG_NEWMEDIA),y)   
1410         install -D openvpn/config/openvpn.nvramconfig $(INSTALLDIR)/openvpn/etc/config/openvpn.nvramconfig
1411         install -D openvpn/config/openvpn.webservices $(INSTALLDIR)/openvpn/etc/config/openvpn.webservices
1412 else
1413         install -D openvpn/config2/openvpn.nvramconfig $(INSTALLDIR)/openvpn/etc/config/openvpn.nvramconfig
1414         install -D openvpn/config2/openvpn.webservices $(INSTALLDIR)/openvpn/etc/config/openvpn.webservices
1415 endif
1416
1417 net-tools:
1418         make -C net-tools
1419         make -C net-tools arp
1420
1421 net-tools-install:
1422         @true
1423 #       install -D net-tools/ifconfig $(INSTALLDIR)/net-tools/sbin/ifconfig
1424 #       install -D net-tools/arp $(INSTALLDIR)/net-tools/sbin/arp
1425
1426 wireless-tools-clean:
1427         make -C wireless-tools clean
1428
1429 wireless-tools:
1430         make -C wireless-tools CC=$(CC) CFLAGS="$(COPTS)" all iwmulticall
1431
1432 wireless-tools-install:
1433         mkdir -p $(INSTALLDIR)/wireless-tools
1434         make -C wireless-tools PREFIX="$(INSTALLDIR)/wireless-tools" INSTALL_DIR="$(INSTALLDIR)/wireless-tools/usr/sbin" INSTALL_LIB="$(INSTALLDIR)/usr/lib" install install-iwmulticall
1435         rm -rf $(INSTALLDIR)/wireless-tools/man
1436         rm -rf $(INSTALLDIR)/wireless-tools/include
1437
1438 olsrd-clean:
1439         make -C olsrd OS=linux clean
1440
1441 olsrd:
1442         make -C olsrd OS=linux
1443         make -C olsrd OS=linux libs
1444
1445 olsrd-install:
1446         install -D olsrd/olsrd $(INSTALLDIR)/olsrd/usr/sbin/olsrd
1447         install -D olsrd/lib/dyn_gw/olsrd_dyn_gw.so.0.4 $(INSTALLDIR)/olsrd/usr/lib/olsrd_dyn_gw.so
1448         install -D olsrd/lib/httpinfo/olsrd_httpinfo.so.0.1 $(INSTALLDIR)/olsrd/usr/lib/olsrd_httpinfo.so
1449
1450
1451 rflow-install:
1452         install -D rflow/config/rflow.nvramconfig $(INSTALLDIR)/rflow/etc/config/rflow.nvramconfig
1453         install -D rflow/config/rflow.webservices $(INSTALLDIR)/rflow/etc/config/rflow.webservices
1454         install -D rflow/config/rflow.startup $(INSTALLDIR)/rflow/etc/config/rflow.startup
1455         install -D rflow/config/macupd.startup $(INSTALLDIR)/rflow/etc/config/macupd.startup
1456         install -D rflow/config/macupd.nvramconfig $(INSTALLDIR)/rflow/etc/config/macupd.nvramconfig   
1457
1458 #
1459 # Generic rules
1460 #
1461
1462 %:
1463         [ ! -d $* ] || $(MAKE) -C $*
1464
1465 %-distclean:
1466         [ ! -d $* ] || $(MAKE) -C $* clean
1467
1468 %-clean:
1469         [ ! -d $* ] || $(MAKE) -C $* clean
1470
1471 %-install:
1472         [ ! -d $* ] || $(MAKE) -C $* install INSTALLDIR=$(INSTALLDIR)/$*
1473
1474 $(obj-y) $(obj-n) $(obj-clean) $(obj-install): dummy
1475
1476 .PHONY: all clean distclean mrproper install package
1477 .PHONY: conf mconf oldconf kconf kmconf config menuconfig oldconfig
1478 .PHONY: dummy fixkc libnet libpcap
1479
1480
1481
Note: See TracBrowser for help on using the browser.