blob: 78babef40cd9dff89d9e4af918a5badf31eacd2c [file] [log] [blame]
wdenk7ebf7442002-11-02 23:17:16 +00001#
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
24HOSTARCH := $(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
32HOSTOS := $(shell uname -s | tr A-Z a-z | \
33 sed -e 's/\(cygwin\).*/cygwin/')
34
35export HOSTARCH
36
37# Deal with colliding definitions from tcsh etc.
38VENDOR=
39
40#########################################################################
41
42TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
43export TOPDIR
44
45ifeq (include/config.mk,$(wildcard include/config.mk))
46# load ARCH, BOARD, and CPU configuration
47include include/config.mk
48export ARCH CPU BOARD VENDOR
49# load other configuration
50include $(TOPDIR)/config.mk
51
52ifndef CROSS_COMPILE
53ifeq ($(HOSTARCH),ppc)
54CROSS_COMPILE =
55else
56## #ifeq ($(CPU),mpc8xx)
57## CROSS_COMPILE = ppc_8xx-
58## #endif
59## #ifeq ($(CPU),ppc4xx)
60## #CROSS_COMPILE = ppc_4xx-
61## #endif
62## #ifeq ($(CPU),mpc824x)
63## #CROSS_COMPILE = ppc_82xx-
64## #endif
65## #ifeq ($(CPU),mpc8260)
66## #CROSS_COMPILE = ppc_82xx-
67## #endif
68## #ifeq ($(CPU),74xx_7xx)
69## #CROSS_COMPILE = ppc_74xx-)
70## #endif
71ifeq ($(ARCH),ppc)
72CROSS_COMPILE = ppc_8xx-
73endif
74ifeq ($(ARCH),arm)
75CROSS_COMPILE = arm_920TDI-
76endif
wdenk2262cfe2002-11-18 00:14:45 +000077ifeq ($(ARCH),i386)
78#CROSS_COMPILE = i386-elf-
79endif
wdenk43d96162003-03-06 00:02:04 +000080ifeq ($(ARCH),mips)
81CROSS_COMPILE = mips_4KC-
82endif
wdenk7ebf7442002-11-02 23:17:16 +000083endif
84endif
85
86export CROSS_COMPILE
87
88# The "tools" are needed early, so put this first
89SUBDIRS = tools \
90 lib_generic \
91 lib_$(ARCH) \
92 cpu/$(CPU) \
93 board/$(BOARDDIR) \
94 common \
95 disk \
96 fs \
97 net \
98 rtc \
99 dtt \
100 drivers \
101 post \
102 post/cpu \
103 examples
104
105#########################################################################
106# U-Boot objects....order is important (i.e. start must be first)
107
108OBJS = cpu/$(CPU)/start.o
wdenk2262cfe2002-11-18 00:14:45 +0000109ifeq ($(CPU),i386)
110OBJS += cpu/$(CPU)/start16.o
111OBJS += cpu/$(CPU)/reset.o
112endif
wdenk7ebf7442002-11-02 23:17:16 +0000113ifeq ($(CPU),ppc4xx)
114OBJS += cpu/$(CPU)/resetvec.o
115endif
116
117LIBS = board/$(BOARDDIR)/lib$(BOARD).a
118LIBS += cpu/$(CPU)/lib$(CPU).a
119LIBS += lib_$(ARCH)/lib$(ARCH).a
wdenk2262cfe2002-11-18 00:14:45 +0000120LIBS += fs/jffs2/libjffs2.a fs/fdos/libfdos.a
wdenk7ebf7442002-11-02 23:17:16 +0000121LIBS += net/libnet.a
122LIBS += disk/libdisk.a
123LIBS += rtc/librtc.a
124LIBS += dtt/libdtt.a
125LIBS += drivers/libdrivers.a
126LIBS += post/libpost.a post/cpu/libcpu.a
127LIBS += common/libcommon.a
128LIBS += lib_generic/libgeneric.a
129
130#########################################################################
131
132all: u-boot.srec u-boot.bin System.map
133
134install: all
wdenk43d96162003-03-06 00:02:04 +0000135 -cp u-boot.bin /tftpboot/u-boot.bin
136 -cp u-boot.bin /net/denx/tftpboot/u-boot.bin
wdenk7ebf7442002-11-02 23:17:16 +0000137
138u-boot.srec: u-boot
139 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
140
141u-boot.bin: u-boot
142 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
143
144u-boot.dis: u-boot
145 $(OBJDUMP) -d $< > $@
146
147u-boot: depend subdirs $(OBJS) $(LIBS) $(LDSCRIPT)
wdenkb2184c32002-11-19 23:01:07 +0000148 $(LD) $(LDFLAGS) $(OBJS) \
149 --start-group $(LIBS) --end-group \
150 -Map u-boot.map -o u-boot
wdenk7ebf7442002-11-02 23:17:16 +0000151
152subdirs:
153 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
154
155depend dep:
156 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
157
158tags:
159 ctags -w `find $(SUBDIRS) include \
160 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
161
162etags:
163 etags -a `find $(SUBDIRS) include \
164 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
165
166System.map: u-boot
167 @$(NM) $< | \
168 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
169 sort > System.map
170
171#########################################################################
172else
173all install u-boot u-boot.srec depend dep:
174 @echo "System not configured - see README" >&2
175 @ exit 1
176endif
177
178#########################################################################
179
180unconfig:
181 rm -f include/config.h include/config.mk
182
183#========================================================================
184# PowerPC
185#========================================================================
186#########################################################################
187## MPC8xx Systems
188#########################################################################
189
190ADS860_config: unconfig
191 @./mkconfig $(@:_config=) ppc mpc8xx fads
192
193AMX860_config : unconfig
194 @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel
195
196c2mon_config: unconfig
197 @./mkconfig $(@:_config=) ppc mpc8xx c2mon
198
199CCM_config: unconfig
200 @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens
201
202cogent_mpc8xx_config: unconfig
203 @./mkconfig $(@:_config=) ppc mpc8xx cogent
204
205ESTEEM192E_config: unconfig
206 @./mkconfig $(@:_config=) ppc mpc8xx esteem192e
207
208ETX094_config : unconfig
209 @./mkconfig $(@:_config=) ppc mpc8xx etx094
210
211FADS823_config \
212FADS850SAR_config \
213FADS860T_config: unconfig
214 @./mkconfig $(@:_config=) ppc mpc8xx fads
215
216FLAGADM_config: unconfig
217 @./mkconfig $(@:_config=) ppc mpc8xx flagadm
218
219GEN860T_config: unconfig
220 @./mkconfig $(@:_config=) ppc mpc8xx gen860t
221
222GENIETV_config: unconfig
223 @./mkconfig $(@:_config=) ppc mpc8xx genietv
224
225GTH_config: unconfig
226 @./mkconfig $(@:_config=) ppc mpc8xx gth
227
228hermes_config : unconfig
229 @./mkconfig $(@:_config=) ppc mpc8xx hermes
230
231IAD210_config: unconfig
232 @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens
233
234xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1))
235
236ICU862_100MHz_config \
237ICU862_config: unconfig
238 @ >include/config.h
239 @[ -z "$(findstring _100MHz,$@)" ] || \
240 { echo "#define CONFIG_100MHz" >>include/config.h ; \
241 echo "... with 100MHz system clock" ; \
242 }
243 @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862
244
245IP860_config : unconfig
246 @./mkconfig $(@:_config=) ppc mpc8xx ip860
247
248IVML24_256_config \
249IVML24_128_config \
250IVML24_config: unconfig
251 @ >include/config.h
252 @[ -z "$(findstring IVML24_config,$@)" ] || \
253 { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \
254 }
255 @[ -z "$(findstring IVML24_128_config,$@)" ] || \
256 { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \
257 }
258 @[ -z "$(findstring IVML24_256_config,$@)" ] || \
259 { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \
260 }
261 @./mkconfig -a IVML24 ppc mpc8xx ivm
262
263IVMS8_256_config \
264IVMS8_128_config \
265IVMS8_config: unconfig
266 @ >include/config.h
267 @[ -z "$(findstring IVMS8_config,$@)" ] || \
268 { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \
269 }
270 @[ -z "$(findstring IVMS8_128_config,$@)" ] || \
271 { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \
272 }
273 @[ -z "$(findstring IVMS8_256_config,$@)" ] || \
274 { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \
275 }
276 @./mkconfig -a IVMS8 ppc mpc8xx ivm
277
wdenk56f94be2002-11-05 16:35:14 +0000278KUP4K_config : unconfig
279 @./mkconfig $(@:_config=) ppc mpc8xx kup4k
280
wdenk7ebf7442002-11-02 23:17:16 +0000281LANTEC_config : unconfig
282 @./mkconfig $(@:_config=) ppc mpc8xx lantec
283
284lwmon_config: unconfig
285 @./mkconfig $(@:_config=) ppc mpc8xx lwmon
286
287MBX_config \
288MBX860T_config: unconfig
289 @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx
290
291MHPC_config: unconfig
292 @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec
293
294MVS1_config : unconfig
295 @./mkconfig $(@:_config=) ppc mpc8xx mvs1
296
297NETVIA_config: unconfig
298 @./mkconfig $(@:_config=) ppc mpc8xx netvia
299
300NX823_config: unconfig
301 @./mkconfig $(@:_config=) ppc mpc8xx nx823
302
303pcu_e_config: unconfig
304 @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens
305
306R360MPI_config: unconfig
307 @./mkconfig $(@:_config=) ppc mpc8xx r360mpi
308
309RPXClassic_config: unconfig
310 @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic
311
312RPXlite_config: unconfig
313 @./mkconfig $(@:_config=) ppc mpc8xx RPXlite
314
315RRvision_config: unconfig
316 @./mkconfig $(@:_config=) ppc mpc8xx RRvision
317
318RRvision_LCD_config: unconfig
319 @echo "#define CONFIG_LCD" >include/config.h
320 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
321 @./mkconfig -a RRvision ppc mpc8xx RRvision
322
323SM850_config : unconfig
324 @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx
325
326SPD823TS_config: unconfig
327 @./mkconfig $(@:_config=) ppc mpc8xx spd8xx
328
329SXNI855T_config: unconfig
330 @./mkconfig $(@:_config=) ppc mpc8xx sixnet
331
332# Play some tricks for configuration selection
333# All boards can come with 50 MHz (default), 66MHz or 80MHz clock,
334# but only 855 and 860 boards may come with FEC
335# and 823 boards may have LCD support
336xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _LCD,,$(subst _FEC,,$(subst _config,,$1)))))
337
338FPS850L_config \
wdenk384ae022002-11-05 00:17:55 +0000339FPS860L_config \
wdenk7ebf7442002-11-02 23:17:16 +0000340TQM823L_config \
341TQM823L_66MHz_config \
342TQM823L_80MHz_config \
343TQM823L_LCD_config \
344TQM823L_LCD_66MHz_config \
345TQM823L_LCD_80MHz_config \
346TQM850L_config \
347TQM850L_66MHz_config \
348TQM850L_80MHz_config \
349TQM855L_config \
350TQM855L_66MHz_config \
351TQM855L_80MHz_config \
352TQM855L_FEC_config \
353TQM855L_FEC_66MHz_config \
354TQM855L_FEC_80MHz_config \
355TQM860L_config \
356TQM860L_66MHz_config \
357TQM860L_80MHz_config \
358TQM860L_FEC_config \
359TQM860L_FEC_66MHz_config \
360TQM860L_FEC_80MHz_config: unconfig
361 @ >include/config.h
362 @[ -z "$(findstring _FEC,$@)" ] || \
363 { echo "#define CONFIG_FEC_ENET" >>include/config.h ; \
364 echo "... with FEC support" ; \
365 }
366 @[ -z "$(findstring _66MHz,$@)" ] || \
367 { echo "#define CONFIG_66MHz" >>include/config.h ; \
368 echo "... with 66MHz system clock" ; \
369 }
370 @[ -z "$(findstring _80MHz,$@)" ] || \
371 { echo "#define CONFIG_80MHz" >>include/config.h ; \
372 echo "... with 80MHz system clock" ; \
373 }
374 @[ -z "$(findstring _LCD,$@)" ] || \
375 { echo "#define CONFIG_LCD" >>include/config.h ; \
376 echo "#define CONFIG_NEC_NL6648BC20" >>include/config.h ; \
377 echo "... with LCD display" ; \
378 }
379 @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx
380
381TTTech_config: unconfig
382 @echo "#define CONFIG_LCD" >include/config.h
383 @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h
384 @./mkconfig -a TQM823L ppc mpc8xx tqm8xx
385
wdenk608c9142003-01-13 23:54:46 +0000386v37_config: unconfig
387 @echo "#define CONFIG_LCD" >include/config.h
388 @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h
389 @./mkconfig $(@:_config=) ppc mpc8xx v37
390
wdenk7ebf7442002-11-02 23:17:16 +0000391#########################################################################
392## PPC4xx Systems
393#########################################################################
394
395ADCIOP_config: unconfig
396 @./mkconfig $(@:_config=) ppc ppc4xx adciop esd
397
398AR405_config: unconfig
399 @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd
400
401CANBT_config: unconfig
402 @./mkconfig $(@:_config=) ppc ppc4xx canbt esd
403
404CPCI405_config \
405CPCI4052_config: unconfig
406 @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd
407 @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk
408
409CPCI440_config: unconfig
410 @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd
411
412CPCIISER4_config: unconfig
413 @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd
414
415CRAYL1_config:unconfig
416 @./mkconfig $(@:_config=) ppc ppc4xx L1 cray
417
418DASA_SIM_config: unconfig
419 @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd
420
421DU405_config: unconfig
422 @./mkconfig $(@:_config=) ppc ppc4xx du405 esd
423
424EBONY_config:unconfig
425 @./mkconfig $(@:_config=) ppc ppc4xx ebony
426
427ERIC_config:unconfig
428 @./mkconfig $(@:_config=) ppc ppc4xx eric
429
430MIP405_config:unconfig
431 @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl
432
433ML2_config:unconfig
434 @./mkconfig $(@:_config=) ppc ppc4xx ml2
435
436OCRTC_config \
437ORSG_config: unconfig
438 @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd
439
440PCI405_config: unconfig
441 @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd
442
443PIP405_config:unconfig
444 @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl
445
446W7OLMC_config \
447W7OLMG_config: unconfig
448 @./mkconfig $(@:_config=) ppc ppc4xx w7o
449
450WALNUT405_config:unconfig
451 @./mkconfig $(@:_config=) ppc ppc4xx walnut405
452
453#########################################################################
454## MPC824x Systems
455#########################################################################
456BMW_config: unconfig
457 @./mkconfig $(@:_config=) ppc mpc824x bmw
458
459CU824_config: unconfig
460 @./mkconfig $(@:_config=) ppc mpc824x cu824
461
462MOUSSE_config: unconfig
463 @./mkconfig $(@:_config=) ppc mpc824x mousse
464
465MUSENKI_config: unconfig
466 @./mkconfig $(@:_config=) ppc mpc824x musenki
467
468OXC_config: unconfig
469 @./mkconfig $(@:_config=) ppc mpc824x oxc
470
471PN62_config: unconfig
472 @./mkconfig $(@:_config=) ppc mpc824x pn62
473
474Sandpoint8240_config: unconfig
475 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
476
477Sandpoint8245_config: unconfig
478 @./mkconfig $(@:_config=) ppc mpc824x sandpoint
479
480utx8245_config: unconfig
481 @./mkconfig $(@:_config=) ppc mpc824x utx8245
482
483#########################################################################
484## MPC8260 Systems
485#########################################################################
486xtract_82xx = $(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))
487
488cogent_mpc8260_config: unconfig
489 @./mkconfig $(@:_config=) ppc mpc8260 cogent
490
491CPU86_config \
492CPU86_ROMBOOT_config: unconfig
493 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86
494 @cd ./include ; \
495 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
496 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
497 echo "... booting from 8-bit flash" ; \
498 else \
499 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
500 echo "... booting from 64-bit flash" ; \
501 fi; \
502 echo "export CONFIG_BOOT_ROM" >> config.mk;
503
504ep8260_config: unconfig
505 @./mkconfig $(@:_config=) ppc mpc8260 ep8260
506
507gw8260_config: unconfig
508 @./mkconfig $(@:_config=) ppc mpc8260 gw8260
509
510hymod_config: unconfig
511 @./mkconfig $(@:_config=) ppc mpc8260 hymod
512
513IPHASE4539_config: unconfig
514 @./mkconfig $(@:_config=) ppc mpc8260 iphase4539
515
516MPC8260ADS_config: unconfig
517 @./mkconfig $(@:_config=) ppc mpc8260 mpc8260ads
518
519PM826_config \
520PM826_ROMBOOT_config: unconfig
521 @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 pm826
522 @cd ./include ; \
523 if [ "$(findstring _ROMBOOT_,$@)" ] ; then \
524 echo "CONFIG_BOOT_ROM = y" >> config.mk ; \
525 echo "... booting from 8-bit flash" ; \
526 else \
527 echo "CONFIG_BOOT_ROM = n" >> config.mk ; \
528 echo "... booting from 64-bit flash" ; \
529 fi; \
530 echo "export CONFIG_BOOT_ROM" >> config.mk; \
531
532ppmc8260_config: unconfig
533 @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260
534
535RPXsuper_config: unconfig
536 @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper
537
538rsdproto_config: unconfig
539 @./mkconfig $(@:_config=) ppc mpc8260 rsdproto
540
541sacsng_config: unconfig
542 @./mkconfig $(@:_config=) ppc mpc8260 sacsng
543
544sbc8260_config: unconfig
545 @./mkconfig $(@:_config=) ppc mpc8260 sbc8260
546
547SCM_config: unconfig
548 @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens
549
550TQM8260_config \
551TQM8260_L2_config \
552TQM8260_266MHz_config \
553TQM8260_L2_266MHz_config \
554TQM8260_300MHz_config: unconfig
555 @ >include/config.h
556 @if [ "$(findstring _L2_,$@)" ] ; then \
557 echo "#define CONFIG_L2_CACHE" >>include/config.h ; \
558 echo "... with L2 Cache support (60x Bus Mode)" ; \
559 else \
560 echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \
561 echo "... without L2 Cache support" ; \
562 fi
563 @[ -z "$(findstring _266MHz,$@)" ] || \
564 { echo "#define CONFIG_266MHz" >>include/config.h ; \
565 echo "... with 266MHz system clock" ; \
566 }
567 @[ -z "$(findstring _300MHz,$@)" ] || \
568 { echo "#define CONFIG_300MHz" >>include/config.h ; \
569 echo "... with 300MHz system clock" ; \
570 }
571 @./mkconfig -a $(call xtract_82xx,$@) ppc mpc8260 tqm8260
572
573#########################################################################
574## 74xx/7xx Systems
575#########################################################################
576
wdenkc7de8292002-11-19 11:04:11 +0000577AmigaOneG3SE_config: unconfig
578 @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI
579
wdenk7ebf7442002-11-02 23:17:16 +0000580EVB64260_config \
581EVB64260_750CX_config: unconfig
582 @./mkconfig EVB64260 ppc 74xx_7xx evb64260
583
584ZUMA_config: unconfig
585 @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260
586
587PCIPPC2_config \
588PCIPPC6_config: unconfig
589 @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2
590
591BAB7xx_config: unconfig
592 @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec
593
594ELPPC_config: unconfig
595 @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec
596
597#========================================================================
598# ARM
599#========================================================================
600#########################################################################
601## StrongARM Systems
602#########################################################################
603
604lart_config : unconfig
605 @./mkconfig $(@:_config=) arm sa1100 lart
606
607dnp1110_config : unconfig
608 @./mkconfig $(@:_config=) arm sa1100 dnp1110
609
610shannon_config : unconfig
611 @./mkconfig $(@:_config=) arm sa1100 shannon
612
613#########################################################################
614## ARM920T Systems
615#########################################################################
616
wdenk43d96162003-03-06 00:02:04 +0000617xtract_trab = $(subst _big_flash,,$(subst _config,,$1))
618
wdenk7ebf7442002-11-02 23:17:16 +0000619smdk2400_config : unconfig
620 @./mkconfig $(@:_config=) arm arm920t smdk2400
621
622smdk2410_config : unconfig
623 @./mkconfig $(@:_config=) arm arm920t smdk2410
624
wdenk43d96162003-03-06 00:02:04 +0000625trab_config \
626trab_big_flash_config: unconfig
627 @ >include/config.h
628 @[ -z "$(findstring _big_flash,$@)" ] || \
629 { echo "#define CONFIG_BIG_FLASH" >>include/config.h ; \
630 echo "... with big flash support" ; \
631 }
632 @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
wdenk7ebf7442002-11-02 23:17:16 +0000633
634#########################################################################
635## ARM720T Systems
636#########################################################################
637
638impa7_config : unconfig
639 @./mkconfig $(@:_config=) arm arm720t impa7
640
641ep7312_config : unconfig
642 @./mkconfig $(@:_config=) arm arm720t ep7312
643
644#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000645## XScale Systems
wdenk7ebf7442002-11-02 23:17:16 +0000646#########################################################################
647
wdenk7ebf7442002-11-02 23:17:16 +0000648cradle_config : unconfig
649 @./mkconfig $(@:_config=) arm xscale cradle
650
651csb226_config : unconfig
652 @./mkconfig $(@:_config=) arm xscale csb226
653
wdenk43d96162003-03-06 00:02:04 +0000654innokom_config : unconfig
655 @./mkconfig $(@:_config=) arm xscale innokom
656
657lubbock_config : unconfig
658 @./mkconfig $(@:_config=) arm xscale lubbock
659
wdenk2262cfe2002-11-18 00:14:45 +0000660#========================================================================
661# i386
662#========================================================================
663#########################################################################
664## AMD SC520 CDP
665#########################################################################
666sc520_cdp_config : unconfig
667 @./mkconfig $(@:_config=) i386 i386 sc520_cdp
668
wdenk43d96162003-03-06 00:02:04 +0000669#========================================================================
670# MIPS
671#========================================================================
wdenk7ebf7442002-11-02 23:17:16 +0000672#########################################################################
wdenk43d96162003-03-06 00:02:04 +0000673## MIPS32 4Kc
674#########################################################################
675
676incaip_config : unconfig
677 @./mkconfig $(@:_config=) mips mips incaip
678
679
wdenk7ebf7442002-11-02 23:17:16 +0000680
681clean:
682 find . -type f \
683 \( -name 'core' -o -name '*.bak' -o -name '*~' \
684 -o -name '*.o' -o -name '*.a' \) -print \
685 | xargs rm -f
686 rm -f examples/hello_world examples/timer examples/eepro100_eeprom
687 rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
688 rm -f tools/easylogo/easylogo tools/bmp_logo
689 rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend
wdenk228f29a2002-12-08 09:53:23 +0000690 rm -f tools/env/fw_printenv tools/env/fw_setenv
wdenk7ebf7442002-11-02 23:17:16 +0000691
692clobber: clean
693 find . -type f \
694 \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
695 -print \
696 | xargs rm -f
697 rm -f $(OBJS) *.bak tags TAGS
698 rm -fr *.*~
699 rm -f u-boot u-boot.bin u-boot.elf u-boot.srec u-boot.map System.map
wdenk228f29a2002-12-08 09:53:23 +0000700 rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
wdenk43d96162003-03-06 00:02:04 +0000701 rm -f cpu/mpc824x/bedbug_603e.c
wdenk7ebf7442002-11-02 23:17:16 +0000702 rm -f include/asm/arch include/asm
703
704mrproper \
705distclean: clobber unconfig
706
707backup:
708 F=`basename $(TOPDIR)` ; cd .. ; \
709 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
710
711#########################################################################