fix one typo
[tomato.git] / release / src / Makefile
blob143e80240971ef5a849608b0e6cd127016ee114d
2 # Toplevel Makefile for the BCM947xx Linux Router release
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.
12 # $Id: Makefile,v 1.53 2005/04/25 03:54:37 tallest Exp $
15 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17 # To rebuild everything and all configurations:
18 # make distclean
19 # make V1=whatever V2=sub-whatever VPN=vpn3.6 a b c d m n o
20 # The 1st "whatever" would be the build number, the sub-whatever would
21 # be the update to the version.
23 # Example:
24 # make V1=8516 V2="-jffs.1" a b c d m s n o
26 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 export SRCBASE := $(shell pwd)
31 RELEASEDIR := $(shell (cd $(SRCBASE)/.. && pwd -P))
32 PATH := $(RELEASEDIR)/tools:$(PATH)
33 export TPROFILE := N
35 include ./target.mak
37 # Normally you'd do something like "make V1=8516 V2=-sub-ver a b c d"
38 # But if you don't give anything for "V1", it'll get a default from tomato_version.
39 V1 ?= "--def"
40 VPN ?= "VPN"
41 ifeq ($(CONFIG_LINUX26),y)
42 ND = "K26"
43 else
44 ND = "ND"
45 endif
47 PPTPD ?= "n"
49 ifeq ($(NVRAM_SIZE),)
50 NVRAM_SIZE = 0
51 endif
53 -include tomato_profile.mak
55 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
56 # but that's fragile. If you make one certain innocuous change elsewhere in the
57 # makefile(s), the build will silently be wrong. This way it works properly every time.
58 current_BUILD_NAME = $(strip $(shell grep "^TOMATO_BUILD_NAME" tomato_profile.mak | cut -d"=" -f2))
59 current_BUILD_DESC = $(strip $(shell grep "^TOMATO_BUILD_DESC" tomato_profile.mak | cut -d"=" -f2 | sed -e "s/ //g"))
60 current_BUILD_USB = $(strip $(shell grep "^TOMATO_BUILD_USB" tomato_profile.mak | cut -d"=" -f2 | sed -e "s/ //g"))
61 current_TOMATO_VER = $(strip $(shell grep "TOMATO_MAJOR" router/shared/tomato_version.h | cut -d"\"" -f2)).$(strip $(shell grep "TOMATO_MINOR" router/shared/tomato_version.h | cut -d"\"" -f2))
63 uppercase_N = $(shell echo $(N) | tr a-z A-Z)
64 lowercase_N = $(shell echo $(N) | tr A-Z a-z)
65 uppercase_B = $(shell echo $(B) | tr a-z A-Z)
66 lowercase_B = $(shell echo $(B) | tr A-Z a-z)
68 ifeq ($(CONFIG_LINUX26),y)
69 mips_rev = $(if $(filter $(MIPS32),r2),MIPSR2,MIPSR1)
70 KERN_SIZE_OPT ?= n
71 else
72 mips_rev =
73 KERN_SIZE_OPT ?= y
74 endif
76 beta = $(if $(filter $(TOMATO_EXPERIMENTAL),1),-beta,)
78 tomato_ver:
79 @echo ""
80 @btools/uversion.pl --gen $(V1) $(mips_rev)$(beta)$(V2) $(ND) $(current_BUILD_USB) $(current_BUILD_DESC)
82 ifeq ($(TOMATO_BUILD),)
84 all:
85 $(MAKE) a
87 else
89 all: tomato_ver
90 @echo ""
91 @echo "Building Tomato $(ND) $(current_BUILD_USB) $(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2) $(current_BUILD_DESC) $(current_BUILD_NAME) with $(TOMATO_PROFILE_NAME) Profile"
93 @echo ""
94 @echo ""
96 @-mkdir image
97 @$(MAKE) -C router all
98 @$(MAKE) -C router install
99 @$(MAKE) -C btools
101 @rm -f image/tomato-$(ND)$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).trx
102 @rm -f image/tomato-$(ND)$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
103 ifeq ($(LINKSYS_E),1)
104 @rm -f image/tomato-E??00$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
105 endif
106 @echo "" >>fpkg.log
107 @echo "***********************" `date` "************************" >>fpkg.log
108 @cat router/shared/tomato_version >>fpkg.log
109 @echo "" >>fpkg.log
110 @cat router/target.info >>fpkg.log
111 ifeq ($(wildcard include/bcm20xx.h),)
112 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
113 -t image/tomato.trx \
114 -l W54G,image/WRT54G_WRT54GL.bin \
115 -l W54S,image/WRT54GS.bin \
116 -l W54s,image/WRT54GSv4.bin \
117 -l W54U,image/WRTSL54GS.bin \
118 -m 0x10577050,image/WR850G.bin \
119 | tee -a fpkg.log
120 else
121 ifeq ($(LINKSYS_E),1)
122 # Linksys E-series build plus generic TRX image
123 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
124 -t image/tomato-$(ND)$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).trx \
125 -l 4200,image/tomato-E4200$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
126 -l 61XN,image/tomato-E3000$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
127 -l 32XN,image/tomato-E2000$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
128 | tee -a fpkg.log
129 else
130 # Create generic TRX image
131 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
132 -t image/tomato-$(ND)$(current_BUILD_USB)$(if $(filter $(NVRAM_SIZE),0),,-NVRAM$(NVRAM_SIZE)K)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).trx \
133 | tee -a fpkg.log
134 endif
135 endif
137 @cp fpkg.log image/fpkg-$(V1)$(mips_rev)$(beta)$(V2).log
138 @echo ""
139 @echo "-----------------"
140 @echo `cat router/shared/tomato_version` " ready"
141 @echo "-----------------"
142 ifneq ($(NOVERSION),1)
143 @cp router/shared/tomato_version router/shared/tomato_version_last
144 @btools/uversion.pl --bump
145 endif
146 endif
150 clean:
151 @touch router/.config
152 @rm -f router/config_[a-z]
153 @rm -f router/busybox/config_[a-z]
154 @$(MAKE) -C router $@
155 @-rmdir router/mipsel-uclibc
157 cleanimage:
158 @rm -f fpkg.log
159 @rm -fr image/*
160 @rm -f router/.config
161 @touch router/.config
162 @-mkdir image
164 cleantools:
165 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs clean
166 @$(MAKE) -C btools clean
168 cleankernel:
169 @cd $(LINUXDIR) && \
170 mv .config save-config && \
171 $(MAKE) distclean || true; \
172 cp -p save-config .config || true
174 kernel:
175 @$(MAKE) -C router kernel
176 @ls -l $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage
178 distclean: clean cleanimage cleankernel cleantools
179 ifneq ($(INSIDE_MAK),1)
180 @$(MAKE) -C router $@ INSIDE_MAK=1
181 endif
182 mv router/busybox/.config busybox-saved-config || true
183 @$(MAKE) -C router/busybox distclean
184 @rm -f router/busybox/config_current
185 @cp -p busybox-saved-config router/busybox/.config || true
186 @cp -p router/busybox/.config router/busybox/config_current || true
187 @rm -f router/config_current
188 @rm -f router/.config.cmd router/.config.old router/.config
189 @rm -f router/libfoo_xref.txt
190 @rm -f tomato_profile.mak router/shared/tomato_profile.h
191 @touch tomato_profile.mak
192 @touch router/shared/tomato_profile.h
195 prepk:
196 @cd $(LINUXDIR) ; \
197 rm -f config_current ; \
198 ln -s config_base config_current ; \
199 cp -f config_current .config
200 $(MAKE) -C $(LINUXDIR) oldconfig
201 ifneq ($(CONFIG_LINUX26),y)
202 $(MAKE) -C $(LINUXDIR) dep
203 endif
205 what:
206 @echo ""
207 @echo "$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
208 @echo ""
211 # The methodology for making the different builds is to
212 # copy the "base" config file to the "target" config file in
213 # the appropriate directory, and then edit it by removing and
214 # inserting the desired configuration lines.
215 # You can't just delete the "whatever=y" line, you must have
216 # a "...is not set" line, or the make oldconfig will stop and ask
217 # what to do.
219 # Options for "make bin" :
220 # BUILD_DESC (Std|Lite|Ext|...)
221 # MIPS32 (r2|r1)
222 # KERN_SIZE_OPT
223 # USB ("USB"|"")
224 # JFFSv1 | NO_JFFS
225 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT
226 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM, NOCAT
227 # NFS BTCLIENT BTGUI TR_EXTRAS SNMP SDHC HFS UPS DNSCRYPT PPTPD
229 define RouterOptions
230 @( \
231 if [ "$(CONFIG_LINUX26)" = "y" ] || [ "$(SAMBA3)" = "y" ]; then \
232 sed -i "/TCONFIG_SAMBA3/d" $(1); \
233 echo "TCONFIG_SAMBA3=y" >>$(1); \
234 fi; \
235 sed -i "/TCONFIG_EMF/d" $(1); \
236 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
237 if [ "$(SLIM)" = "y" ]; then \
238 echo "# TCONFIG_EMF is not set" >>$(1); \
239 else \
240 echo "TCONFIG_EMF=y" >>$(1); \
241 fi; \
242 else \
243 echo "# TCONFIG_EMF is not set" >>$(1); \
244 fi; \
245 sed -i "/TCONFIG_JFFSV1/d" $(1); \
246 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
247 if [ "$(JFFSv1)" = "y" ]; then \
248 echo "TCONFIG_JFFSV1=y" >>$(1); \
249 else \
250 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
251 fi; \
252 else \
253 echo "TCONFIG_JFFSV1=y" >>$(1); \
254 fi; \
255 if [ "$(USB)" = "USB" ]; then \
256 sed -i "/TCONFIG_USB is not set/d" $(1); \
257 echo "TCONFIG_USB=y" >>$(1); \
258 if [ "$(USBEXTRAS)" = "y" ]; then \
259 sed -i "/TCONFIG_USB_EXTRAS/d" $(1); \
260 echo "TCONFIG_USB_EXTRAS=y" >>$(1); \
261 fi; \
262 if [ "$(NTFS)" = "y" ]; then \
263 sed -i "/TCONFIG_NTFS/d" $(1); \
264 echo "TCONFIG_NTFS=y" >>$(1); \
265 fi; \
266 if [ "$(MEDIASRV)" = "y" ]; then \
267 sed -i "/TCONFIG_MEDIA_SERVER/d" $(1); \
268 echo "TCONFIG_MEDIA_SERVER=y" >>$(1); \
269 fi; \
270 else \
271 sed -i "/TCONFIG_USB=y/d" $(1); \
272 echo "# TCONFIG_USB is not set" >>$(1); \
273 fi; \
274 if [ "$(NO_SAMBA)" = "y" ]; then \
275 sed -i "/TCONFIG_SAMBASRV/d" $(1); \
276 echo "# TCONFIG_SAMBASRV is not set" >>$(1); \
277 fi; \
278 if [ "$(NO_ZEBRA)" = "y" ]; then \
279 sed -i "/TCONFIG_ZEBRA/d" $(1); \
280 echo "# TCONFIG_ZEBRA is not set" >>$(1); \
281 fi; \
282 if [ "$(NO_JFFS)" = "y" ]; then \
283 sed -i "/TCONFIG_JFFS2/d" $(1); \
284 echo "# TCONFIG_JFFS2 is not set" >>$(1); \
285 sed -i "/TCONFIG_JFFSV1/d" $(1); \
286 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
287 fi; \
288 if [ "$(NO_CIFS)" = "y" ]; then \
289 sed -i "/TCONFIG_CIFS/d" $(1); \
290 echo "# TCONFIG_CIFS is not set" >>$(1); \
291 fi; \
292 if [ "$(NO_SSH)" = "y" ]; then \
293 sed -i "/TCONFIG_SSH/d" $(1); \
294 echo "# TCONFIG_SSH is not set" >>$(1); \
295 fi; \
296 if [ "$(NO_HTTPS)" = "y" ]; then \
297 sed -i "/TCONFIG_HTTPS/d" $(1); \
298 echo "# TCONFIG_HTTPS is not set" >>$(1); \
299 fi; \
300 if [ "$(NO_XXTP)" = "y" ]; then \
301 sed -i "/TCONFIG_L2TP/d" $(1); \
302 echo "# TCONFIG_L2TP is not set" >>$(1); \
303 sed -i "/TCONFIG_PPTP/d" $(1); \
304 echo "# TCONFIG_PPTP is not set" >>$(1); \
305 fi; \
306 if [ "$(NO_LIBOPT)" = "y" ]; then \
307 sed -i "/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
308 echo "# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
309 fi; \
310 if [ "$(EBTABLES)" = "y" ]; then \
311 sed -i "/TCONFIG_EBTABLES/d" $(1); \
312 echo "TCONFIG_EBTABLES=y" >>$(1); \
313 fi; \
314 if [ "$(IPV6SUPP)" = "y" ]; then \
315 sed -i "/TCONFIG_IPV6/d" $(1); \
316 echo "TCONFIG_IPV6=y" >>$(1); \
317 fi; \
318 if [ "$(NOCAT)" = "y" ]; then \
319 sed -i "/TCONFIG_NOCAT/d" $(1); \
320 echo "TCONFIG_NOCAT=y" >>$(1); \
321 fi; \
322 if [ "$(OPENVPN)" = "y" ]; then \
323 sed -i "/TCONFIG_LZO/d" $(1); \
324 echo "TCONFIG_LZO=y" >>$(1); \
325 sed -i "/TCONFIG_OPENVPN/d" $(1); \
326 echo "TCONFIG_OPENVPN=y" >>$(1); \
327 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
328 sed -i "/TCONFIG_FTP_SSL/d" $(1); \
329 echo "TCONFIG_FTP_SSL=y" >>$(1); \
330 fi; \
331 fi; \
332 if [ "$(PPTPD)" = "y" ]; then \
333 sed -i "/TCONFIG_PPTPD/d" $(1); \
334 echo "TCONFIG_PPTPD=y" >>$(1); \
335 fi; \
336 if [ "$(BTCLIENT)" = "y" ]; then \
337 sed -i "/TCONFIG_BT/d" $(1); \
338 echo "TCONFIG_BT=y" >>$(1); \
339 sed -i "/TCONFIG_BBT/d" $(1); \
340 echo "TCONFIG_BBT=y" >>$(1); \
341 fi; \
342 if [ "$(BTGUI)" = "y" ]; then \
343 sed -i "/TCONFIG_BT/d" $(1); \
344 echo "TCONFIG_BT=y" >>$(1); \
345 fi; \
346 if [ "$(TR_EXTRAS)" = "y" ]; then \
347 sed -i "/TCONFIG_TR_EXTRAS/d" $(1); \
348 echo "TCONFIG_TR_EXTRAS=y" >>$(1); \
349 fi; \
350 if [ "$(NFS)" = "y" ]; then \
351 sed -i "/TCONFIG_NFS/d" $(1); \
352 echo "TCONFIG_NFS=y" >>$(1); \
353 fi; \
354 if [ "$(SNMP)" = "y" ]; then \
355 sed -i "/TCONFIG_SNMP/d" $(1); \
356 echo "TCONFIG_SNMP=y" >>$(1); \
357 fi; \
358 if [ "$(SDHC)" = "y" ]; then \
359 sed -i "/TCONFIG_SDHC/d" $(1); \
360 echo "TCONFIG_SDHC=y" >>$(1); \
361 fi; \
362 if [ "$(HFS)" = "y" ]; then \
363 sed -i "/TCONFIG_HFS/d" $(1); \
364 echo "TCONFIG_HFS=y" >>$(1); \
365 fi; \
366 if [ "$(UPS)" = "y" ]; then \
367 sed -i "/TCONFIG_UPS/d" $(1); \
368 echo "TCONFIG_UPS=y" >>$(1); \
369 fi; \
370 if [ "$(DNSCRYPT)" = "y" ]; then \
371 sed -i "/TCONFIG_DNSCRYPT/d" $(1); \
372 echo "TCONFIG_DNSCRYPT=y" >>$(1); \
373 fi; \
375 endef
377 define BusyboxOptions
378 @( \
379 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
380 sed -i "/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
381 echo "# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
382 sed -i "/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
383 echo "CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
384 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
385 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
386 sed -i "/CONFIG_MKNOD/d" $(1); \
387 echo "CONFIG_MKNOD=y" >>$(1); \
388 sed -i "/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
389 echo "CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
390 fi; \
391 if [ "$(NO_CIFS)" = "y" ]; then \
392 sed -i "/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
393 echo "# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
394 fi; \
395 if [ "$(BBEXTRAS)" = "y" ]; then \
396 sed -i "/CONFIG_SENDMAIL/d" $(1); \
397 echo "CONFIG_SENDMAIL=y" >>$(1); \
398 sed -i "/CONFIG_WHOIS/d" $(1); \
399 echo "CONFIG_WHOIS=y" >>$(1); \
400 sed -i "/CONFIG_FEATURE_SORT_BIG/d" $(1); \
401 echo "CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
402 sed -i "/CONFIG_CLEAR/d" $(1); \
403 echo "CONFIG_CLEAR=y" >>$(1); \
404 sed -i "/CONFIG_NICE/d" $(1); \
405 echo "CONFIG_NICE=y" >>$(1); \
406 sed -i "/CONFIG_SETCONSOLE/d" $(1); \
407 echo "CONFIG_SETCONSOLE=y" >>$(1); \
408 sed -i "/CONFIG_SEQ/d" $(1); \
409 echo "CONFIG_SEQ=y" >>$(1); \
410 sed -i "/CONFIG_STTY/d" $(1); \
411 echo "CONFIG_STTY=y" >>$(1); \
412 fi; \
413 if [ "$(USB)" = "USB" ]; then \
414 if [ "$(USBEXTRAS)" = "y" ]; then \
415 sed -i "/CONFIG_E2FSCK/d" $(1); \
416 echo "CONFIG_E2FSCK=y" >>$(1); \
417 sed -i "/CONFIG_MKE2FS/d" $(1); \
418 echo "CONFIG_MKE2FS=y" >>$(1); \
419 sed -i "/CONFIG_FDISK/d" $(1); \
420 echo "CONFIG_FDISK=y" >>$(1); \
421 sed -i "/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
422 echo "CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
423 sed -i "/CONFIG_MKFS_VFAT/d" $(1); \
424 echo "CONFIG_MKFS_VFAT=y" >>$(1); \
425 sed -i "/CONFIG_MKSWAP/d" $(1); \
426 echo "CONFIG_MKSWAP=y" >>$(1); \
427 sed -i "/CONFIG_FLOCK/d" $(1); \
428 echo "CONFIG_FLOCK=y" >>$(1); \
429 sed -i "/CONFIG_FSYNC/d" $(1); \
430 echo "CONFIG_FSYNC=y" >>$(1); \
431 sed -i "/CONFIG_UNZIP/d" $(1); \
432 echo "CONFIG_UNZIP=y" >>$(1); \
433 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
434 sed -i "/CONFIG_LSUSB/d" $(1); \
435 echo "CONFIG_LSUSB=y" >>$(1); \
436 sed -i "/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
437 echo "CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
438 sed -i "/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
439 echo "CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
440 fi; \
441 fi; \
442 else \
443 sed -i "/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
444 echo "# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
445 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
446 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
447 sed -i "/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
448 echo "# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
449 sed -i "/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
450 echo "# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
451 sed -i "/CONFIG_VOLUMEID/d" $(1); \
452 echo "# CONFIG_VOLUMEID is not set" >>$(1); \
453 sed -i "/CONFIG_BLKID/d" $(1); \
454 echo "# CONFIG_BLKID is not set" >>$(1); \
455 sed -i "/CONFIG_SWAPONOFF/d" $(1); \
456 echo "# CONFIG_SWAPONOFF is not set" >>$(1); \
457 sed -i "/CONFIG_CHROOT/d" $(1); \
458 echo "# CONFIG_CHROOT is not set" >>$(1); \
459 sed -i "/CONFIG_PIVOT_ROOT/d" $(1); \
460 echo "# CONFIG_PIVOT_ROOT is not set" >>$(1); \
461 sed -i "/CONFIG_TRUE/d" $(1); \
462 echo "# CONFIG_TRUE is not set" >>$(1); \
463 fi; \
464 if [ "$(IPV6SUPP)" = "y" ]; then \
465 sed -i "/CONFIG_FEATURE_IPV6/d" $(1); \
466 echo "CONFIG_FEATURE_IPV6=y" >>$(1); \
467 sed -i "/CONFIG_PING6/d" $(1); \
468 echo "CONFIG_PING6=y" >>$(1); \
469 sed -i "/CONFIG_TRACEROUTE6/d" $(1); \
470 echo "CONFIG_TRACEROUTE6=y" >>$(1); \
471 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
472 sed -i "/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
473 echo "CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
474 fi; \
475 fi; \
476 if [ "$(SLIM)" = "y" ]; then \
477 sed -i "/CONFIG_AWK/d" $(1); \
478 echo "# CONFIG_AWK is not set" >>$(1); \
479 sed -i "/CONFIG_BASENAME/d" $(1); \
480 echo "# CONFIG_BASENAME is not set" >>$(1); \
481 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
482 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
483 sed -i "/CONFIG_BLKID/d" $(1); \
484 echo "# CONFIG_BLKID is not set" >>$(1); \
485 sed -i "/CONFIG_TELNET=y/d" $(1); \
486 echo "# CONFIG_TELNET is not set" >>$(1); \
487 sed -i "/CONFIG_ARPING/d" $(1); \
488 echo "# CONFIG_ARPING is not set" >>$(1); \
489 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
490 echo "# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
491 sed -i "/CONFIG_CHOWN/d" $(1); \
492 echo "# CONFIG_CHOWN is not set" >>$(1); \
493 else \
494 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
495 echo "CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
496 sed -i "/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
497 echo "CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
498 fi; \
500 endef
502 define KernelConfig
503 @( \
504 sed -i "/CONFIG_NVRAM_SIZE/d" $(1); \
505 echo "CONFIG_NVRAM_SIZE="$(NVRAM_SIZE) >>$(1); \
506 sed -i "/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
507 if [ "$(KERN_SIZE_OPT)" = "y" ]; then \
508 echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
509 else \
510 echo "# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
511 fi; \
512 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
513 sed -i "/CONFIG_CPU_MIPS32_R1/d" $(1); \
514 echo "# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
515 sed -i "/CONFIG_CPU_MIPS32_R2/d" $(1); \
516 echo "CONFIG_CPU_MIPS32_R2=y" >>$(1); \
517 sed -i "/CONFIG_CPU_MIPSR1/d" $(1); \
518 echo "CONFIG_CPU_MIPSR2=y" >>$(1); \
519 fi; \
520 if [ "$(UPS)" = "y" ]; then \
521 sed -i "/CONFIG_INPUT=m/d" $(1); \
522 echo "CONFIG_INPUT=y" >>$(1); \
523 sed -i "/CONFIG_USB=m/d" $(1); \
524 echo "CONFIG_USB=y" >>$(1); \
525 sed -i "/CONFIG_HID=m/d" $(1); \
526 echo "CONFIG_HID=y" >>$(1); \
527 sed -i "/CONFIG_USB_HID=m/d" $(1); \
528 echo "CONFIG_USB_HID=y" >>$(1); \
529 sed -i "/CONFIG_USB_HIDDEV=m/d" $(1); \
530 echo "CONFIG_USB_HIDDEV=y" >>$(1); \
531 sed -i "/CONFIG_USB_DEVICEFS=m/d" $(1); \
532 echo "CONFIG_USB_DEVICEFS=y" >>$(1); \
533 fi; \
534 if [ "$(USB)" = "" ]; then \
535 sed -i "/CONFIG_EFI_PARTITION/d" $(1); \
536 echo "# CONFIG_EFI_PARTITION is not set" >>$(1); \
537 fi; \
538 if [ "$(IPV6SUPP)" = "y" ]; then \
539 sed -i "/CONFIG_IPV6 is not set/d" $(1); \
540 echo "CONFIG_IPV6=y" >>$(1); \
541 sed -i "/CONFIG_IP6_NF_IPTABLES/d" $(1); \
542 echo "CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
543 sed -i "/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
544 echo "CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
545 sed -i "/CONFIG_IP6_NF_FILTER/d" $(1); \
546 echo "CONFIG_IP6_NF_FILTER=m" >>$(1); \
547 sed -i "/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
548 echo "CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
549 sed -i "/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
550 echo "CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
551 sed -i "/CONFIG_IP6_NF_MANGLE/d" $(1); \
552 echo "CONFIG_IP6_NF_MANGLE=m" >>$(1); \
553 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
554 sed -i "/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
555 echo "CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
556 sed -i "/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
557 echo "CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
558 sed -i "/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
559 echo "CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
560 sed -i "/CONFIG_IPV6_SIT/d" $(1); \
561 echo "CONFIG_IPV6_SIT=m" >>$(1); \
562 sed -i "/CONFIG_IPV6_SIT_6RD/d" $(1); \
563 echo "CONFIG_IPV6_SIT_6RD=y" >>$(1); \
564 sed -i "/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
565 echo "CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
566 sed -i "/CONFIG_IP6_NF_RAW/d" $(1); \
567 echo "CONFIG_IP6_NF_RAW=m" >>$(1); \
568 sed -i "/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
569 echo "CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
570 sed -i "/CONFIG_IPV6_MROUTE/d" $(1); \
571 echo "CONFIG_IPV6_MROUTE=y" >>$(1); \
572 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
573 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
574 else \
575 sed -i "/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
576 echo "CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
577 sed -i "/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
578 echo "CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
579 sed -i "/CONFIG_IP6_NF_FTP/d" $(1); \
580 echo "CONFIG_IP6_NF_FTP=m" >>$(1); \
581 sed -i "/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
582 echo "CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
583 sed -i "/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
584 echo "CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
585 sed -i "/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
586 echo "CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
587 sed -i "/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
588 echo "CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
589 sed -i "/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
590 echo "CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
591 sed -i "/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
592 echo "CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
593 sed -i "/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
594 echo "CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
595 sed -i "/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
596 echo "CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
597 sed -i "/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
598 echo "CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
599 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
600 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
601 fi; \
602 fi; \
603 sed -i "/CONFIG_BCM57XX/d" $(1); \
604 if [ "$(BCM57)" = "y" ]; then \
605 echo "CONFIG_BCM57XX=m" >>$(1); \
606 else \
607 echo "# CONFIG_BCM57XX is not set" >>$(1); \
608 fi; \
609 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
610 sed -i "/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
611 echo "CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
612 if [ "$(IPV6SUPP)" = "y" ]; then \
613 sed -i "/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
614 echo "CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
615 fi; \
616 fi; \
618 endef
621 bin:
622 ifeq ($(B),)
623 @echo $@" is not a valid target!"
624 @false
625 endif
626 @cp router/config_base router/config_$(lowercase_B)
627 @cp router/busybox/config_base router/busybox/config_$(lowercase_B)
628 @cp $(LINUXDIR)/config_base $(LINUXDIR)/config_$(lowercase_B)
630 $(call RouterOptions, router/config_$(lowercase_B))
631 $(call KernelConfig, $(LINUXDIR)/config_$(lowercase_B))
632 $(call BusyboxOptions, router/busybox/config_$(lowercase_B))
634 @$(MAKE) setprofile N=$(TPROFILE) B=$(B) DESC="$(BUILD_DESC)" USB="$(USB)"
635 @$(MAKE) all
637 ## VPN
639 ifeq ($(CONFIG_LINUX26),y)
640 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y HFS=y DNSCRYPT=y PPTPD=y
641 else
642 @$(MAKE) bin OPENVPN=y BBEXTRAS=y USBEXTRAS=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y HFS=y DNSCRYPT=y PPTPD=y
643 endif
645 ## BTgui-VPN
647 ifeq ($(CONFIG_LINUX26),y)
648 @$(MAKE) bin NTFS=y OPENVPN=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BTgui-VPN" USB="USB" BTGUI=y SNMP=y HFS=y DNSCRYPT=y PPTPD=y
649 else
650 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="BTgui" USB="USB" BTGUI=y HFS=y DNSCRYPT=y PPTPD=y
651 endif
653 ## Nocat-VPN
655 ifeq ($(CONFIG_LINUX26),y)
656 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Nocat-VPN" USB="USB" BTGUI=y NOCAT=y OPENVPN=y SNMP=y HFS=y DNSCRYPT=y PPTPD=y
657 else
658 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Nocat-VPN" USB="USB" BTGUI=y NOCAT=y OPENVPN=y SNMP=y HFS=y DNSCRYPT=y PPTPD=y
659 endif
662 ## BT
664 ifeq ($(CONFIG_LINUX26),y)
665 @$(MAKE) bin NTFS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BT" USB="USB" BTCLIENT=y DNSCRYPT=y
666 else
667 @$(MAKE) bin NTFS=y USBEXTRAS=y B=M BUILD_DESC="BT-VPN" USB="USB" BTCLIENT=y DNSCRYPT=y
668 endif
670 ## BT-VPN
672 ifeq ($(CONFIG_LINUX26),y)
673 @$(MAKE) bin OPENVPN=y NTFS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BT-VPN" USB="USB" BTCLIENT=y NO_JFFS=y PPTPD=y
674 else
675 @$(MAKE) bin OPENVPN=y NTFS=y USBEXTRAS=y B=M BUILD_DESC="BT-VPN" USB="USB" BTCLIENT=y NO_JFFS=y PPTPD=y
676 endif
678 ## Big-VPN
680 ifeq ($(CONFIG_LINUX26),y)
681 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Big-VPN" USB="USB" BTGUI=y NFS=y NOCAT=y OPENVPN=y DNSCRYPT=y PPTPD=y
682 else
683 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Big-VPN" USB="USB" BTGUI=y NOCAT=y NFS=y OPENVPN=y DNSCRYPT=y PPTPD=y
684 endif
686 ## Mega-VPN
688 ifeq ($(CONFIG_LINUX26),y)
689 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="Mega-VPN" USB="USB" NOCAT=y BTCLIENT=y DNSCRYPT=y UPS=y PPTPD=y TR_EXTRAS=y
690 endif
692 ## All-In-One (AIO) MIPS1 - only for router with more than 8MB flash!! ZTE H618B
694 ifeq ($(CONFIG_LINUX26),y)
695 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="AIO" USB="USB" NOCAT=y BTCLIENT=y TR_EXTRAS=y NFS=y SNMP=y HFS=y DNSCRYPT=y UPS=y PPTPD=y
696 endif
698 #################################
700 ## Mini - targeted for Netgear routers
702 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y B=F BUILD_DESC="Mini" USB=""
704 ifeq ($(CONFIG_LINUX26),y)
705 ## MiniIPv6 - for 4MB routers
707 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y IPV6SUPP=y B=I BUILD_DESC="MiniIPv6" USB=""
708 endif
710 ## VPN with no USB support (IPv6 in K26 build)
712 ifeq ($(CONFIG_LINUX26),y)
713 @$(MAKE) bin OPENVPN=y NO_JFFS=y B=V BUILD_DESC="IPv6-$(VPN)" USB="" SNMP=y PPTPD=y IPV6SUPP=y
714 else
715 @$(MAKE) bin OPENVPN=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y PPTPD=y
716 endif
718 ## SD-VPN - Only k24
720 ifneq ($(CONFIG_LINUX26),y)
721 @$(MAKE) bin OPENVPN=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="SD-VPN" USB="" SDHC=y SNMP=y DNSCRYPT=y PPTPD=y
722 endif
725 ## Make Mips32r2 builds ##
727 #AIO MIPS2 for RT-N16 and E4200
728 r2z:
729 @$(MAKE) z MIPS32=r2
731 r2e:
732 @$(MAKE) e MIPS32=r2
734 r2c:
735 @$(MAKE) c MIPS32=r2
737 r2u:
738 @$(MAKE) u MIPS32=r2
740 r2t:
741 @$(MAKE) t MIPS32=r2
743 r2d:
744 @$(MAKE) d MIPS32=r2
746 r2b:
747 @$(MAKE) b MIPS32=r2
749 r2o:
750 @$(MAKE) o MIPS32=r2
752 r2f:
753 @$(MAKE) f MIPS32=r2
755 r2i:
756 @$(MAKE) i MIPS32=r2
758 r2v:
759 @$(MAKE) v MIPS32=r2
761 #AIO for E4200
762 n60z:
763 @$(MAKE) r2z NVRAM_SIZE=60 LINKSYS_E=1
765 n60e:
766 @$(MAKE) r2e NVRAM_SIZE=60 LINKSYS_E=1
768 n60c:
769 @$(MAKE) r2c NVRAM_SIZE=60 LINKSYS_E=1
771 n60u:
772 @$(MAKE) r2u NVRAM_SIZE=60 LINKSYS_E=1
774 n60t:
775 @$(MAKE) r2t NVRAM_SIZE=60 LINKSYS_E=1
777 n60b:
778 @$(MAKE) r2b NVRAM_SIZE=60 LINKSYS_E=1
780 n60d:
781 @$(MAKE) r2d NVRAM_SIZE=60 LINKSYS_E=1
783 n60o:
784 @$(MAKE) r2o NVRAM_SIZE=60 LINKSYS_E=1
786 n60v:
787 @$(MAKE) r2v NVRAM_SIZE=60 LINKSYS_E=1
789 setprofile:
790 echo '#ifndef TOMATO_PROFILE' > router/shared/tomato_profile.h
791 echo '#define TOMATO_$(N) 1' >> router/shared/tomato_profile.h
792 echo '#define PROFILE_G 1' >> router/shared/tomato_profile.h
793 echo '#define PROFILE_N 2' >> router/shared/tomato_profile.h
794 echo '#define TOMATO_PROFILE PROFILE_$(N)' >> router/shared/tomato_profile.h
795 echo '#define TOMATO_PROFILE_NAME "$(N)"' >> router/shared/tomato_profile.h
796 echo '#define TOMATO_BUILD_NAME "$(B)"' >> router/shared/tomato_profile.h
797 echo '#define TOMATO_BUILD_DESC "$(DESC)"' >> router/shared/tomato_profile.h
798 echo '#ifndef CONFIG_NVRAM_SIZE' >> router/shared/tomato_profile.h
799 echo '#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router/shared/tomato_profile.h
800 echo '#endif' >> router/shared/tomato_profile.h
801 echo '#endif' >> router/shared/tomato_profile.h
803 echo 'TOMATO_$(N) = 1' > tomato_profile.mak
804 echo 'PROFILE_G = 1' >> tomato_profile.mak
805 echo 'PROFILE_N = 2' >> tomato_profile.mak
806 echo 'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
807 echo 'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
808 echo 'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
809 echo 'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
810 echo 'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
811 echo 'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
812 echo 'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
813 echo 'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
815 echo 'export EXTRACFLAGS := $(EXTRA_CFLAGS) -DBCMWPA2 -funit-at-a-time -Wno-pointer-sign -mtune=mips32 -mips32 $(if $(filter $(NVRAM_SIZE),0),,-DCONFIG_NVRAM_SIZE=$(NVRAM_SIZE))' >> tomato_profile.mak
817 # Note that changes to variables in tomato_profile.mak don't
818 # get propogated to this invocation of make!
819 @echo ""
820 @echo "Using $(N) profile, $(B) build config."
821 @echo ""
823 @cd $(LINUXDIR) ; \
824 rm -f config_current ; \
825 ln -s config_$(lowercase_B) config_current ; \
826 cp -f config_current .config
828 @cd router/busybox && \
829 rm -f config_current ; \
830 ln -s config_$(lowercase_B) config_current ; \
831 cp config_current .config
833 @cd router ; \
834 rm -f config_current ; \
835 ln -s config_$(lowercase_B) config_current ; \
836 cp config_current .config
838 @$(MAKE) -C router oldconfig
840 help:
841 @echo "e VPN - (standard plus VPN, extra utilities and NTFS support)"
842 @echo "c BTgui-VPN - (Ext plus BT gui)"
843 @echo "d Nocat-VPN - (BTgui plus VPN plus Nocat)"
844 @echo "u BT"
845 @echo "t BT-VPN - (BT plus VPN)"
846 @echo "b Big-VPN - (Big plus VPN)"
847 @echo "o Mega-VPN - (Mega plus VPN plus NOCAT minus NFS)"
848 ifeq ($(CONFIG_LINUX26),y)
849 @echo "z MIPS Release 15F AIO (for routers +8MB flash)"
850 @echo "i MiniIPv6 - (IPv6 with no USB support minus CIFS and RIPv1/2)"
851 endif
852 @echo "f Mini - (no USB support minus CIFS and RIPv1/2)"
853 @echo "v VPN (no usb) - (VPN with no USB support)" / in K26 + IPv6 support
854 @echo "w SD-VPN (no usb) - (VPN with SD-MOD and no USB support)"
855 ifeq ($(CONFIG_LINUX26),y)
856 @echo "r2e MIPS Release 2 VPN"
857 @echo "r2c MIPS Release 2 BTgui-VPN"
858 @echo "r2d MIPS Release 2 Nocat-VPN"
859 @echo "r2u MIPS Release 2 BT"
860 @echo "r2t MIPS Release 2 BT-VPN"
861 @echo "r2b MIPS Release 2 Big-VPN"
862 @echo "r2o MIPS Release 2 Mega-VPN"
863 @echo "r2z MIPS Release 2 AIO (for routers +8MB flash)"
864 @echo "r2v MIPS Release 2 VPN (no usb)"
865 @echo "r2i MIPS Release 2 MiniIPv6 (for 4MB flash)"
866 @echo "r2f MIPS Release 2 Mini (for netgear)"
867 @echo "n60e Linksys E-series build VPN"
868 @echo "n60c Linksys E-series build BTGui-VPN"
869 @echo "n60d Linksys E-series build BTGui-VPN plus Nocat"
870 @echo "n60u Linksys E-series build BT"
871 @echo "n60t Linksys E-series build BT-VPN"
872 @echo "n60b Linksys E-series build Big-VPN"
873 @echo "n60o Linksys E-series build Mega-VPN"
874 @echo "n60z Linksys E-series build AIO"
875 @echo "n60v Linksys E-series build IPv6-VPN for E2000"
876 endif
877 @echo "..etc.. other build configs"
878 @echo "clean -C router clean"
879 @echo "cleanimage rm -rf image"
880 @echo "cleantools clean btools, mksquashfs"
881 @echo "cleankernel -C Linux distclean (but preserves .config)"
882 @echo "distclean distclean of Linux & busybox (but preserve .configs)"
883 @echo "prepk -C Linux oldconfig dep"
885 .PHONY: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
886 .PHONY: a b c d m nc Makefile allversions tomato_profile.mak