]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - Makefile
Add support for CompactFlash on ATC board
[karo-tx-uboot.git] / Makefile
1 #
2 # (C) Copyright 2000, 2001, 2002
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 #
5 # See file CREDITS for list of people who contributed to this
6 # project.
7 #
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 # MA 02111-1307 USA
22 #
23
24 HOSTARCH := $(shell uname -m | \
25         sed -e s/i.86/i386/ \
26             -e s/sun4u/sparc64/ \
27             -e s/arm.*/arm/ \
28             -e s/sa110/arm/ \
29             -e s/powerpc/ppc/ \
30             -e s/macppc/ppc/)
31
32 HOSTOS := $(shell uname -s | tr A-Z a-z | \
33             sed -e 's/\(cygwin\).*/cygwin/')
34
35 export  HOSTARCH
36
37 # Deal with colliding definitions from tcsh etc.
38 VENDOR=
39
40 #########################################################################
41
42 TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
43 export  TOPDIR
44
45 ifeq (include/config.mk,$(wildcard include/config.mk))
46 # load ARCH, BOARD, and CPU configuration
47 include include/config.mk
48 export  ARCH CPU BOARD VENDOR
49 # load other configuration
50 include $(TOPDIR)/config.mk
51
52 ifndef CROSS_COMPILE
53 ifeq ($(HOSTARCH),ppc)
54 CROSS_COMPILE =
55 else
56 ifeq ($(ARCH),ppc)
57 CROSS_COMPILE = ppc_8xx-
58 endif
59 ifeq ($(ARCH),arm)
60 CROSS_COMPILE = arm-linux-
61 endif
62 ifeq ($(ARCH),i386)
63 #CROSS_COMPILE = i386-elf-
64 endif
65 ifeq ($(ARCH),mips)
66 CROSS_COMPILE = mips_4KC-
67 endif
68 endif
69 endif
70
71 export  CROSS_COMPILE
72
73 # The "tools" are needed early, so put this first
74 SUBDIRS = tools \
75           lib_generic \
76           lib_$(ARCH) \
77           cpu/$(CPU) \
78           board/$(BOARDDIR) \
79           common \
80           disk \
81           fs \
82           net \
83           rtc \
84           dtt \
85           drivers \
86           post \
87           post/cpu \
88           examples
89
90 #########################################################################
91 # U-Boot objects....order is important (i.e. start must be first)
92
93 OBJS  = cpu/$(CPU)/start.o
94 ifeq ($(CPU),i386)
95 OBJS += cpu/$(CPU)/start16.o
96 OBJS += cpu/$(CPU)/reset.o
97 endif
98 ifeq ($(CPU),ppc4xx)
99 OBJS += cpu/$(CPU)/resetvec.o
100 endif
101
102 LIBS  = board/$(BOARDDIR)/lib$(BOARD).a
103 LIBS += cpu/$(CPU)/lib$(CPU).a
104 LIBS += lib_$(ARCH)/lib$(ARCH).a
105 LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a
106 LIBS += net/libnet.a
107 LIBS += disk/libdisk.a
108 LIBS += rtc/librtc.a
109 LIBS += dtt/libdtt.a
110 LIBS += drivers/libdrivers.a
111 LIBS += post/libpost.a post/cpu/libcpu.a
112 LIBS += common/libcommon.a
113 LIBS += lib_generic/libgeneric.a
114
115 #########################################################################
116
117 all:            u-boot.srec u-boot.bin System.map
118
119 install:        all
120                 -cp u-boot.bin /tftpboot/u-boot.bin
121                 -cp u-boot.bin /net/denx/tftpboot/u-boot.bin
122
123 u-boot.srec:    u-boot
124                 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
125
126 u-boot.bin:     u-boot
127                 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
128
129 u-boot.dis:     u-boot
130                 $(OBJDUMP) -d $< > $@
131
132 u-boot:         depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
133                 $(LD) $(LDFLAGS) $(OBJS) \
134                         --start-group $(LIBS) --end-group \
135                         -Map u-boot.map -o u-boot
136
137 subdirs:
138                 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
139
140 depend dep:
141                 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
142
143 tags:
144                 ctags -w `find $(SUBDIRS) include \
145                         \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
146
147 etags:
148                 etags -a `find $(SUBDIRS) include \
149                         \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
150
151 System.map:     u-boot
152                 @$(NM) $< | \
153                 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
154                 sort > System.map
155
156 #########################################################################
157 else
158 all install u-boot u-boot.srec depend dep:
159         @echo "System not configured - see README" >&2
160         @ exit 1
161 endif
162
163 #########################################################################
164
165 unconfig:
166         rm -f include/config.h include/config.mk
167
168 #========================================================================
169 # PowerPC
170 #========================================================================
171
172 #########################################################################
173 ## MPC5xx Systems
174 #########################################################################
175
176 cmi_mpc5xx_config:      unconfig
177         @./mkconfig $(@:_config=) ppc mpc5xx cmi
178
179 #########################################################################
180 ## MPC8xx Systems
181 #########################################################################
182
183 ADS860_config:  unconfig
184         @./mkconfig $(@:_config=) ppc mpc8xx fads
185
186 AMX860_config   :       unconfig
187         @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
188
189 c2mon_config:           unconfig
190         @./mkconfig $(@:_config=) ppc mpc8xx c2mon
191
192 CCM_config:             unconfig
193         @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
194
195 cogent_mpc8xx_config:   unconfig
196         @./mkconfig $(@:_config=) ppc mpc8xx cogent
197
198 ELPT860_config:         unconfig
199         @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX
200
201 ESTEEM192E_config:      unconfig
202         @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
203
204 ETX094_config   :       unconfig
205         @./mkconfig $(@:_config=) ppc mpc8xx etx094
206
207 FADS823_config  \
208 FADS850SAR_config \
209 FADS860T_config:        unconfig
210         @./mkconfig $(@:_config=) ppc mpc8xx fads
211
212 FLAGADM_config: unconfig
213         @./mkconfig $(@:_config=) ppc mpc8xx flagadm
214
215 xtract_GEN860T = $(subst _SC,,$(subst _config,,$1))
216
217 GEN860T_SC_config       \
218 GEN860T_config: unconfig
219         @ >include/config.h
220         @[ -z "$(findstring _SC,$@)" ] || \
221                 { echo "#define CONFIG_SC" >>include/config.h ; \
222                   echo "With reduced H/W feature set (SC)..." ; \
223                 }
224         @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t
225
226 GENIETV_config: unconfig
227         @./mkconfig $(@:_config=) ppc mpc8xx genietv
228
229 GTH_config:     unconfig
230         @./mkconfig $(@:_config=) ppc mpc8xx gth
231
232 hermes_config   :       unconfig
233         @./mkconfig $(@:_config=) ppc mpc8xx hermes
234
235 IAD210_config: unconfig
236         @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
237
238 xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
239
240 ICU862_100MHz_config    \
241 ICU862_config: unconfig
242         @ >include/config.h
243         @[ -z "$(findstring _100MHz,$@)" ] || \
244                 { echo "#define CONFIG_100MHz"  >>include/config.h ; \
245                   echo "... with 100MHz system clock" ; \
246                 }
247         @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
248
249 IP860_config    :       unconfig
250         @./mkconfig $(@:_config=) ppc mpc8xx ip860
251
252 IVML24_256_config \
253 IVML24_128_config \
254 IVML24_config:  unconfig
255         @ >include/config.h
256         @[ -z "$(findstring IVML24_config,$@)" ] || \
257                  { echo "#define CONFIG_IVML24_16M"     >>include/config.h ; \
258                  }
259         @[ -z "$(findstring IVML24_128_config,$@)" ] || \
260                  { echo "#define CONFIG_IVML24_32M"     >>include/config.h ; \
261                  }
262         @[ -z "$(findstring IVML24_256_config,$@)" ] || \
263                  { echo "#define CONFIG_IVML24_64M"     >>include/config.h ; \
264                  }
265         @./mkconfig -a IVML24 ppc mpc8xx ivm
266
267 IVMS8_256_config \
268 IVMS8_128_config \
269 IVMS8_config:   unconfig
270         @ >include/config.h
271         @[ -z "$(findstring IVMS8_config,$@)" ] || \
272                  { echo "#define CONFIG_IVMS8_16M"      >>include/config.h ; \
273                  }
274         @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
275                  { echo "#define CONFIG_IVMS8_32M"      >>include/config.h ; \
276                  }
277         @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
278                  { echo "#define CONFIG_IVMS8_64M"      >>include/config.h ; \
279                  }
280         @./mkconfig -a IVMS8 ppc mpc8xx ivm
281
282 KUP4K_config    :       unconfig
283         @./mkconfig $(@:_config=) ppc mpc8xx kup4k
284
285 LANTEC_config   :       unconfig
286         @./mkconfig $(@:_config=) ppc mpc8xx lantec
287
288 lwmon_config:           unconfig
289         @./mkconfig $(@:_config=) ppc mpc8xx lwmon
290
291 MBX_config      \
292 MBX860T_config: unconfig
293         @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
294
295 MHPC_config:            unconfig
296         @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
297
298 MVS1_config :           unconfig
299         @./mkconfig $(@:_config=) ppc mpc8xx mvs1
300
301 NETVIA_config:          unconfig
302         @./mkconfig $(@:_config=) ppc mpc8xx netvia
303
304 NX823_config:           unconfig
305         @./mkconfig $(@:_config=) ppc mpc8xx nx823
306
307 pcu_e_config:           unconfig
308         @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
309
310 R360MPI_config: unconfig
311         @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
312
313 RPXClassic_config:      unconfig
314         @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
315
316 RPXlite_config:         unconfig
317         @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
318
319 RRvision_config:        unconfig
320         @./mkconfig $(@:_config=) ppc mpc8xx RRvision
321
322 RRvision_LCD_config:    unconfig
323         @echo "#define CONFIG_LCD" >include/config.h
324         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
325         @./mkconfig -a RRvision ppc mpc8xx RRvision
326
327 SM850_config    :       unconfig
328         @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
329
330 SPD823TS_config:        unconfig
331         @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
332
333 svm_sc8xx_config:       unconfig
334         @ >include/config.h
335         @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx
336
337 SXNI855T_config:        unconfig
338         @./mkconfig $(@:_config=) ppc mpc8xx sixnet
339
340 # EMK MPC8xx based modules
341 TOP860_config:          unconfig
342         @./mkconfig $(@:_config=) ppc mpc8xx top860 emk
343
344 # Play some tricks for configuration selection
345 # All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
346 # but only 855 and 860 boards may come with FEC
347 # and 823 boards may have LCD support
348 xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _config,,$1))))
349
350 FPS850L_config          \
351 FPS860L_config          \
352 TQM823L_config          \
353 TQM823L_66MHz_config    \
354 TQM823L_80MHz_config    \
355 TQM823L_LCD_config      \
356 TQM823L_LCD_66MHz_config \
357 TQM823L_LCD_80MHz_config \
358 TQM850L_config          \
359 TQM850L_66MHz_config    \
360 TQM850L_80MHz_config    \
361 TQM855L_config          \
362 TQM855L_66MHz_config    \
363 TQM855L_80MHz_config    \
364 TQM860L_config          \
365 TQM860L_66MHz_config    \
366 TQM860L_80MHz_config    \
367 TQM862L_config          \
368 TQM862L_66MHz_config    \
369 TQM862L_80MHz_config:   unconfig
370         @ >include/config.h
371         @[ -z "$(findstring _66MHz,$@)" ] || \
372                 { echo "#define CONFIG_66MHz"           >>include/config.h ; \
373                   echo "... with 66MHz system clock" ; \
374                 }
375         @[ -z "$(findstring _80MHz,$@)" ] || \
376                 { echo "#define CONFIG_80MHz"           >>include/config.h ; \
377                   echo "... with 80MHz system clock" ; \
378                 }
379         @[ -z "$(findstring _LCD,$@)" ] || \
380                 { echo "#define CONFIG_LCD"             >>include/config.h ; \
381                   echo "#define CONFIG_NEC_NL6648BC20"  >>include/config.h ; \
382                   echo "... with LCD display" ; \
383                 }
384         @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
385
386 TTTech_config:  unconfig
387         @echo "#define CONFIG_LCD" >include/config.h
388         @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
389         @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
390
391 v37_config:     unconfig
392         @echo "#define CONFIG_LCD" >include/config.h
393         @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
394         @./mkconfig $(@:_config=) ppc mpc8xx v37
395
396 #########################################################################
397 ## PPC4xx Systems
398 #########################################################################
399
400 ADCIOP_config:  unconfig
401         @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
402
403 AR405_config:   unconfig
404         @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
405
406 CANBT_config:   unconfig
407         @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
408
409 CPCI405_config          \
410 CPCI4052_config:        unconfig
411         @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
412         @echo "BOARD_REVISION = $(@:_config=)"  >>include/config.mk
413
414 CPCI440_config: unconfig
415         @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
416
417 CPCIISER4_config:       unconfig
418         @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
419
420 CRAYL1_config:unconfig
421         @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
422
423 DASA_SIM_config: unconfig
424         @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
425
426 DU405_config:   unconfig
427         @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
428
429 EBONY_config:unconfig
430         @./mkconfig $(@:_config=) ppc ppc4xx ebony
431
432 ERIC_config:unconfig
433         @./mkconfig $(@:_config=) ppc ppc4xx eric
434
435 MIP405_config:unconfig
436         @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
437
438 ML2_config:unconfig
439         @./mkconfig $(@:_config=) ppc ppc4xx ml2
440
441 OCRTC_config            \
442 ORSG_config:    unconfig
443         @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
444
445 PCI405_config:  unconfig
446         @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
447
448 PIP405_config:unconfig
449         @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
450
451 W7OLMC_config   \
452 W7OLMG_config: unconfig
453         @./mkconfig $(@:_config=) ppc ppc4xx w7o
454
455 WALNUT405_config:unconfig
456         @./mkconfig $(@:_config=) ppc ppc4xx walnut405
457
458 #########################################################################
459 ## MPC824x Systems
460 #########################################################################
461 xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
462
463 BMW_config: unconfig
464         @./mkconfig $(@:_config=) ppc mpc824x bmw
465
466 CPC45_config    \
467 CPC45_ROMBOOT_config:   unconfig
468         @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45
469         @cd ./include ;                         \
470         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
471                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
472                 echo "... booting from 8-bit flash" ; \
473         else \
474                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
475                 echo "... booting from 64-bit flash" ; \
476         fi; \
477         echo "export CONFIG_BOOT_ROM" >> config.mk;
478
479 CU824_config: unconfig
480         @./mkconfig $(@:_config=) ppc mpc824x cu824
481
482 MOUSSE_config: unconfig
483         @./mkconfig $(@:_config=) ppc mpc824x mousse
484
485 MUSENKI_config: unconfig
486         @./mkconfig $(@:_config=) ppc mpc824x musenki
487
488 OXC_config: unconfig
489         @./mkconfig $(@:_config=) ppc mpc824x oxc
490
491 PN62_config: unconfig
492         @./mkconfig $(@:_config=) ppc mpc824x pn62
493
494 Sandpoint8240_config: unconfig
495         @./mkconfig $(@:_config=) ppc mpc824x sandpoint
496
497 Sandpoint8245_config: unconfig
498         @./mkconfig $(@:_config=) ppc mpc824x sandpoint
499
500 utx8245_config: unconfig
501         @./mkconfig $(@:_config=) ppc mpc824x utx8245
502
503 #########################################################################
504 ## MPC8260 Systems
505 #########################################################################
506
507 cogent_mpc8260_config:  unconfig
508         @./mkconfig $(@:_config=) ppc mpc8260 cogent
509
510 CPU86_config    \
511 CPU86_ROMBOOT_config: unconfig
512         @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
513         @cd ./include ;                         \
514         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
515                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
516                 echo "... booting from 8-bit flash" ; \
517         else \
518                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
519                 echo "... booting from 64-bit flash" ; \
520         fi; \
521         echo "export CONFIG_BOOT_ROM" >> config.mk;
522
523 ep8260_config:  unconfig
524         @./mkconfig $(@:_config=) ppc mpc8260 ep8260
525
526 gw8260_config:  unconfig
527         @./mkconfig $(@:_config=) ppc mpc8260 gw8260
528
529 hymod_config:   unconfig
530         @./mkconfig $(@:_config=) ppc mpc8260 hymod
531
532 IPHASE4539_config:      unconfig
533         @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
534
535 MPC8260ADS_config:      unconfig
536         @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
537
538 MPC8266ADS_config:      unconfig
539         @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads
540
541 PM825_config    \
542 PM825_ROMBOOT_config: unconfig
543         @echo "#define CONFIG_PCI"      >include/config.h
544         @./mkconfig -a PM826 ppc mpc8260 pm826
545         @cd ./include ;                         \
546         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
547                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
548                 echo "... booting from 8-bit flash" ; \
549         else \
550                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
551                 echo "... booting from 64-bit flash" ; \
552         fi; \
553         echo "export CONFIG_BOOT_ROM" >> config.mk; \
554
555 PM826_config    \
556 PM826_ROMBOOT_config: unconfig
557         @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
558         @cd ./include ;                         \
559         if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
560                 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
561                 echo "... booting from 8-bit flash" ; \
562         else \
563                 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
564                 echo "... booting from 64-bit flash" ; \
565         fi; \
566         echo "export CONFIG_BOOT_ROM" >> config.mk; \
567
568 ppmc8260_config:        unconfig
569         @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
570
571 RPXsuper_config:        unconfig
572         @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
573
574 rsdproto_config:        unconfig
575         @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
576
577 sacsng_config:  unconfig
578         @./mkconfig $(@:_config=) ppc mpc8260 sacsng
579
580 sbc8260_config: unconfig
581         @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
582
583 SCM_config:             unconfig
584         @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
585
586 TQM8255_config  \
587 TQM8260_config  \
588 TQM8260_L2_config       \
589 TQM8255_266MHz_config   \
590 TQM8260_266MHz_config   \
591 TQM8260_L2_266MHz_config \
592 TQM8255_300MHz_config   \
593 TQM8260_300MHz_config:  unconfig
594         @ >include/config.h
595         @if [ "$(findstring _L2_,$@)" ] ; then \
596                 echo "#define CONFIG_L2_CACHE"  >>include/config.h ; \
597                 echo "... with L2 Cache support (60x Bus Mode)" ; \
598         else \
599                 echo "#undef CONFIG_L2_CACHE"   >>include/config.h ; \
600                 echo "... without L2 Cache support" ; \
601         fi
602         @[ -z "$(findstring _266MHz,$@)" ] || \
603                 { echo "#define CONFIG_266MHz"  >>include/config.h ; \
604                   echo "... with 266MHz system clock" ; \
605                 }
606         @[ -z "$(findstring _300MHz,$@)" ] || \
607                 { echo "#define CONFIG_300MHz"  >>include/config.h ; \
608                   echo "... with 300MHz system clock" ; \
609                 }
610         @[ -z "$(findstring TQM8255_,$@)" ] || \
611                 { echo "#define CONFIG_MPC8255" >>include/config.h ; }
612         @./mkconfig -a TQM8260 ppc mpc8260 tqm8260
613
614 atc_config:     unconfig
615         @./mkconfig $(@:_config=) ppc mpc8260 atc
616
617 #########################################################################
618 ## 74xx/7xx Systems
619 #########################################################################
620
621 AmigaOneG3SE_config:    unconfig
622         @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
623
624 EVB64260_config \
625 EVB64260_750CX_config:  unconfig
626         @./mkconfig EVB64260 ppc 74xx_7xx evb64260
627
628 ZUMA_config:    unconfig
629         @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
630
631 PCIPPC2_config \
632 PCIPPC6_config: unconfig
633         @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
634
635 BAB7xx_config: unconfig
636         @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
637
638 ELPPC_config: unconfig
639         @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
640
641 #========================================================================
642 # ARM
643 #========================================================================
644 #########################################################################
645 ## StrongARM Systems
646 #########################################################################
647
648 at91rm9200dk_config     :       unconfig
649         @./mkconfig $(@:_config=) arm at91rm9200 at91rm9200dk
650
651 lart_config     :       unconfig
652         @./mkconfig $(@:_config=) arm sa1100 lart
653
654 dnp1110_config  :       unconfig
655         @./mkconfig $(@:_config=) arm sa1100 dnp1110
656
657 shannon_config  :       unconfig
658         @./mkconfig $(@:_config=) arm sa1100 shannon
659
660 #########################################################################
661 ## ARM920T Systems
662 #########################################################################
663
664 xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
665
666 smdk2400_config :       unconfig
667         @./mkconfig $(@:_config=) arm arm920t smdk2400
668
669 smdk2410_config :       unconfig
670         @./mkconfig $(@:_config=) arm arm920t smdk2410
671
672 trab_config \
673 trab_big_flash_config:  unconfig
674         @ >include/config.h
675         @[ -z "$(findstring _big_flash,$@)" ] || \
676                 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
677                   echo "... with big flash support" ; \
678                 }
679         @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
680
681 VCMA9_config    :       unconfig
682         @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
683
684 #########################################################################
685 ## ARM720T Systems
686 #########################################################################
687
688 impa7_config    :       unconfig
689         @./mkconfig $(@:_config=) arm arm720t impa7
690
691 ep7312_config   :       unconfig
692         @./mkconfig $(@:_config=) arm arm720t ep7312
693
694 #########################################################################
695 ## XScale Systems
696 #########################################################################
697
698 cradle_config   :       unconfig
699         @./mkconfig $(@:_config=) arm xscale cradle
700
701 csb226_config   :       unconfig
702         @./mkconfig $(@:_config=) arm xscale csb226
703
704 innokom_config  :       unconfig
705         @./mkconfig $(@:_config=) arm xscale innokom
706
707 lubbock_config  :       unconfig
708         @./mkconfig $(@:_config=) arm xscale lubbock
709
710 wepep250_config :       unconfig
711         @./mkconfig $(@:_config=) arm xscale wepep250
712
713 #========================================================================
714 # i386
715 #========================================================================
716 #########################################################################
717 ## AMD SC520 CDP
718 #########################################################################
719 sc520_cdp_config        :       unconfig
720         @./mkconfig $(@:_config=) i386 i386 sc520_cdp
721
722 #========================================================================
723 # MIPS
724 #========================================================================
725 #########################################################################
726 ## MIPS32 4Kc
727 #########################################################################
728
729 incaip_config :         unconfig
730         @./mkconfig $(@:_config=) mips mips incaip
731
732 purple_config :         unconfig
733         @./mkconfig $(@:_config=) mips mips purple
734
735 #########################################################################
736 #########################################################################
737
738 clean:
739         find . -type f \
740                 \( -name 'core' -o -name '*.bak' -o -name '*~' \
741                 -o -name '*.o'  -o -name '*.a'  \) -print \
742                 | xargs rm -f
743         rm -f examples/hello_world examples/timer \
744               examples/eepro100_eeprom examples/sched \
745               examples/mem_to_mem_idma2intr
746         rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
747         rm -f tools/easylogo/easylogo tools/bmp_logo
748         rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
749         rm -f tools/env/fw_printenv tools/env/fw_setenv
750
751 clobber:        clean
752         find . -type f \
753                 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
754                 -print \
755                 | xargs rm -f
756         rm -f $(OBJS) *.bak tags TAGS
757         rm -fr *.*~
758         rm -f u-boot u-boot.bin u-boot.srec u-boot.map System.map
759         rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
760         rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
761         rm -f include/asm/arch include/asm
762
763 mrproper \
764 distclean:      clobber unconfig
765
766 backup:
767         F=`basename $(TOPDIR)` ; cd .. ; \
768         gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
769
770 #########################################################################