add STTY and SEQ to BBEXTRAS, remove FTPPUT and FTPGET from BBEXTRAS (added by default)
[tomato.git] / release / src / Makefile
blob27cb2ee46ca41708ca7d75b83166e6bb56e405b4
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 ifeq ($(NVRAM_SIZE),)
48 NVRAM_SIZE = 0
49 endif
51 -include tomato_profile.mak
53 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
54 # but that's fragile. If you make one certain innocuous change elsewhere in the
55 # makefile(s), the build will silently be wrong. This way it works properly every time.
56 current_BUILD_NAME = $(strip $(shell grep "^TOMATO_BUILD_NAME" tomato_profile.mak | cut -d"=" -f2))
57 current_BUILD_DESC = $(strip $(shell grep "^TOMATO_BUILD_DESC" tomato_profile.mak | cut -d"=" -f2 | sed -e "s/ //g"))
58 current_BUILD_USB = $(strip $(shell grep "^TOMATO_BUILD_USB" tomato_profile.mak | cut -d"=" -f2 | sed -e "s/ //g"))
59 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))
61 uppercase_N = $(shell echo $(N) | tr a-z A-Z)
62 lowercase_N = $(shell echo $(N) | tr A-Z a-z)
63 uppercase_B = $(shell echo $(B) | tr a-z A-Z)
64 lowercase_B = $(shell echo $(B) | tr A-Z a-z)
66 ifeq ($(CONFIG_LINUX26),y)
67 mips_rev = $(if $(filter $(MIPS32),r2),MIPSR2,MIPSR1)
68 KERN_SIZE_OPT ?= n
69 else
70 mips_rev =
71 KERN_SIZE_OPT ?= y
72 endif
74 beta = $(if $(filter $(TOMATO_EXPERIMENTAL),1),-beta,)
76 tomato_ver:
77 @echo ""
78 @btools/uversion.pl --gen $(V1) $(mips_rev)$(beta)$(V2) $(ND) $(current_BUILD_USB) $(current_BUILD_DESC)
80 ifeq ($(TOMATO_BUILD),)
82 all:
83 $(MAKE) a
85 else
87 all: tomato_ver
88 @echo ""
89 @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"
91 @echo ""
92 @echo ""
94 @-mkdir image
95 @$(MAKE) -C router all
96 @$(MAKE) -C router install
97 @$(MAKE) -C btools
99 @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
100 @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
101 ifeq ($(LINKSYS_E),1)
102 @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
103 endif
104 @echo "" >>fpkg.log
105 @echo "***********************" `date` "************************" >>fpkg.log
106 @cat router/shared/tomato_version >>fpkg.log
107 @echo "" >>fpkg.log
108 @cat router/target.info >>fpkg.log
109 ifeq ($(wildcard include/bcm20xx.h),)
110 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
111 -t image/tomato.trx \
112 -l W54G,image/WRT54G_WRT54GL.bin \
113 -l W54S,image/WRT54GS.bin \
114 -l W54s,image/WRT54GSv4.bin \
115 -l W54U,image/WRTSL54GS.bin \
116 -m 0x10577050,image/WR850G.bin \
117 | tee -a fpkg.log
118 else
119 ifeq ($(LINKSYS_E),1)
120 # Linksys E-series build plus generic TRX image
121 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
122 -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 \
123 -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 \
124 -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 \
125 -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 \
126 | tee -a fpkg.log
127 else
128 # Create generic TRX image
129 @btools/fpkg -i lzma-loader/loader.gz -i $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz -a 1024 -i router/mipsel-uclibc/target.image \
130 -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 \
131 | tee -a fpkg.log
132 endif
133 endif
135 @cp fpkg.log image/fpkg-$(V1)$(mips_rev)$(beta)$(V2).log
136 @echo ""
137 @echo "-----------------"
138 @echo `cat router/shared/tomato_version` " ready"
139 @echo "-----------------"
140 ifneq ($(NOVERSION),1)
141 @cp router/shared/tomato_version router/shared/tomato_version_last
142 @btools/uversion.pl --bump
143 endif
144 endif
148 clean:
149 @touch router/.config
150 @rm -f router/config_[a-z]
151 @rm -f router/busybox/config_[a-z]
152 @$(MAKE) -C router $@
153 @-rmdir router/mipsel-uclibc
155 cleanimage:
156 @rm -f fpkg.log
157 @rm -fr image/*
158 @rm -f router/.config
159 @touch router/.config
160 @-mkdir image
162 cleantools:
163 @$(MAKE) -C $(LINUXDIR)/scripts/squashfs clean
164 @$(MAKE) -C btools clean
166 cleankernel:
167 @cd $(LINUXDIR) && \
168 mv .config save-config && \
169 $(MAKE) distclean || true; \
170 cp -p save-config .config || true
172 kernel:
173 @$(MAKE) -C router kernel
174 @ls -l $(LINUXDIR)/arch/mips/brcm-boards/bcm947xx/compressed/zImage
176 distclean: clean cleanimage cleankernel cleantools
177 ifneq ($(INSIDE_MAK),1)
178 @$(MAKE) -C router $@ INSIDE_MAK=1
179 endif
180 mv router/busybox/.config busybox-saved-config || true
181 @$(MAKE) -C router/busybox distclean
182 @rm -f router/busybox/config_current
183 @cp -p busybox-saved-config router/busybox/.config || true
184 @cp -p router/busybox/.config router/busybox/config_current || true
185 @rm -f router/config_current
186 @rm -f router/.config.cmd router/.config.old router/.config
187 @rm -f router/libfoo_xref.txt
188 @rm -f tomato_profile.mak router/shared/tomato_profile.h
189 @touch tomato_profile.mak
190 @touch router/shared/tomato_profile.h
193 prepk:
194 @cd $(LINUXDIR) ; \
195 rm -f config_current ; \
196 ln -s config_base config_current ; \
197 cp -f config_current .config
198 $(MAKE) -C $(LINUXDIR) oldconfig
199 ifneq ($(CONFIG_LINUX26),y)
200 $(MAKE) -C $(LINUXDIR) dep
201 endif
203 what:
204 @echo ""
205 @echo "$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
206 @echo ""
209 # The methodology for making the different builds is to
210 # copy the "base" config file to the "target" config file in
211 # the appropriate directory, and then edit it by removing and
212 # inserting the desired configuration lines.
213 # You can't just delete the "whatever=y" line, you must have
214 # a "...is not set" line, or the make oldconfig will stop and ask
215 # what to do.
217 # Options for "make bin" :
218 # BUILD_DESC (Std|Lite|Ext|...)
219 # MIPS32 (r2|r1)
220 # KERN_SIZE_OPT
221 # USB ("USB"|"")
222 # JFFSv1 | NO_JFFS
223 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT
224 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM, NOCAT
225 # NFS BTCLIENT BTGUI TR_EXTRAS SNMP NO_CMON
227 define RouterOptions
228 @( \
229 if [ "$(CONFIG_LINUX26)" = "y" ] || [ "$(SAMBA3)" = "y" ]; then \
230 sed -i "/TCONFIG_SAMBA3/d" $(1); \
231 echo "TCONFIG_SAMBA3=y" >>$(1); \
232 fi; \
233 sed -i "/TCONFIG_EMF/d" $(1); \
234 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
235 if [ "$(SLIM)" = "y" ]; then \
236 echo "# TCONFIG_EMF is not set" >>$(1); \
237 else \
238 echo "TCONFIG_EMF=y" >>$(1); \
239 fi; \
240 else \
241 echo "# TCONFIG_EMF is not set" >>$(1); \
242 fi; \
243 sed -i "/TCONFIG_JFFSV1/d" $(1); \
244 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
245 if [ "$(JFFSv1)" = "y" ]; then \
246 echo "TCONFIG_JFFSV1=y" >>$(1); \
247 else \
248 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
249 fi; \
250 else \
251 echo "TCONFIG_JFFSV1=y" >>$(1); \
252 fi; \
253 if [ "$(USB)" = "USB" ]; then \
254 sed -i "/TCONFIG_USB is not set/d" $(1); \
255 echo "TCONFIG_USB=y" >>$(1); \
256 if [ "$(USBEXTRAS)" = "y" ]; then \
257 sed -i "/TCONFIG_USB_EXTRAS/d" $(1); \
258 echo "TCONFIG_USB_EXTRAS=y" >>$(1); \
259 fi; \
260 if [ "$(NTFS)" = "y" ]; then \
261 sed -i "/TCONFIG_NTFS/d" $(1); \
262 echo "TCONFIG_NTFS=y" >>$(1); \
263 fi; \
264 if [ "$(MEDIASRV)" = "y" ]; then \
265 sed -i "/TCONFIG_MEDIA_SERVER/d" $(1); \
266 echo "TCONFIG_MEDIA_SERVER=y" >>$(1); \
267 fi; \
268 else \
269 sed -i "/TCONFIG_USB=y/d" $(1); \
270 echo "# TCONFIG_USB is not set" >>$(1); \
271 fi; \
272 if [ "$(NO_SAMBA)" = "y" ]; then \
273 sed -i "/TCONFIG_SAMBASRV/d" $(1); \
274 echo "# TCONFIG_SAMBASRV is not set" >>$(1); \
275 fi; \
276 if [ "$(NO_ZEBRA)" = "y" ]; then \
277 sed -i "/TCONFIG_ZEBRA/d" $(1); \
278 echo "# TCONFIG_ZEBRA is not set" >>$(1); \
279 fi; \
280 if [ "$(NO_JFFS)" = "y" ]; then \
281 sed -i "/TCONFIG_JFFS2/d" $(1); \
282 echo "# TCONFIG_JFFS2 is not set" >>$(1); \
283 sed -i "/TCONFIG_JFFSV1/d" $(1); \
284 echo "# TCONFIG_JFFSV1 is not set" >>$(1); \
285 fi; \
286 if [ "$(NO_CIFS)" = "y" ]; then \
287 sed -i "/TCONFIG_CIFS/d" $(1); \
288 echo "# TCONFIG_CIFS is not set" >>$(1); \
289 fi; \
290 if [ "$(NO_SSH)" = "y" ]; then \
291 sed -i "/TCONFIG_SSH/d" $(1); \
292 echo "# TCONFIG_SSH is not set" >>$(1); \
293 fi; \
294 if [ "$(NO_HTTPS)" = "y" ]; then \
295 sed -i "/TCONFIG_HTTPS/d" $(1); \
296 echo "# TCONFIG_HTTPS is not set" >>$(1); \
297 fi; \
298 if [ "$(NO_XXTP)" = "y" ]; then \
299 sed -i "/TCONFIG_L2TP/d" $(1); \
300 echo "# TCONFIG_L2TP is not set" >>$(1); \
301 sed -i "/TCONFIG_PPTP/d" $(1); \
302 echo "# TCONFIG_PPTP is not set" >>$(1); \
303 fi; \
304 if [ "$(NO_LIBOPT)" = "y" ]; then \
305 sed -i "/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
306 echo "# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
307 fi; \
308 if [ "$(EBTABLES)" = "y" ]; then \
309 sed -i "/TCONFIG_EBTABLES/d" $(1); \
310 echo "TCONFIG_EBTABLES=y" >>$(1); \
311 fi; \
312 if [ "$(IPV6SUPP)" = "y" ]; then \
313 sed -i "/TCONFIG_IPV6/d" $(1); \
314 echo "TCONFIG_IPV6=y" >>$(1); \
315 fi; \
316 if [ "$(NOCAT)" = "y" ]; then \
317 sed -i "/TCONFIG_NOCAT/d" $(1); \
318 echo "TCONFIG_NOCAT=y" >>$(1); \
319 fi; \
320 if [ "$(OPENVPN)" = "y" ]; then \
321 sed -i "/TCONFIG_LZO/d" $(1); \
322 echo "TCONFIG_LZO=y" >>$(1); \
323 sed -i "/TCONFIG_OPENVPN/d" $(1); \
324 echo "TCONFIG_OPENVPN=y" >>$(1); \
325 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
326 sed -i "/TCONFIG_FTP_SSL/d" $(1); \
327 echo "TCONFIG_FTP_SSL=y" >>$(1); \
328 fi; \
329 fi; \
330 if [ "$(BTCLIENT)" = "y" ]; then \
331 sed -i "/TCONFIG_BT/d" $(1); \
332 echo "TCONFIG_BT=y" >>$(1); \
333 sed -i "/TCONFIG_BBT/d" $(1); \
334 echo "TCONFIG_BBT=y" >>$(1); \
335 fi; \
336 if [ "$(BTGUI)" = "y" ]; then \
337 sed -i "/TCONFIG_BT/d" $(1); \
338 echo "TCONFIG_BT=y" >>$(1); \
339 fi; \
340 if [ "$(TR_EXTRAS)" = "y" ]; then \
341 sed -i "/TCONFIG_TR_EXTRAS/d" $(1); \
342 echo "TCONFIG_TR_EXTRAS=y" >>$(1); \
343 fi; \
344 if [ "$(NFS)" = "y" ]; then \
345 sed -i "/TCONFIG_NFS/d" $(1); \
346 echo "TCONFIG_NFS=y" >>$(1); \
347 fi; \
348 if [ "$(SNMP)" = "y" ]; then \
349 sed -i "/TCONFIG_SNMP/d" $(1); \
350 echo "TCONFIG_SNMP=y" >>$(1); \
351 fi; \
352 if [ "$(NO_CMON)" = "y" ]; then \
353 sed -i "/TCONFIG_CMON/d" $(1); \
354 echo "# TCONFIG_CMON is not set" >>$(1); \
355 fi; \
357 endef
359 define BusyboxOptions
360 @( \
361 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
362 sed -i "/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
363 echo "# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
364 sed -i "/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
365 echo "CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
366 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
367 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
368 sed -i "/CONFIG_MKNOD/d" $(1); \
369 echo "CONFIG_MKNOD=y" >>$(1); \
370 sed -i "/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
371 echo "CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
372 fi; \
373 if [ "$(NO_CIFS)" = "y" ]; then \
374 sed -i "/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
375 echo "# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
376 fi; \
377 if [ "$(BBEXTRAS)" = "y" ]; then \
378 sed -i "/CONFIG_SENDMAIL/d" $(1); \
379 echo "CONFIG_SENDMAIL=y" >>$(1); \
380 sed -i "/CONFIG_FEATURE_SORT_BIG/d" $(1); \
381 echo "CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
382 sed -i "/CONFIG_CLEAR/d" $(1); \
383 echo "CONFIG_CLEAR=y" >>$(1); \
384 sed -i "/CONFIG_NICE/d" $(1); \
385 echo "CONFIG_NICE=y" >>$(1); \
386 sed -i "/CONFIG_SETCONSOLE/d" $(1); \
387 echo "CONFIG_SETCONSOLE=y" >>$(1); \
388 sed -i "/CONFIG_SEQ/d" $(1); \
389 echo "CONFIG_SEQ=y" >>$(1); \
390 sed -i "/CONFIG_STTY/d" $(1); \
391 echo "CONFIG_STTY=y" >>$(1); \
392 fi; \
393 if [ "$(USB)" = "USB" ]; then \
394 if [ "$(USBEXTRAS)" = "y" ]; then \
395 sed -i "/CONFIG_E2FSCK/d" $(1); \
396 echo "CONFIG_E2FSCK=y" >>$(1); \
397 sed -i "/CONFIG_MKE2FS/d" $(1); \
398 echo "CONFIG_MKE2FS=y" >>$(1); \
399 sed -i "/CONFIG_FDISK/d" $(1); \
400 echo "CONFIG_FDISK=y" >>$(1); \
401 sed -i "/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
402 echo "CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
403 sed -i "/CONFIG_MKFS_VFAT/d" $(1); \
404 echo "CONFIG_MKFS_VFAT=y" >>$(1); \
405 sed -i "/CONFIG_MKSWAP/d" $(1); \
406 echo "CONFIG_MKSWAP=y" >>$(1); \
407 sed -i "/CONFIG_FLOCK/d" $(1); \
408 echo "CONFIG_FLOCK=y" >>$(1); \
409 sed -i "/CONFIG_FSYNC/d" $(1); \
410 echo "CONFIG_FSYNC=y" >>$(1); \
411 sed -i "/CONFIG_UNZIP/d" $(1); \
412 echo "CONFIG_UNZIP=y" >>$(1); \
413 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
414 sed -i "/CONFIG_LSUSB/d" $(1); \
415 echo "CONFIG_LSUSB=y" >>$(1); \
416 sed -i "/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
417 echo "CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
418 sed -i "/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
419 echo "CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
420 fi; \
421 fi; \
422 else \
423 sed -i "/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
424 echo "# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
425 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
426 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
427 sed -i "/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
428 echo "# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
429 sed -i "/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
430 echo "# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
431 sed -i "/CONFIG_VOLUMEID/d" $(1); \
432 echo "# CONFIG_VOLUMEID is not set" >>$(1); \
433 sed -i "/CONFIG_BLKID/d" $(1); \
434 echo "# CONFIG_BLKID is not set" >>$(1); \
435 sed -i "/CONFIG_SWAPONOFF/d" $(1); \
436 echo "# CONFIG_SWAPONOFF is not set" >>$(1); \
437 sed -i "/CONFIG_CHROOT/d" $(1); \
438 echo "# CONFIG_CHROOT is not set" >>$(1); \
439 sed -i "/CONFIG_PIVOT_ROOT/d" $(1); \
440 echo "# CONFIG_PIVOT_ROOT is not set" >>$(1); \
441 sed -i "/CONFIG_TRUE/d" $(1); \
442 echo "# CONFIG_TRUE is not set" >>$(1); \
443 fi; \
444 if [ "$(IPV6SUPP)" = "y" ]; then \
445 sed -i "/CONFIG_FEATURE_IPV6/d" $(1); \
446 echo "CONFIG_FEATURE_IPV6=y" >>$(1); \
447 sed -i "/CONFIG_PING6/d" $(1); \
448 echo "CONFIG_PING6=y" >>$(1); \
449 sed -i "/CONFIG_TRACEROUTE6/d" $(1); \
450 echo "CONFIG_TRACEROUTE6=y" >>$(1); \
451 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
452 sed -i "/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
453 echo "CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
454 fi; \
455 fi; \
456 if [ "$(SLIM)" = "y" ]; then \
457 sed -i "/CONFIG_AWK/d" $(1); \
458 echo "# CONFIG_AWK is not set" >>$(1); \
459 sed -i "/CONFIG_BASENAME/d" $(1); \
460 echo "# CONFIG_BASENAME is not set" >>$(1); \
461 sed -i "/CONFIG_FEATURE_DEVFS/d" $(1); \
462 echo "# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
463 sed -i "/CONFIG_BLKID/d" $(1); \
464 echo "# CONFIG_BLKID is not set" >>$(1); \
465 sed -i "/CONFIG_TELNET=y/d" $(1); \
466 echo "# CONFIG_TELNET is not set" >>$(1); \
467 sed -i "/CONFIG_ARPING/d" $(1); \
468 echo "# CONFIG_ARPING is not set" >>$(1); \
469 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
470 echo "# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
471 sed -i "/CONFIG_CHOWN/d" $(1); \
472 echo "# CONFIG_CHOWN is not set" >>$(1); \
473 else \
474 sed -i "/CONFIG_FEATURE_LS_COLOR/d" $(1); \
475 echo "CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
476 sed -i "/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
477 echo "CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
478 fi; \
480 endef
482 define KernelConfig
483 @( \
484 sed -i "/CONFIG_NVRAM_SIZE/d" $(1); \
485 echo "CONFIG_NVRAM_SIZE="$(NVRAM_SIZE) >>$(1); \
486 sed -i "/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
487 if [ "$(KERN_SIZE_OPT)" = "y" ]; then \
488 echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
489 else \
490 echo "# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
491 fi; \
492 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
493 sed -i "/CONFIG_CPU_MIPS32_R1/d" $(1); \
494 echo "# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
495 sed -i "/CONFIG_CPU_MIPS32_R2/d" $(1); \
496 echo "CONFIG_CPU_MIPS32_R2=y" >>$(1); \
497 sed -i "/CONFIG_CPU_MIPSR1/d" $(1); \
498 echo "CONFIG_CPU_MIPSR2=y" >>$(1); \
499 fi; \
500 if [ "$(USB)" = "" ]; then \
501 sed -i "/CONFIG_EFI_PARTITION/d" $(1); \
502 echo "# CONFIG_EFI_PARTITION is not set" >>$(1); \
503 fi; \
504 if [ "$(IPV6SUPP)" = "y" ]; then \
505 sed -i "/CONFIG_IPV6 is not set/d" $(1); \
506 echo "CONFIG_IPV6=y" >>$(1); \
507 sed -i "/CONFIG_IP6_NF_IPTABLES/d" $(1); \
508 echo "CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
509 sed -i "/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
510 echo "CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
511 sed -i "/CONFIG_IP6_NF_FILTER/d" $(1); \
512 echo "CONFIG_IP6_NF_FILTER=m" >>$(1); \
513 sed -i "/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
514 echo "CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
515 sed -i "/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
516 echo "CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
517 sed -i "/CONFIG_IP6_NF_MANGLE/d" $(1); \
518 echo "CONFIG_IP6_NF_MANGLE=m" >>$(1); \
519 if [ "$(CONFIG_LINUX26)" = "y" ]; then \
520 sed -i "/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
521 echo "CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
522 sed -i "/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
523 echo "CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
524 sed -i "/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
525 echo "CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
526 sed -i "/CONFIG_IPV6_SIT/d" $(1); \
527 echo "CONFIG_IPV6_SIT=m" >>$(1); \
528 sed -i "/CONFIG_IPV6_SIT_6RD/d" $(1); \
529 echo "CONFIG_IPV6_SIT_6RD=y" >>$(1); \
530 sed -i "/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
531 echo "CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
532 sed -i "/CONFIG_IP6_NF_RAW/d" $(1); \
533 echo "CONFIG_IP6_NF_RAW=m" >>$(1); \
534 sed -i "/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
535 echo "CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
536 sed -i "/CONFIG_IPV6_MROUTE/d" $(1); \
537 echo "CONFIG_IPV6_MROUTE=y" >>$(1); \
538 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
539 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
540 else \
541 sed -i "/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
542 echo "CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
543 sed -i "/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
544 echo "CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
545 sed -i "/CONFIG_IP6_NF_FTP/d" $(1); \
546 echo "CONFIG_IP6_NF_FTP=m" >>$(1); \
547 sed -i "/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
548 echo "CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
549 sed -i "/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
550 echo "CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
551 sed -i "/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
552 echo "CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
553 sed -i "/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
554 echo "CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
555 sed -i "/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
556 echo "CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
557 sed -i "/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
558 echo "CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
559 sed -i "/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
560 echo "CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
561 sed -i "/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
562 echo "CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
563 sed -i "/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
564 echo "CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
565 sed -i "/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
566 echo "CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
567 fi; \
568 fi; \
569 sed -i "/CONFIG_BCM57XX/d" $(1); \
570 if [ "$(BCM57)" = "y" ]; then \
571 echo "CONFIG_BCM57XX=m" >>$(1); \
572 else \
573 echo "# CONFIG_BCM57XX is not set" >>$(1); \
574 fi; \
575 if [ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
576 sed -i "/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
577 echo "CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
578 if [ "$(IPV6SUPP)" = "y" ]; then \
579 sed -i "/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
580 echo "CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
581 fi; \
582 fi; \
584 endef
587 bin:
588 ifeq ($(B),)
589 @echo $@" is not a valid target!"
590 @false
591 endif
592 @cp router/config_base router/config_$(lowercase_B)
593 @cp router/busybox/config_base router/busybox/config_$(lowercase_B)
594 @cp $(LINUXDIR)/config_base $(LINUXDIR)/config_$(lowercase_B)
596 $(call RouterOptions, router/config_$(lowercase_B))
597 $(call KernelConfig, $(LINUXDIR)/config_$(lowercase_B))
598 $(call BusyboxOptions, router/busybox/config_$(lowercase_B))
600 @$(MAKE) setprofile N=$(TPROFILE) B=$(B) DESC="$(BUILD_DESC)" USB="$(USB)"
601 @$(MAKE) all
603 ## Make the "normal with Extras and NTFS + IPv6" = Ext
605 ifeq ($(CONFIG_LINUX26),y)
606 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Ext" USB="USB" SNMP=y
607 else
608 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Ext" USB="USB" SNMP=y
609 endif
611 ## Make the "Ext + VPN" = VPN
613 ifeq ($(CONFIG_LINUX26),y)
614 @$(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
615 else
616 @$(MAKE) bin OPENVPN=y BBEXTRAS=y USBEXTRAS=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" SNMP=y
617 endif
619 ## Make the "Ext + BTGUI" = BTgui
621 ifeq ($(CONFIG_LINUX26),y)
622 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BTgui" USB="USB" BTGUI=y SNMP=y
623 else
624 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="BTgui" USB="USB" BTGUI=y SNMP=y
625 endif
627 ## Make the "Ext + BT" = BT
629 ifeq ($(CONFIG_LINUX26),y)
630 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BT" USB="USB" BTCLIENT=y SNMP=y
631 else
632 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="BT" USB="USB" BTCLIENT=y SNMP=y
633 endif
635 ## Make the "BT + VPN" = BT-VPN
637 ifeq ($(CONFIG_LINUX26),y)
638 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="BT-VPN" USB="USB" BTCLIENT=y SNMP=y
639 else
640 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="BT-VPN" USB="USB" BTCLIENT=y SNMP=y
641 endif
643 ## Make the "Ext + NOCAT + NFS + BTGUI" = Big
645 ifeq ($(CONFIG_LINUX26),y)
646 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=M BUILD_DESC="Big" USB="USB" BTGUI=y NFS=y NOCAT=y SNMP=y
647 else
648 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Big" USB="USB" BTGUI=y NOCAT=y NFS=y SNMP=y
649 endif
651 ## Make the "Big + VPN" = Big-VPN
653 ifeq ($(CONFIG_LINUX26),y)
654 @$(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 SNMP=y
655 else
656 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=M BUILD_DESC="Big-VPN" USB="USB" BTGUI=y NOCAT=y NFS=y OPENVPN=y SNMP=y
657 endif
659 ## Make the "Big + BT + NFS" = Mega
661 ifeq ($(CONFIG_LINUX26),y)
662 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y EBTABLES=y NO_LIBOPT=y MEDIASRV=y IPV6SUPP=y B=E BUILD_DESC="Mega" USB="USB" NFS=y BTCLIENT=y SNMP=y NO_JFFS=y
663 else
664 @$(MAKE) bin NTFS=y BBEXTRAS=y USBEXTRAS=y B=E BUILD_DESC="Mega" USB="USB" BTCLIENT=y NFS=y SNMP=y NO_JFFS=y
665 endif
667 ## Make the "Big + VPN + BT + NOCAT - NFS" = Mega-VPN
669 ifeq ($(CONFIG_LINUX26),y)
670 @$(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 SNMP=y
671 else
672 @$(MAKE) bin OPENVPN=y NTFS=y BBEXTRAS=y USBEXTRAS=y B=E BUILD_DESC="Mega-VPN" USB="USB" BTCLIENT=y NOCAT=y SNMP=y
673 endif
675 ## Make the "No USB" = Std
677 ifeq ($(CONFIG_LINUX26),y)
678 @$(MAKE) bin JFFSv1=y $(if $(filter r2, $(MIPS32)),,BCM57=y) B=S BUILD_DESC="Std" USB="" SNMP=y
679 else
680 @$(MAKE) bin BBEXTRAS=y BCM57=y B=S BUILD_DESC="Std" USB="" SNMP=y
681 endif
683 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
685 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y B=F BUILD_DESC="Mini" USB=""
687 ifeq ($(CONFIG_LINUX26),y)
688 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
690 @$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y IPV6SUPP=y B=I BUILD_DESC="MiniIPv6" USB=""
691 endif
693 ifeq ($(CONFIG_LINUX26),y)
694 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
696 @$(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=""
697 endif
699 ## Make the "VPN witn no USB support"
701 ifeq ($(CONFIG_LINUX26),y)
702 @$(MAKE) bin OPENVPN=y NO_JFFS=y B=V BUILD_DESC="$(VPN)" USB=""
703 else
704 @$(MAKE) bin OPENVPN=y BBEXTRAS=y BCM57=y B=V BUILD_DESC="$(VPN)" USB=""
705 endif
707 ## Make the "All-In-One (AIO)" MIPS1 - only for router with more than 8MB flash!! ZTE H618B
709 ifeq ($(CONFIG_LINUX26),y)
710 @$(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 NFS=y TR_EXTRAS=y SNMP=y
711 endif
713 ## Make Mips32r2 builds
714 r2m:
715 @$(MAKE) m MIPS32=r2
717 r2e:
718 @$(MAKE) e MIPS32=r2
720 r2c:
721 @$(MAKE) c MIPS32=r2
723 r2r:
724 @$(MAKE) r MIPS32=r2
726 r2t:
727 @$(MAKE) t MIPS32=r2
729 r2a:
730 @$(MAKE) a MIPS32=r2
732 r2b:
733 @$(MAKE) b MIPS32=r2
735 r2n:
736 @$(MAKE) n MIPS32=r2
738 r2o:
739 @$(MAKE) o MIPS32=r2
741 #AIO MIPS2 for RT-N16 and E4200
742 r2z:
743 @$(MAKE) z MIPS32=r2
745 r2s:
746 @$(MAKE) s MIPS32=r2
748 r2v:
749 @$(MAKE) v MIPS32=r2
751 r2i:
752 @$(MAKE) i MIPS32=r2
754 r2j:
755 @$(MAKE) j MIPS32=r2
757 r2f:
758 @$(MAKE) f MIPS32=r2
760 n60m:
761 @$(MAKE) r2m NVRAM_SIZE=60 LINKSYS_E=1
763 n60c:
764 @$(MAKE) r2c NVRAM_SIZE=60 LINKSYS_E=1
766 n60r:
767 @$(MAKE) r2r NVRAM_SIZE=60 LINKSYS_E=1
769 n60t:
770 @$(MAKE) r2t NVRAM_SIZE=60 LINKSYS_E=1
772 n60a:
773 @$(MAKE) r2a NVRAM_SIZE=60 LINKSYS_E=1
775 n60b:
776 @$(MAKE) r2b NVRAM_SIZE=60 LINKSYS_E=1
778 n60e:
779 @$(MAKE) r2e NVRAM_SIZE=60 LINKSYS_E=1
781 n60n:
782 @$(MAKE) r2n NVRAM_SIZE=60 LINKSYS_E=1
784 n60o:
785 @$(MAKE) r2o NVRAM_SIZE=60 LINKSYS_E=1
787 #AIO for E4200
788 n60z:
789 @$(MAKE) r2z NVRAM_SIZE=60 LINKSYS_E=1
791 n60s:
792 @$(MAKE) bin MIPS32=r2 B=S USB="" NVRAM_SIZE=60 LINKSYS_E=1 BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y BUILD_DESC="Std"
794 n60v:
795 @$(MAKE) bin MIPS32=r2 B=V USB="" NVRAM_SIZE=60 LINKSYS_E=1 BBEXTRAS=y EBTABLES=y NO_LIBOPT=y IPV6SUPP=y OPENVPN=y BUILD_DESC="$(VPN)"
797 setprofile:
798 echo '#ifndef TOMATO_PROFILE' > router/shared/tomato_profile.h
799 echo '#define TOMATO_$(N) 1' >> router/shared/tomato_profile.h
800 echo '#define PROFILE_G 1' >> router/shared/tomato_profile.h
801 echo '#define PROFILE_N 2' >> router/shared/tomato_profile.h
802 echo '#define TOMATO_PROFILE PROFILE_$(N)' >> router/shared/tomato_profile.h
803 echo '#define TOMATO_PROFILE_NAME "$(N)"' >> router/shared/tomato_profile.h
804 echo '#define TOMATO_BUILD_NAME "$(B)"' >> router/shared/tomato_profile.h
805 echo '#define TOMATO_BUILD_DESC "$(DESC)"' >> router/shared/tomato_profile.h
806 echo '#ifndef CONFIG_NVRAM_SIZE' >> router/shared/tomato_profile.h
807 echo '#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router/shared/tomato_profile.h
808 echo '#endif' >> router/shared/tomato_profile.h
809 echo '#endif' >> router/shared/tomato_profile.h
811 echo 'TOMATO_$(N) = 1' > tomato_profile.mak
812 echo 'PROFILE_G = 1' >> tomato_profile.mak
813 echo 'PROFILE_N = 2' >> tomato_profile.mak
814 echo 'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
815 echo 'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
816 echo 'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
817 echo 'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
818 echo 'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
819 echo 'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
820 echo 'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
821 echo 'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
823 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
825 # Note that changes to variables in tomato_profile.mak don't
826 # get propogated to this invocation of make!
827 @echo ""
828 @echo "Using $(N) profile, $(B) build config."
829 @echo ""
831 @cd $(LINUXDIR) ; \
832 rm -f config_current ; \
833 ln -s config_$(lowercase_B) config_current ; \
834 cp -f config_current .config
836 @cd router/busybox && \
837 rm -f config_current ; \
838 ln -s config_$(lowercase_B) config_current ; \
839 cp config_current .config
841 @cd router ; \
842 rm -f config_current ; \
843 ln -s config_$(lowercase_B) config_current ; \
844 cp config_current .config
846 @$(MAKE) -C router oldconfig
848 help:
849 @echo "m Ext - (standard plus extra utilities and NTFS support)"
850 @echo "c BTgui - (Ext plus BT gui)"
851 @echo "t BT - (Ext plus BT Client)"
852 @echo "c BT-VPN - (BT plus VPN)"
853 @echo "a Big - (Ext plus NOCAT plus NFS plus BT gui)"
854 @echo "n Mega - (Big + BT Client minus NOCAT)"
855 @echo "e VPN - (standard plus VPN, extra utilities and NTFS support)"
856 @echo "b Big-VPN - (Big plus VPN)"
857 @echo "o Mega-VPN - (Mega plus VPN plus NOCAT minus NFS)"
858 ifeq ($(CONFIG_LINUX26),y)
859 @echo "i MiniIPv6 - (IPv6 with no USB support minus CIFS and RIPv1/2)"
860 endif
861 @echo "s Std - (no USB support)"
862 @echo "f Mini - (no USB support minus CIFS and RIPv1/2)"
863 @echo "v VPN (no usb) - (VPN with no USB support)"
864 ifeq ($(CONFIG_LINUX26),y)
865 @echo "r2m MIPS Release 2 Ext"
866 @echo "r2c MIPS Release 2 BTgui"
867 @echo "r2r MIPS Release 2 BT"
868 @echo "r2t MIPS Release 2 BT-VPN"
869 @echo "r2a MIPS Release 2 Big"
870 @echo "r2n MIPS Release 2 Mega"
871 @echo "r2e MIPS Release 2 VPN"
872 @echo "r2b MIPS Release 2 Big-VPN"
873 @echo "r2o MIPS Release 2 Mega-VPN"
874 @echo "r2z MIPS Release 2 AIO (for routers +8MB flash)"
875 @echo "r2v MIPS Release 2 VPN (no usb)"
876 @echo "r2s MIPS Release 2 Std"
877 @echo "r2i MIPS Release 2 MiniIPv6 (for 4MB flash)"
878 @echo "r2f MIPS Release 2 Mini (for netgear)"
879 @echo "n60m Linksys E-series build Ext"
880 @echo "n60c Linksys E-series build BTGui"
881 @echo "n60r Linksys E-series build BT"
882 @echo "n60t Linksys E-series build BT-VPN"
883 @echo "n60a Linksys E-series build Big"
884 @echo "n60n Linksys E-series build Mega"
885 @echo "n60e Linksys E-series build VPN"
886 @echo "n60b Linksys E-series build Big-VPN"
887 @echo "n60o Linksys E-series build Mega-VPN"
888 @echo "n60s Linksys E-series build Std with IPv6"
889 @echo "n60v Linksys E-series build VPN with IPv6"
890 endif
891 @echo "..etc.. other build configs"
892 @echo "clean -C router clean"
893 @echo "cleanimage rm -rf image"
894 @echo "cleantools clean btools, mksquashfs"
895 @echo "cleankernel -C Linux distclean (but preserves .config)"
896 @echo "distclean distclean of Linux & busybox (but preserve .configs)"
897 @echo "prepk -C Linux oldconfig dep"
899 .PHONY: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
900 .PHONY: a b c d m nc Makefile allversions tomato_profile.mak