fix webmon bug, restore IPV6 to builds, makefile
[tomato.git] / release / src / Makefile
blob50ce0539fc292c2b9ee3b449bea594508c53a2c2
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
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
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 NC ?="NOCAT"
42 ifeq ($(CONFIG_LINUX26),y)
43 ND = "K26"
44 else
45 ND = "ND"
46 endif
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 ($(WRT54),y)
104 ifneq ($(MIPS32),r2)
105 @rm -f image/tomato-WRT54*$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
106 @rm -f image/tomato-WRTSL54*$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
107 @rm -f image/tomato-WR850G$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
108 endif
109 endif
110 ifeq ($(LINKSYS_E),y)
111 @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
112 endif
113 ifeq ($(BELKIN),y)
114 ifneq ($(NVRAM_SIZE),60)
115 @rm -f image/tomato-F7D????$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
116 @rm -f image/tomato-F5D8235v3$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
117 endif
118 endif
119 @echo "" >>fpkg.log
120 @echo "***********************" `date` "************************" >>fpkg.log
121 @cat router/shared/tomato_version >>fpkg.log
122 @echo "" >>fpkg.log
123 @cat router/target.info >>fpkg.log
124 ifeq ($(WRT54),y)
125 ifneq ($(MIPS32),r2)
126 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
127 -l W54G,image/tomato-WRT54G_WRT54GL$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
128 -l W54S,image/tomato-WRT54GS$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
129 -l W54s,image/tomato-WRT54GSv4$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
130 -l W54U,image/tomato-WRTSL54GS$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
131 -m 0x10577050,image/tomato-WR850G$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin
132 | tee -a fpkg.log
133 endif
134 endif
135 ifeq ($(LINKSYS_E),y)
136 # Linksys E-series images
137 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
138 -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 \
139 -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 \
140 -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 \
141 | tee -a fpkg.log
142 endif
143 ifeq ($(BELKIN),y)
144 ifneq ($(NVRAM_SIZE),60)
145 # Create Belkin images
146 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
147 -b 0x20100322,image/tomato-F7D3301$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
148 -b 0x20090928,image/tomato-F7D3302$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
149 -b 0x20091006,image/tomato-F7D4302$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
150 -b 0x00017116,image/tomato-F5D8235v3$(current_BUILD_USB)-$(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2)-$(current_BUILD_DESC).bin \
151 | tee -a fpkg.log
152 endif
153 endif
154 # Create generic TRX image
155 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
156 -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 \
157 | tee -a fpkg.log
159 @cp fpkg.log image/fpkg-$(V1)$(mips_rev)$(beta)$(V2).log
160 @echo ""
161 @echo "-----------------"
162 @echo `cat router/shared/tomato_version` " ready"
163 @echo "-----------------"
164 ifneq ($(NOVERSION),1)
165 @cp router/shared/tomato_version router/shared/tomato_version_last
166 @btools/uversion.pl --bump
167 endif
168 endif
172 clean:
173 @touch router/.config
174 @rm -f router/config_[a-z]
175 @rm -f router/busybox/config_[a-z]
176 @$(MAKE) -C router $@
177 @-rmdir router/mipsel-uclibc
179 cleanimage:
180 @rm -f fpkg.log
181 @rm -fr image/*
182 @rm -f router/.config
183 @touch router/.config
184 @-mkdir image
186 cleantools:
187 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs clean
188 @$(MAKE) -C btools clean
190 cleankernel:
191 @cd $(LINUXDIR) && \
192 mv .config save-config && \
193 $(MAKE) distclean || true; \
194 cp -p save-config .config || true
196 kernel:
197 @$(MAKE) -C router kernel
198 @ls -l $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage
200 distclean: clean cleanimage cleankernel cleantools
201 ifneq ($(INSIDE_MAK),1)
202 @$(MAKE) -C router $@ INSIDE_MAK=1
203 endif
204 mv router/busybox/.config busybox-saved-config || true
205 @$(MAKE) -C router/busybox distclean
206 @rm -f router/busybox/config_current
207 @cp -p busybox-saved-config router/busybox/.config || true
208 @cp -p router/busybox/.config router/busybox/config_current || true
209 @rm -f router/config_current
210 @rm -f router/.config.cmd router/.config.old router/.config
211 @rm -f router/libfoo_xref.txt
212 @rm -f tomato_profile.mak router/shared/tomato_profile.h
213 @touch tomato_profile.mak
214 @touch router/shared/tomato_profile.h
217 prepk:
218 @cd $(LINUXDIR) ; \
219 rm -f config_current ; \
220 ln -s config_base config_current ; \
221 cp -f config_current .config
222 $(MAKE) -C $(LINUXDIR) oldconfig
223 ifneq ($(CONFIG_LINUX26),y)
224 $(MAKE) -C $(LINUXDIR) dep
225 endif
227 what:
228 @echo ""
229 @echo "$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
230 @echo ""
233 # The methodology for making the different builds is to
234 # copy the "base" config file to the "target" config file in
235 # the appropriate directory, and then edit it by removing and
236 # inserting the desired configuration lines.
237 # You can't just delete the "whatever=y" line, you must have
238 # a "...is not set" line, or the make oldconfig will stop and ask
239 # what to do.
241 # Options for "make bin" :
242 # BUILD_DESC (Std|Lite|Ext|...)
243 # MIPS32 (r2|r1)
244 # KERN_SIZE_OPT
245 # USB ("USB"|"")
246 # JFFSv1 | NO_JFFS
247 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT
248 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM, NOCAT
249 # SNMP
251 define RouterOptions
252 @( \
253 if [ "$(CONFIG_LINUX26)" = "y" ] || [ "$(SAMBA3)" = "y" ]; then \
254 sed -i "/TCONFIG_SAMBA3/d" $(1); \
255 echo "TCONFIG_SAMBA3=y" >>$(1); \
256 fi; \
257 sed -i "/TCONFIG_EMF/d" $(1); \
258 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
259 if [ "$(SLIM)" = "y" ]; then \
260 echo "# TCONFIG_EMF is not set" >>$(1); \
261 else \
262 echo "TCONFIG_EMF=y" >>$(1); \
263 fi; \
264 else \
265 echo "# TCONFIG_EMF is not set" >>$(1); \
266 fi; \
267 sed -i "/TCONFIG_JFFSV1/d" $(1); \
268 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
269 if [ "$(JFFSv1)" = "y" ]; then \
270 echo "TCONFIG_JFFSV1=y" >>$(1); \
271 else \
272 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
273 fi; \
274 else \
275 echo "TCONFIG_JFFSV1=y" >>$(1); \
276 fi; \
277 if [ "$(USB)" = "USB" ]; then \
278 sed -i "/TCONFIG_USB is not set/d" $(1); \
279 echo "TCONFIG_USB=y" >>$(1); \
280 if [ "$(USBEXTRAS)" = "y" ]; then \
281 sed -i "/TCONFIG_USB_EXTRAS/d" $(1); \
282 echo "TCONFIG_USB_EXTRAS=y" >>$(1); \
283 fi; \
284 if [ "$(NTFS)" = "y" ]; then \
285 sed -i "/TCONFIG_NTFS/d" $(1); \
286 echo "TCONFIG_NTFS=y" >>$(1); \
287 fi; \
288 if [ "$(MEDIASRV)" = "y" ]; then \
289 sed -i "/TCONFIG_MEDIA_SERVER/d" $(1); \
290 echo "TCONFIG_MEDIA_SERVER=y" >>$(1); \
291 fi; \
292 else \
293 sed -i "/TCONFIG_USB=y/d" $(1); \
294 echo "# TCONFIG_USB is not set" >>$(1); \
295 fi; \
296 if [ "$(NO_SAMBA)" = "y" ]; then \
297 sed -i "/TCONFIG_SAMBASRV/d" $(1); \
298 echo "# TCONFIG_SAMBASRV is not set" >>$(1); \
299 fi; \
300 if [ "$(NO_ZEBRA)" = "y" ]; then \
301 sed -i "/TCONFIG_ZEBRA/d" $(1); \
302 echo "# TCONFIG_ZEBRA is not set" >>$(1); \
303 fi; \
304 if [ "$(NO_JFFS)" = "y" ]; then \
305 sed -i "/TCONFIG_JFFS2/d" $(1); \
306 echo "# TCONFIG_JFFS2 is not set" >>$(1); \
307 sed -i "/TCONFIG_JFFSV1/d" $(1); \
308 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
309 fi; \
310 if [ "$(NO_CIFS)" = "y" ]; then \
311 sed -i "/TCONFIG_CIFS/d" $(1); \
312 echo "# TCONFIG_CIFS is not set" >>$(1); \
313 fi; \
314 if [ "$(NO_SSH)" = "y" ]; then \
315 sed -i "/TCONFIG_SSH/d" $(1); \
316 echo "# TCONFIG_SSH is not set" >>$(1); \
317 fi; \
318 if [ "$(NO_HTTPS)" = "y" ]; then \
319 sed -i "/TCONFIG_HTTPS/d" $(1); \
320 echo "# TCONFIG_HTTPS is not set" >>$(1); \
321 fi; \
322 if [ "$(NO_XXTP)" = "y" ]; then \
323 sed -i "/TCONFIG_L2TP/d" $(1); \
324 echo "# TCONFIG_L2TP is not set" >>$(1); \
325 sed -i "/TCONFIG_PPTP/d" $(1); \
326 echo "# TCONFIG_PPTP is not set" >>$(1); \
327 fi; \
328 if [ "$(NO_LIBOPT)" = "y" ]; then \
329 sed -i "/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
330 echo "# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
331 fi; \
332 if [ "$(EBTABLES)" = "y" ]; then \
333 sed -i "/TCONFIG_EBTABLES/d" $(1); \
334 echo "TCONFIG_EBTABLES=y" >>$(1); \
335 fi; \
336 if [ "$(IPV6SUPP)" = "y" ]; then \
337 sed -i "/TCONFIG_IPV6/d" $(1); \
338 echo "TCONFIG_IPV6=y" >>$(1); \
339 fi; \
340 if [ "$(NOCAT)" = "y" ]; then \
341 sed -i "/TCONFIG_NOCAT/d" $(1); \
342 echo "TCONFIG_NOCAT=y" >>$(1); \
343 fi; \
344 if [ "$(OPENVPN)" = "y" ]; then \
345 sed -i "/TCONFIG_LZO/d" $(1); \
346 echo "TCONFIG_LZO=y" >>$(1); \
347 sed -i "/TCONFIG_OPENVPN/d" $(1); \
348 echo "TCONFIG_OPENVPN=y" >>$(1); \
349 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
350 sed -i "/TCONFIG_FTP_SSL/d" $(1); \
351 echo "TCONFIG_FTP_SSL=y" >>$(1); \
352 fi; \
353 fi; \
354 if [ "$(SNMP)" = "y" ]; then \
355 sed -i "/TCONFIG_SNMP/d" $(1); \
356 echo "TCONFIG_SNMP=y" >>$(1); \
357 fi; \
359 endef
361 define BusyboxOptions
362 @( \
363 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
364 sed -i "/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
365 echo "# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
366 sed -i "/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
367 echo "CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
368 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
369 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
370 sed -i "/CONFIG_MKNOD/d" $(1); \
371 echo "CONFIG_MKNOD=y" >>$(1); \
372 sed -i "/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
373 echo "CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
374 fi; \
375 if [ "$(NO_CIFS)" = "y" ]; then \
376 sed -i "/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
377 echo "# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
378 fi; \
379 if [ "$(BBEXTRAS)" = "y" ]; then \
380 sed -i "/CONFIG_SENDMAIL/d" $(1); \
381 echo "CONFIG_SENDMAIL=y" >>$(1); \
382 sed -i "/CONFIG_FEATURE_SORT_BIG/d" $(1); \
383 echo "CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
384 sed -i "/CONFIG_FTPPUT/d" $(1); \
385 echo "CONFIG_FTPPUT=y" >>$(1); \
386 sed -i "/CONFIG_FTPGET/d" $(1); \
387 echo "CONFIG_FTPGET=y" >>$(1); \
388 sed -i "/CONFIG_CLEAR/d" $(1); \
389 echo "CONFIG_CLEAR=y" >>$(1); \
390 sed -i "/CONFIG_NICE/d" $(1); \
391 echo "CONFIG_NICE=y" >>$(1); \
392 sed -i "/CONFIG_SETCONSOLE/d" $(1); \
393 echo "CONFIG_SETCONSOLE=y" >>$(1); \
394 sed -i "/CONFIG_MKFIFO/d" $(1); \
395 echo "CONFIG_MKFIFO=y" >>$(1); \
396 fi; \
397 if [ "$(USB)" = "USB" ]; then \
398 if [ "$(USBEXTRAS)" = "y" ]; then \
399 sed -i "/CONFIG_E2FSCK/d" $(1); \
400 echo "CONFIG_E2FSCK=y" >>$(1); \
401 sed -i "/CONFIG_MKE2FS/d" $(1); \
402 echo "CONFIG_MKE2FS=y" >>$(1); \
403 sed -i "/CONFIG_FDISK/d" $(1); \
404 echo "CONFIG_FDISK=y" >>$(1); \
405 sed -i "/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
406 echo "CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
407 sed -i "/CONFIG_MKFS_VFAT/d" $(1); \
408 echo "CONFIG_MKFS_VFAT=y" >>$(1); \
409 sed -i "/CONFIG_MKSWAP/d" $(1); \
410 echo "CONFIG_MKSWAP=y" >>$(1); \
411 sed -i "/CONFIG_FLOCK/d" $(1); \
412 echo "CONFIG_FLOCK=y" >>$(1); \
413 sed -i "/CONFIG_FSYNC/d" $(1); \
414 echo "CONFIG_FSYNC=y" >>$(1); \
415 sed -i "/CONFIG_UNZIP/d" $(1); \
416 echo "CONFIG_UNZIP=y" >>$(1); \
417 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
418 sed -i "/CONFIG_LSUSB/d" $(1); \
419 echo "CONFIG_LSUSB=y" >>$(1); \
420 sed -i "/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
421 echo "CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
422 sed -i "/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
423 echo "CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
424 fi; \
425 fi; \
426 else \
427 sed -i "/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
428 echo "# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
429 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
430 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
431 sed -i "/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
432 echo "# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
433 sed -i "/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
434 echo "# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
435 sed -i "/CONFIG_VOLUMEID/d" $(1); \
436 echo "# CONFIG_VOLUMEID is not set" >>$(1); \
437 sed -i "/CONFIG_BLKID/d" $(1); \
438 echo "# CONFIG_BLKID is not set" >>$(1); \
439 sed -i "/CONFIG_SWAPONOFF/d" $(1); \
440 echo "# CONFIG_SWAPONOFF is not set" >>$(1); \
441 sed -i "/CONFIG_CHROOT/d" $(1); \
442 echo "# CONFIG_CHROOT is not set" >>$(1); \
443 sed -i "/CONFIG_PIVOT_ROOT/d" $(1); \
444 echo "# CONFIG_PIVOT_ROOT is not set" >>$(1); \
445 sed -i "/CONFIG_TRUE/d" $(1); \
446 echo "# CONFIG_TRUE is not set" >>$(1); \
447 fi; \
448 if [ "$(IPV6SUPP)" = "y" ]; then \
449 sed -i "/CONFIG_FEATURE_IPV6/d" $(1); \
450 echo "CONFIG_FEATURE_IPV6=y" >>$(1); \
451 sed -i "/CONFIG_PING6/d" $(1); \
452 echo "CONFIG_PING6=y" >>$(1); \
453 sed -i "/CONFIG_TRACEROUTE6/d" $(1); \
454 echo "CONFIG_TRACEROUTE6=y" >>$(1); \
455 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
456 sed -i "/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
457 echo "CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
458 fi; \
459 fi; \
460 if [ "$(SLIM)" = "y" ]; then \
461 sed -i "/CONFIG_AWK/d" $(1); \
462 echo "# CONFIG_AWK is not set" >>$(1); \
463 sed -i "/CONFIG_BASENAME/d" $(1); \
464 echo "# CONFIG_BASENAME is not set" >>$(1); \
465 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
466 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
467 sed -i "/CONFIG_BLKID/d" $(1); \
468 echo "# CONFIG_BLKID is not set" >>$(1); \
469 sed -i "/CONFIG_TELNET=y/d" $(1); \
470 echo "# CONFIG_TELNET is not set" >>$(1); \
471 sed -i "/CONFIG_ARPING/d" $(1); \
472 echo "# CONFIG_ARPING is not set" >>$(1); \
473 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
474 echo "# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
475 sed -i "/CONFIG_CHOWN/d" $(1); \
476 echo "# CONFIG_CHOWN is not set" >>$(1); \
477 else \
478 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
479 echo "CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
480 sed -i "/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
481 echo "CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
482 fi; \
484 endef
486 define KernelConfig
487 @( \
488 sed -i "/CONFIG_NVRAM_SIZE/d" $(1); \
489 echo "CONFIG_NVRAM_SIZE="$(NVRAM_SIZE) >>$(1); \
490 sed -i "/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
491 if [ "$(KERN_SIZE_OPT)" = "y" ]; then \
492 echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
493 else \
494 echo "# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
495 fi; \
496 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
497 sed -i "/CONFIG_CPU_MIPS32_R1/d" $(1); \
498 echo "# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
499 sed -i "/CONFIG_CPU_MIPS32_R2/d" $(1); \
500 echo "CONFIG_CPU_MIPS32_R2=y" >>$(1); \
501 sed -i "/CONFIG_CPU_MIPSR1/d" $(1); \
502 echo "CONFIG_CPU_MIPSR2=y" >>$(1); \
503 fi; \
504 if [ "$(USB)" = "" ]; then \
505 sed -i "/CONFIG_EFI_PARTITION/d" $(1); \
506 echo "# CONFIG_EFI_PARTITION is not set" >>$(1); \
507 fi; \
508 if [ "$(IPV6SUPP)" = "y" ]; then \
509 sed -i "/CONFIG_IPV6 is not set/d" $(1); \
510 echo "CONFIG_IPV6=y" >>$(1); \
511 sed -i "/CONFIG_IP6_NF_IPTABLES/d" $(1); \
512 echo "CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
513 sed -i "/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
514 echo "CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
515 sed -i "/CONFIG_IP6_NF_FILTER/d" $(1); \
516 echo "CONFIG_IP6_NF_FILTER=m" >>$(1); \
517 sed -i "/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
518 echo "CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
519 sed -i "/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
520 echo "CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
521 sed -i "/CONFIG_IP6_NF_MANGLE/d" $(1); \
522 echo "CONFIG_IP6_NF_MANGLE=m" >>$(1); \
523 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
524 sed -i "/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
525 echo "CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
526 sed -i "/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
527 echo "CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
528 sed -i "/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
529 echo "CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
530 sed -i "/CONFIG_IPV6_SIT/d" $(1); \
531 echo "CONFIG_IPV6_SIT=m" >>$(1); \
532 sed -i "/CONFIG_IPV6_SIT_6RD/d" $(1); \
533 echo "CONFIG_IPV6_SIT_6RD=y" >>$(1); \
534 sed -i "/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
535 echo "CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
536 sed -i "/CONFIG_IP6_NF_RAW/d" $(1); \
537 echo "CONFIG_IP6_NF_RAW=m" >>$(1); \
538 sed -i "/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
539 echo "CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
540 sed -i "/CONFIG_IPV6_MROUTE/d" $(1); \
541 echo "CONFIG_IPV6_MROUTE=y" >>$(1); \
542 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
543 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
544 else \
545 sed -i "/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
546 echo "CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
547 sed -i "/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
548 echo "CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
549 sed -i "/CONFIG_IP6_NF_FTP/d" $(1); \
550 echo "CONFIG_IP6_NF_FTP=m" >>$(1); \
551 sed -i "/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
552 echo "CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
553 sed -i "/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
554 echo "CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
555 sed -i "/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
556 echo "CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
557 sed -i "/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
558 echo "CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
559 sed -i "/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
560 echo "CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
561 sed -i "/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
562 echo "CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
563 sed -i "/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
564 echo "CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
565 sed -i "/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
566 echo "CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
567 sed -i "/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
568 echo "CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
569 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
570 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
571 fi; \
572 fi; \
573 sed -i "/CONFIG_BCM57XX/d" $(1); \
574 if [ "$(BCM57)" = "y" ]; then \
575 echo "CONFIG_BCM57XX=m" >>$(1); \
576 else \
577 echo "# CONFIG_BCM57XX is not set" >>$(1); \
578 fi; \
579 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
580 sed -i "/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
581 echo "CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
582 if [ "$(IPV6SUPP)" = "y" ]; then \
583 sed -i "/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
584 echo "CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
585 fi; \
586 fi; \
588 endef
591 bin:
592 ifeq ($(B),)
593 @echo $@" is not a valid target!"
594 @false
595 endif
596 @cp router/config_base router/config_$(lowercase_B)
597 @cp router/busybox/config_base router/busybox/config_$(lowercase_B)
598 @cp $(LINUXDIR)/config_base $(LINUXDIR)/config_$(lowercase_B)
600 $(call RouterOptions, router/config_$(lowercase_B))
601 $(call KernelConfig, $(LINUXDIR)/config_$(lowercase_B))
602 $(call BusyboxOptions, router/busybox/config_$(lowercase_B))
604 @$(MAKE) setprofile N=$(TPROFILE) B=$(B) DESC="$(BUILD_DESC)" USB="$(USB)"
605 @$(MAKE) all
607 ## Make the "normal" build
609 @$(MAKE) bin B=A BUILD_DESC="Std" USB="USB" SNMP="$(SNMP)
611 ## Make the "normal but without SSH" build
613 @$(MAKE) bin NO_SSH=y B=B BUILD_DESC="No SSH" USB="USB"
615 ## Make the "normal but without CIFS" build
617 @$(MAKE) bin NO_CIFS=y B=C BUILD_DESC="No CIFS" USB="USB"
619 ## Make the "normal but without SAMBA" (Lite) build
621 ifeq ($(CONFIG_LINUX26),y)
622 @$(MAKE) bin NO_SAMBA=y SLIM=y NO_CIFS=y NO_JFFS=y NO_ZEBRA=y B=D BUILD_DESC="Lite" USB="USB"
623 else
624 @$(MAKE) bin NO_SAMBA=y SLIM=y B=D BUILD_DESC="Lite" USB="USB"
625 endif
627 ## Make the "normal (with NTFS support) + VPN" build
629 ifeq ($(CONFIG_LINUX26),y)
630 @$(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
631 else
632 @$(MAKE) bin OPENVPN=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y
633 endif
635 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
637 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y SLIM=y B=F BUILD_DESC="Mini" USB=""
640 @$(MAKE) bin NO_CIFS=y NO_JFFS=y NO_ZEBRA=y SLIM=y B=FS BUILD_DESC="Tiny" USB=""
642 ifeq ($(CONFIG_LINUX26),y)
643 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
645 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y IPV6SUPP=y B=I BUILD_DESC="MiniIPv6" USB=""
646 endif
648 ifeq ($(CONFIG_LINUX26),y)
649 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
651 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_XXTP=y SLIM=y NO_SAMBA=y NO_ZEBRA=y IPV6SUPP=y OPENVPN=y NO_LIBOPT=y B=I BUILD_DESC="MiniIPv6-VPN" USB=""
652 endif
654 ## Make the "normal with Extras and NTFS" build
656 ifeq ($(CONFIG_LINUX26),y)
657 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y SNMP=y IPV6SUPP=y B=M BUILD_DESC="Ext" USB="USB"
658 else
659 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y SNMP=y B=M BUILD_DESC="Ext" USB="USB"
660 endif
662 ## Roadkill
663 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
665 ifeq ($(CONFIG_LINUX26),y)
666 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=NC BUILD_DESC="$(VPN)" USB="USB" SNMP=y NOCAT=y BUILD_DESC+="-$(NC)"
667 else
668 @$(MAKE) bin OPENVPN=y NTFS=y B=NC BUILD_DESC="$(VPN)" USB="USB" NOCAT=y BUILD_DESC+=" $(NC)"
669 endif
671 ## Toastman
672 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
673 ncm:
674 @$(MAKE) bin JFFSv1=y NOCAT=y B=F BUILD_DESC="Mini-NOCAT" USB=""
676 ## Toastman
677 ## Make the "normal" build + NOCAT
678 ncs:
679 @$(MAKE) bin NOCAT=y B=A BUILD_DESC="Std-NOCAT" USB="USB"
681 ## Make the "No USB" build
683 ifeq ($(CONFIG_LINUX26),y)
684 @$(MAKE) bin JFFSv1=y $(if $(filter r2, $(MIPS32)),,BCM57=y) B=S BUILD_DESC="Std" USB="" SNMP=y
685 else
686 @$(MAKE) bin BBEXTRAS=y BCM57=y B=S BUILD_DESC="Std" USB="" SNMP=y
687 endif
689 ## Make the "VPN witn no USB support" build
691 ifeq ($(CONFIG_LINUX26),y)
692 @$(MAKE) bin OPENVPN=y NO_JFFS=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y
693 else
694 @$(MAKE) bin OPENVPN=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="$(VPN)" USB="" SNMP=y
695 endif
697 ## Make the "Small VPN with no USB support" build
699 ifeq ($(CONFIG_LINUX26),y)
700 @$(MAKE) bin OPENVPN=y NO_JFFS=y NO_CIFS=y B=V BUILD_DESC="SmallVPN" USB=""
701 else
702 @$(MAKE) bin OPENVPN=y NO_JFFS=y NO_CIFS=y BCM57=y B=VS BUILD_DESC="SmallVPN" USB=""
703 endif
705 ## Make Mips32r2 builds
707 r2a:
708 @$(MAKE) a MIPS32=r2
710 r2b:
711 @$(MAKE) b MIPS32=r2
713 r2c:
714 @$(MAKE) c MIPS32=r2
716 r2d:
717 @$(MAKE) d MIPS32=r2
719 r2e:
720 @$(MAKE) e MIPS32=r2
722 r2f:
723 @$(MAKE) f MIPS32=r2
725 r2i:
726 @$(MAKE) i MIPS32=r2
728 r2j:
729 @$(MAKE) j MIPS32=r2
731 r2m:
732 @$(MAKE) m MIPS32=r2
734 r2n:
735 @$(MAKE) n MIPS32=r2
737 r2nc:
738 @$(MAKE) nc MIPS32=r2
740 r2r:
741 @$(MAKE) r MIPS32=r2
743 r2s:
744 @$(MAKE) s MIPS32=r2
746 r2t:
747 @$(MAKE) t MIPS32=r2
749 r2v:
750 @$(MAKE) v MIPS32=r2
752 n60a:
753 @$(MAKE) r2a NVRAM_SIZE=60 LINKSYS_E=1
755 n60b:
756 @$(MAKE) r2b NVRAM_SIZE=60 LINKSYS_E=1
758 n60c:
759 @$(MAKE) r2c NVRAM_SIZE=60 LINKSYS_E=1
761 n60e:
762 @$(MAKE) r2e NVRAM_SIZE=60 LINKSYS_E=1
764 n60m:
765 @$(MAKE) r2m NVRAM_SIZE=60 LINKSYS_E=y
767 n60n:
768 @$(MAKE) r2n NVRAM_SIZE=60 LINKSYS_E=1
770 n60nc:
771 @$(MAKE) r2nc NVRAM_SIZE=60 LINKSYS_E=1
773 n60o:
774 @$(MAKE) r2o NVRAM_SIZE=60 LINKSYS_E=1
776 n60r:
777 @$(MAKE) r2r NVRAM_SIZE=60 LINKSYS_E=1
779 n60s:
780 @$(MAKE) bin MIPS32=r2 B=S USB="" NVRAM_SIZE=60 LINKSYS_E=y BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y BUILD_DESC="Std"
782 60t:
783 @$(MAKE) r2t NVRAM_SIZE=60 LINKSYS_E=1
785 n60v:
786 @$(MAKE) bin MIPS32=r2 B=V USB="" NVRAM_SIZE=60 LINKSYS_E=y BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y OPENVPN=y BUILD_DESC="$(VPN)"
788 setprofile:
789 echo '#ifndef TOMATO_PROFILE' > router/shared/tomato_profile.h
790 echo '#define TOMATO_$(N) 1' >> router/shared/tomato_profile.h
791 echo '#define PROFILE_G 1' >> router/shared/tomato_profile.h
792 echo '#define PROFILE_N 2' >> router/shared/tomato_profile.h
793 echo '#define TOMATO_PROFILE PROFILE_$(N)' >> router/shared/tomato_profile.h
794 echo '#define TOMATO_PROFILE_NAME "$(N)"' >> router/shared/tomato_profile.h
795 echo '#define TOMATO_BUILD_NAME "$(B)"' >> router/shared/tomato_profile.h
796 echo '#define TOMATO_BUILD_DESC "$(DESC)"' >> router/shared/tomato_profile.h
797 echo '#ifndef CONFIG_NVRAM_SIZE' >> router/shared/tomato_profile.h
798 echo '#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router/shared/tomato_profile.h
799 echo '#endif' >> router/shared/tomato_profile.h
800 echo '#endif' >> router/shared/tomato_profile.h
802 echo 'TOMATO_$(N) = 1' > tomato_profile.mak
803 echo 'PROFILE_G = 1' >> tomato_profile.mak
804 echo 'PROFILE_N = 2' >> tomato_profile.mak
805 echo 'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
806 echo 'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
807 echo 'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
808 echo 'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
809 echo 'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
810 echo 'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
811 echo 'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
812 echo 'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
814 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
816 # Note that changes to variables in tomato_profile.mak don't
817 # get propogated to this invocation of make!
818 @echo ""
819 @echo "Using $(N) profile, $(B) build config."
820 @echo ""
822 @cd $(LINUXDIR) ; \
823 rm -f config_current ; \
824 ln -s config_$(lowercase_B) config_current ; \
825 cp -f config_current .config
827 @cd router/busybox && \
828 rm -f config_current ; \
829 ln -s config_$(lowercase_B) config_current ; \
830 cp config_current .config
832 @cd router ; \
833 rm -f config_current ; \
834 ln -s config_$(lowercase_B) config_current ; \
835 cp config_current .config
837 @$(MAKE) -C router oldconfig
839 help:
840 @echo "a A build (standard)"
841 @echo "b B build (standard minus SSH)"
842 @echo "c C build (standard minus CIFS)"
843 @echo "d D build (standard minus Samba server)"
844 @echo "m M build (standard plus extra utilities and NTFS support)"
845 @echo "nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
846 @echo "ncm NCS build (no USB support, NOCAT)"
847 @echo "ncs NCS build (std + NOCAT)"
848 @echo "m Ext - (standard plus extra utilities SNMP and NTFS support)"
850 ifeq ($(CONFIG_LINUX26),y)
851 @echo "e E build (standard plus VPN, extra utilities and NTFS support)"
852 @echo "i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
853 else
854 @echo "e E build (standard plus VPN and NTFS support + SNMP)"
855 endif
856 @echo "f F build (no USB support minus CIFS and RIPv1/2)"
857 @echo "fs FS build (no USB support minus JFFS, CIFS and RIPv1/2)"
858 @echo "s S build (no USB support) + SNMP"
859 @echo "v V build (VPN with no USB support)"
860 @echo "vs VS build (small VPN with no USB support)"
862 ifeq ($(CONFIG_LINUX26),y)
863 @echo "r2a MIPS Release 2 A build (standard)"
864 @echo "r2e MIPS Release 2 E build (standard plus VPN SNMP NTFS and extras)"
865 @echo "r2f MIPS Release 2 F build (no USB support minus CIFS and RIPv1/2)"
866 @echo "r2i MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
867 @echo "r2m MIPS Release 2 M build (standard plus extras)"
868 @echo "r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
869 @echo "r2s MIPS Release 2 S build (no USB support)"
870 @echo "r2v MIPS Release 2 V build (VPN with no USB support)"
871 @echo "n60m Linksys E-series build (60KB NVRAM, standard plus SNMP + extras)"
872 @echo "n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
873 @echo "n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus SNMP, plus VPN, plus NOCAT)"
874 @echo "n60s Linksys E-series build (60KB NVRAM, SNMP, no USB support)"
875 @echo "n60v Linksys E-series build (60KB NVRAM, VPN with no USB support)"
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 Makefile allversions tomato_profile.mak