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