]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/linux-xxs1500-2.4.21/Makefile
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / linux-xxs1500-2.4.21 / Makefile
1 #
2 # This file is subject to the terms and conditions of the GNU General Public
3 # License.  See the file "COPYING" in the main directory of this archive
4 # for more details.
5 #
6 # Copyright (C) 1994, 1995, 1996 by Ralf Baechle
7 # DECStation modifications by Paul M. Antoine, 1996
8 # Copyright (C) 2002, 2003  Maciej W. Rozycki
9 #
10 # This file is included by the global makefile so that you can add your own
11 # architecture-specific flags and dependencies. Remember to do have actions
12 # for "archclean" and "archdep" for cleaning up and making dependencies for
13 # this architecture
14 #
15
16 #
17 # Select the object file format to substitute into the linker script.
18 #
19 ifdef CONFIG_CPU_LITTLE_ENDIAN
20 tool-prefix     = mipsel-linux-
21 ld-emul         = elf32ltsmip
22 else
23 tool-prefix     = mips-linux-
24 ld-emul         = elf32btsmip
25 endif
26
27 ifdef CONFIG_CROSSCOMPILE
28 CROSS_COMPILE   = $(tool-prefix)
29 endif
30
31 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
32
33 #
34 #
35 # GCC uses -G 0 -mabicalls -fpic as default.  We don't want PIC in the kernel
36 # code since it only slows down the whole thing.  At some point we might make
37 # use of global pointer optimizations but their use of $28 conflicts with
38 # the current pointer optimization.
39 #
40 # The DECStation requires an ECOFF kernel for remote booting, other MIPS
41 # machines may also.  Since BFD is incredibly buggy with respect to
42 # crossformat linking we rely on the elf2ecoff tool for format conversion.
43 #
44 GCCFLAGS        := -I $(TOPDIR)/include/asm/gcc
45 GCCFLAGS        += -G 0 -mno-abicalls -fno-pic -pipe
46 GCCFLAGS        += $(call check_gcc, -finline-limit=100000,)
47 LINKFLAGS       += -G 0 -static # -N
48 MODFLAGS        += -mlong-calls
49
50 ifdef CONFIG_DEBUG_INFO
51 GCCFLAGS        += -g
52 ifdef CONFIG_SB1XXX_CORELIS
53 GCCFLAGS        += -mno-sched-prolog -fno-omit-frame-pointer
54 endif
55 endif
56
57 #
58 # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>)
59 #
60 # <cpu0>,<isa0> -- preferred CPU and ISA designations (may require
61 #                  recent tools)
62 # <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work
63 #                  with up to the oldest supported tools)
64 # <isa2>        -- an ISA designation used as an ABI selector for
65 #                  gcc versions that do not support "-mabi=32"
66 #                  (depending on the CPU type, either "mips1" or
67 #                  "mips2")
68 #
69 set_gccflags = $(shell \
70 while :; do \
71         cpu=$(1); isa=-$(2); \
72         for gcc_opt in -march= -mcpu=; do \
73                 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
74                         -xc /dev/null > /dev/null 2>&1 && \
75                         break 2; \
76         done; \
77         cpu=$(3); isa=-$(4); \
78         for gcc_opt in -march= -mcpu=; do \
79                 $(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
80                         -xc /dev/null > /dev/null 2>&1 && \
81                         break 2; \
82         done; \
83         break; \
84 done; \
85 gcc_abi=-mabi=32; gcc_cpu=$$cpu; \
86 if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
87         gcc_isa=$$isa; \
88 else \
89         gcc_abi=; gcc_isa=-$(5); \
90 fi; \
91 gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
92 while :; do \
93         for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
94                 $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
95                         -o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
96                         break 2; \
97         done; \
98         gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \
99         break; \
100 done; \
101 echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa)
102
103 #
104 # CPU-dependent compiler/assembler options for optimization.
105 #
106 ifdef CONFIG_CPU_R3000
107 GCCFLAGS        += $(call set_gccflags,r3000,mips1,r3000,mips1,mips1)
108 endif
109 ifdef CONFIG_CPU_TX39XX
110 GCCFLAGS        += $(call set_gccflags,r3900,mips1,r3000,mips1,mips1)
111 endif
112 ifdef CONFIG_CPU_R6000
113 GCCFLAGS        += $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \
114                    -Wa,--trap
115 endif
116 ifdef CONFIG_CPU_R4300
117 GCCFLAGS        += $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \
118                    -Wa,--trap
119 endif
120 ifdef CONFIG_CPU_VR41XX
121 GCCFLAGS        += $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \
122                    -Wa,--trap
123 endif
124 ifdef CONFIG_CPU_R4X00
125 GCCFLAGS        += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
126                    -Wa,--trap
127 endif
128 ifdef CONFIG_CPU_TX49XX
129 GCCFLAGS        += $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
130                    -Wa,--trap
131 endif
132 ifdef CONFIG_CPU_MIPS32
133 GCCFLAGS        += $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
134                    -Wa,--trap
135 endif
136 ifdef CONFIG_CPU_MIPS64
137 GCCFLAGS        += $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
138                    -Wa,--trap
139 endif
140 ifdef CONFIG_CPU_R5000
141 GCCFLAGS        += $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
142                    -Wa,--trap
143 endif
144 ifdef CONFIG_CPU_R5432
145 GCCFLAGS        += $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \
146                    -Wa,--trap
147 endif
148 ifdef CONFIG_CPU_NEVADA
149 GCCFLAGS        += $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \
150                    -Wa,--trap
151 #GCCFLAGS       += $(call check_gcc,-mmad,)
152 endif
153 ifdef CONFIG_CPU_RM7000
154 GCCFLAGS        += $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \
155                    -Wa,--trap
156 endif
157 ifdef CONFIG_CPU_RM9000
158 GCCFLAGS        += $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
159                    -Wa,--trap
160 endif
161 ifdef CONFIG_CPU_SB1
162 GCCFLAGS        += $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
163                    -Wa,--trap
164 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
165 MODFLAGS        += -msb1-pass1-workarounds
166 endif
167 endif
168
169 AFLAGS          += $(GCCFLAGS)
170 CFLAGS          += $(GCCFLAGS)
171 LDFLAGS         += -m $(ld-emul)
172
173
174 #
175 # We unconditionally build the math emulator
176 #
177 CORE_FILES      += arch/mips/math-emu/fpu_emulator.o
178 SUBDIRS         += arch/mips/math-emu
179
180 #
181 # ramdisk/initrd support
182 # You need a compressed ramdisk image, named ramdisk.gz in
183 # arch/mips/ramdisk
184 #
185 ifdef CONFIG_EMBEDDED_RAMDISK
186 CORE_FILES      += arch/mips/ramdisk/ramdisk.o
187 SUBDIRS         += arch/mips/ramdisk
188 endif
189
190
191 #
192 # Board-dependent options and extra files
193 #
194
195 #
196 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
197 #
198 ifdef CONFIG_MIPS_JAZZ
199 CORE_FILES      += arch/mips/jazz/jazz.o
200 SUBDIRS         += arch/mips/jazz arch/mips/arc
201 LIBS            += arch/mips/arc/arclib.a
202 LOADADDR        := 0x80080000
203 endif
204
205 #
206 # Au1000 (Alchemy Semi PB1000) eval board
207 #
208 ifdef CONFIG_MIPS_PB1000
209 LIBS            += arch/mips/au1000/pb1000/pb1000.o \
210                    arch/mips/au1000/common/au1000.o
211 SUBDIRS         += arch/mips/au1000/pb1000 arch/mips/au1000/common
212 LOADADDR        := 0x80100000
213 endif
214
215 #
216 # Au1100 (Alchemy Semi PB1100) eval board
217 #
218 ifdef CONFIG_MIPS_PB1100
219 LIBS          += arch/mips/au1000/pb1100/pb1100.o \
220                  arch/mips/au1000/common/au1000.o
221 SUBDIRS       += arch/mips/au1000/pb1100 arch/mips/au1000/common
222 LOADADDR      += 0x80100000
223 endif
224
225 #
226 # Au1500 (Alchemy Semi PB1500) eval board
227 #
228 ifdef CONFIG_MIPS_PB1500
229 LIBS            += arch/mips/au1000/pb1500/pb1500.o \
230                    arch/mips/au1000/common/au1000.o
231 SUBDIRS         += arch/mips/au1000/pb1500 arch/mips/au1000/common
232 LOADADDR        := 0x80100000
233 endif
234
235 #
236 # Au1x00 (AMD/Alchemy) eval boards
237 #
238 ifdef CONFIG_MIPS_DB1000
239 LIBS          += arch/mips/au1000/db1x00/db1x00.o \
240                  arch/mips/au1000/common/au1000.o
241 SUBDIRS       += arch/mips/au1000/db1x00 arch/mips/au1000/common
242 LOADADDR      += 0x80100000
243 endif
244
245 ifdef CONFIG_MIPS_DB1500
246 LIBS          += arch/mips/au1000/db1x00/db1x00.o \
247                  arch/mips/au1000/common/au1000.o
248 SUBDIRS       += arch/mips/au1000/db1x00 arch/mips/au1000/common
249 LOADADDR      += 0x80100000
250 endif
251
252 ifdef CONFIG_MIPS_DB1100
253 LIBS          += arch/mips/au1000/db1x00/db1x00.o \
254                  arch/mips/au1000/common/au1000.o
255 SUBDIRS       += arch/mips/au1000/db1x00 arch/mips/au1000/common
256 LOADADDR      += 0x80100000
257 endif
258
259 ifdef CONFIG_MIPS_HYDROGEN3
260 LIBS          += arch/mips/au1000/hydrogen3/hydrogen3.o \
261                  arch/mips/au1000/common/au1000.o
262 SUBDIRS       += arch/mips/au1000/hydrogen3 arch/mips/au1000/common
263 LOADADDR      += 0x80100000
264 endif
265
266 ifdef CONFIG_MIPS_BOSPORUS
267 LIBS          += arch/mips/au1000/db1x00/db1x00.o \
268                  arch/mips/au1000/common/au1000.o
269 SUBDIRS       += arch/mips/au1000/db1x00 arch/mips/au1000/common
270 LOADADDR      += 0x80100000
271 endif
272
273 ifdef CONFIG_MIPS_MIRAGE
274 LIBS          += arch/mips/au1000/db1x00/db1x00.o \
275                  arch/mips/au1000/common/au1000.o
276 SUBDIRS       += arch/mips/au1000/db1x00 arch/mips/au1000/common
277 LOADADDR      += 0x80100000
278 endif
279
280 ifdef CONFIG_MIPS_XXS1500
281 LIBS          += arch/mips/au1000/xxs1500/xxs1500.o \
282                  arch/mips/au1000/common/au1000.o
283 SUBDIRS       += arch/mips/au1000/xxs1500 arch/mips/au1000/common
284 LOADADDR      += 0x80100000
285 endif
286
287 ifdef CONFIG_MIPS_MTX1
288 LIBS          += arch/mips/au1000/mtx-1/mtx-1.o \
289                  arch/mips/au1000/common/au1000.o
290 SUBDIRS       += arch/mips/au1000/mtx-1 arch/mips/au1000/common
291 LOADADDR      += 0x80100000
292 endif
293
294 ifdef CONFIG_MIPS_PB1550
295 LIBS          += arch/mips/au1000/pb1550/pb1550.o \
296                  arch/mips/au1000/common/au1000.o
297 SUBDIRS       += arch/mips/au1000/pb1550 arch/mips/au1000/common
298 LOADADDR      += 0x80100000
299 endif
300
301
302 #
303 # Cogent CSB250
304 #
305 ifdef CONFIG_COGENT_CSB250
306 LIBS            += arch/mips/au1000/csb250/csb250.o \
307                    arch/mips/au1000/common/au1000.o
308 SUBDIRS         += arch/mips/au1000/csb250 arch/mips/au1000/common
309 LOADADDR        := 0x80100000
310 endif
311
312 ifdef CONFIG_PCI
313 CORE_FILES    += arch/mips/pci/pci-core.o
314 SUBDIRS       += arch/mips/pci
315 endif
316
317 #
318 # Algorithmics P4032
319 #
320 ifdef CONFIG_ALGOR_P4032
321 CORE_FILES      += arch/mips/algor/algor.o
322 SUBDIRS         += arch/mips/algor
323 LOADADDR        := 0x80000000
324 endif
325
326 #
327 # Baget/MIPS
328 #
329 ifdef CONFIG_BAGET_MIPS
330 SUBDIRS         += arch/mips/baget arch/mips/baget/prom
331 LIBS            += arch/mips/baget/baget.a arch/mips/baget/prom/bagetlib.a
332 LOADADDR        := 0x80001000
333 endif
334
335 #
336 # Cobalt Server
337 #
338 ifdef CONFIG_MIPS_COBALT
339 SUBDIRS         += arch/mips/cobalt
340 CORE_FILES      += arch/mips/cobalt/cobalt.o
341 LOADADDR        := 0x80080000
342 endif
343
344 #
345 # DECstation family
346 #
347 ifdef CONFIG_DECSTATION
348 CORE_FILES      += arch/mips/dec/dec.o
349 SUBDIRS         += arch/mips/dec arch/mips/dec/prom
350 LIBS            += arch/mips/dec/prom/rexlib.a
351 LOADADDR        := 0x80040000
352 endif
353
354 #
355 # Galileo EV64120 Board
356 #
357 ifdef CONFIG_MIPS_EV64120
358 LIBS            += arch/mips/gt64120/common/gt64120.o \
359                    arch/mips/gt64120/ev64120/ev64120.o
360 SUBDIRS         += arch/mips/gt64120/common arch/mips/gt64120/ev64120
361 LOADADDR        := 0x80100000
362 endif
363
364 #
365 # Galileo EV96100 Board
366 #
367 ifdef CONFIG_MIPS_EV96100
368 LIBS            += arch/mips/galileo-boards/ev96100/ev96100.o
369 SUBDIRS         += arch/mips/galileo-boards/ev96100
370 LOADADDR        := 0x80100000
371 endif
372
373 #
374 # Globespan IVR eval board with QED 5231 CPU
375 #
376 ifdef CONFIG_MIPS_IVR
377 LIBS            += arch/mips/ite-boards/ivr/ivr.o \
378                    arch/mips/ite-boards/generic/it8172.o
379 SUBDIRS         += arch/mips/ite-boards/generic arch/mips/ite-boards/ivr
380 LOADADDR        := 0x80100000
381 endif
382
383 #
384 # HP LaserJet
385 #
386 ifdef CONFIG_HP_LASERJET
387 SUBDIRS         += arch/mips/hp-lj
388 LIBS            += arch/mips/hp-lj/hp-lj.o
389 LOADADDR        := 0x80030000
390 endif
391
392 #
393 # ITE 8172 eval board with QED 5231 CPU
394 #
395 ifdef CONFIG_MIPS_ITE8172
396 LIBS            += arch/mips/ite-boards/qed-4n-s01b/ite.o \
397                    arch/mips/ite-boards/generic/it8172.o
398 SUBDIRS         += arch/mips/ite-boards/generic arch/mips/ite-boards/qed-4n-s01b
399 LOADADDR        := 0x80100000
400 endif
401
402 #
403 # MIPS Atlas board
404 #
405 ifdef CONFIG_MIPS_ATLAS
406 LIBS            += arch/mips/mips-boards/atlas/atlas.o \
407                    arch/mips/mips-boards/generic/mipsboards.o
408 SUBDIRS         += arch/mips/mips-boards/generic arch/mips/mips-boards/atlas
409 LOADADDR        := 0x80100000
410 endif
411
412 #
413 # MIPS Malta board
414 #
415 ifdef CONFIG_MIPS_MALTA
416 LIBS            += arch/mips/mips-boards/malta/malta.o \
417                    arch/mips/mips-boards/generic/mipsboards.o
418 SUBDIRS         += arch/mips/mips-boards/malta arch/mips/mips-boards/generic
419 LOADADDR        := 0x80100000
420 endif
421
422 #
423 # MIPS SEAD board
424 #
425 ifdef CONFIG_MIPS_SEAD
426 LIBS            += arch/mips/mips-boards/sead/sead.o \
427                    arch/mips/mips-boards/generic/mipsboards.o
428 SUBDIRS         += arch/mips/mips-boards/generic arch/mips/mips-boards/sead
429 LOADADDR        := 0x80100000
430 endif
431
432 #
433 # Momentum Ocelot board
434 #
435 ifdef CONFIG_MOMENCO_OCELOT
436 # The Ocelot setup.o must be linked early - it does the ioremap() for the
437 # mips_io_port_base.
438 CORE_FILES      += arch/mips/gt64120/common/gt64120.o \
439                    arch/mips/gt64120/momenco_ocelot/momenco_ocelot.o
440 SUBDIRS         += arch/mips/gt64120/common arch/mips/gt64120/momenco_ocelot
441 LOADADDR        := 0x80100000
442 endif
443
444 #
445 # Momentum Ocelot-G board
446 #
447 ifdef CONFIG_MOMENCO_OCELOT_G
448 # The Ocelot-G setup.o must be linked early - it does the ioremap() for the
449 # mips_io_port_base.
450 CORE_FILES      += arch/mips/momentum/ocelot_g/ocelot_g.o
451 SUBDIRS         += arch/mips/momentum/ocelot_g
452 LOADADDR        := 0x80100000
453 endif
454
455 #
456 # Momentum Ocelot-C and -CS boards
457 #
458 ifdef CONFIG_MOMENCO_OCELOT_C
459 # The Ocelot-C[S] setup.o must be linked early - it does the ioremap() for the
460 # mips_io_port_base.
461 CORE_FILES      += arch/mips/momentum/ocelot_c/ocelot_c.o
462 SUBDIRS         += arch/mips/momentum/ocelot_c
463 LOADADDR        := 0x80100000
464 endif
465
466 ifdef CONFIG_MOMENCO_JAGUAR_ATX
467 LIBS            += arch/mips/momentum/jaguar_atx/jaguar_atx.o
468 SUBDIRS         += arch/mips/momentum/jaguar_atx
469 ifdef CONFIG_JAGUAR_DMALOW
470 LOADADDR        := 0x88000000
471 else
472 LOADADDR        := 0x80100000
473 endif
474 endif
475
476 #
477 # NEC DDB Vrc-5074
478 #
479 ifdef CONFIG_DDB5074
480 SUBDIRS         += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5074
481 LIBS            += arch/mips/ddb5xxx/common/ddb5xxx.o arch/mips/ddb5xxx/ddb5074/ddb5074.o
482 LOADADDR        := 0x80080000
483 endif
484
485 #
486 # NEC DDB Vrc-5476
487 #
488 ifdef CONFIG_DDB5476
489 SUBDIRS         += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5476
490 LIBS            += arch/mips/ddb5xxx/common/ddb5xxx.o \
491                    arch/mips/ddb5xxx/ddb5476/ddb5476.o
492 LOADADDR        := 0x80080000
493 endif
494
495 #
496 # NEC DDB Vrc-5477
497 #
498 ifdef CONFIG_DDB5477
499 SUBDIRS         += arch/mips/ddb5xxx/common arch/mips/ddb5xxx/ddb5477
500 LIBS            += arch/mips/ddb5xxx/common/ddb5xxx.o \
501                    arch/mips/ddb5xxx/ddb5477/ddb5477.o
502 LOADADDR        := 0x80100000
503 endif
504
505 ifdef CONFIG_LASAT
506 LIBS          += arch/mips/lasat/lasatkern.o
507 SUBDIRS       += arch/mips/lasat
508 LOADADDR      += 0x80000000
509 endif
510 #
511 # NEC Osprey (vr4181) board
512 #
513 ifdef CONFIG_NEC_OSPREY
514 SUBDIRS         += arch/mips/vr4181/common arch/mips/vr4181/osprey
515 LIBS            += arch/mips/vr4181/common/vr4181.o \
516                    arch/mips/vr4181/osprey/osprey.o
517 LOADADDR        := 0x80002000
518 endif
519
520 #
521 # NEC Eagle/Hawk (VR4122/VR4131) board
522 #
523 ifdef CONFIG_NEC_EAGLE
524 SUBDIRS         += arch/mips/vr41xx/common \
525                    arch/mips/vr41xx/nec-eagle
526 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
527                    arch/mips/vr41xx/nec-eagle/eagle.o
528 LOADADDR        := 0x80000000
529 endif
530
531 #
532 # ZAO Networks Capcella (VR4131)
533 #
534 ifdef CONFIG_ZAO_CAPCELLA
535 SUBDIRS         += arch/mips/vr41xx/common \
536                    arch/mips/vr41xx/zao-capcella
537 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
538                    arch/mips/vr41xx/zao-capcella/capcella.o
539 LOADADDR        := 0x80000000
540 endif
541
542 #
543 # Victor MP-C303/304 (VR4122)
544 #
545 ifdef CONFIG_VICTOR_MPC30X
546 SUBDIRS         += arch/mips/vr41xx/common \
547                    arch/mips/vr41xx/victor-mpc30x
548 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
549                    arch/mips/vr41xx/victor-mpc30x/mpc30x.o
550 LOADADDR        := 0x80001000
551 endif
552
553 #
554 # IBM WorkPad z50 (VR4121)
555 #
556 ifdef CONFIG_IBM_WORKPAD
557 SUBDIRS         += arch/mips/vr41xx/common \
558                    arch/mips/vr41xx/ibm-workpad
559 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
560                    arch/mips/vr41xx/ibm-workpad/workpad.o
561 LOADADDR        += 0x80004000
562 endif
563
564 #
565 # CASIO CASSIPEIA E-55/65 (VR4111)
566 #
567 ifdef CONFIG_CASIO_E55
568 SUBDIRS         += arch/mips/vr41xx/common \
569                    arch/mips/vr41xx/casio-e55
570 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
571                    arch/mips/vr41xx/casio-e55/e55.o
572 LOADADDR        += 0x80004000
573 endif
574
575 #
576 # TANBAC TB0226 Mbase (VR4131)
577 #
578 ifdef CONFIG_TANBAC_TB0226
579 SUBDIRS         += arch/mips/vr41xx/common \
580                    arch/mips/vr41xx/tanbac-tb0226
581 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
582                    arch/mips/vr41xx/tanbac-tb0226/tb0226.o
583 LOADADDR        := 0x80000000
584 endif
585
586 #
587 # TANBAC TB0229 (VR4131DIMM)
588 #
589 ifdef CONFIG_TANBAC_TB0229
590 SUBDIRS         += arch/mips/vr41xx/common \
591                    arch/mips/vr41xx/tanbac-tb0229
592 CORE_FILES      += arch/mips/vr41xx/common/vr41xx.o \
593                    arch/mips/vr41xx/tanbac-tb0229/tb0229.o
594 LOADADDR        := 0x80000000
595 endif
596
597 #
598 # Philips Nino
599 #
600 ifdef CONFIG_NINO
601 CORE_FILES      += arch/mips/philips/nino/nino.o
602 SUBDIRS         += arch/mips/philips/nino
603 LOADADDR        := 0x80000000
604 endif
605
606 #
607 # SGI IP22 (Indy/Indigo2)
608 #
609 ifdef CONFIG_SGI_IP22
610 CORE_FILES      += arch/mips/sgi-ip22/ip22-kern.o
611 LIBS            += arch/mips/arc/arclib.a
612 SUBDIRS         += arch/mips/sgi-ip22 arch/mips/arc
613 #
614 # Set LOADADDR to >= 0x88069000 if you want to leave space for symmon,
615 # 0x88002000 for production kernels.  Note that the value must be
616 # 8kb aligned or the handling of the current variable will break.
617 #
618 LOADADDR        := 0x88002000
619 endif
620
621 #
622 # Sibyte SB1250 SOC and Broadcom (SiByte) BCM112x SOCs
623 #
624 ifneq ($(CONFIG_SIBYTE_SB1250)$(CONFIG_SIBYTE_BCM112X),)
625 # This is a LIB so that it links at the end, and initcalls are later
626 # the sequence; but it is built as an object so that modules don't get
627 # removed (as happens, even if they have __initcall/module_init)
628 LIBS            += arch/mips/sibyte/sb1250/sb1250.o
629 SUBDIRS         += arch/mips/sibyte/sb1250
630 LOADADDR        := 0x80100000
631 endif
632
633 #
634 # Sibyte boards:
635 #
636 # BCM91250A (SWARM),
637 # BCM91250E (Sentosa),
638 # BCM91120C (CRhine),
639 # BCM91120x (Carmel),
640 # BCM91125C (CRhone),
641 # BCM91125E (Rhone).
642 #
643 ifdef CONFIG_SIBYTE_BOARD
644 LIBS            += arch/mips/sibyte/swarm/sbswarm.a
645 SUBDIRS         += arch/mips/sibyte/swarm
646 endif
647
648 #
649 # Sibyte CFE firmware
650 #
651 ifdef CONFIG_SIBYTE_CFE
652 LIBS            += arch/mips/sibyte/cfe/cfe.a
653 SUBDIRS         += arch/mips/sibyte/cfe
654 endif
655
656 #
657 # SNI RM200 PCI
658 #
659 ifdef CONFIG_SNI_RM200_PCI
660 CORE_FILES      += arch/mips/sni/sni.o
661 SUBDIRS         += arch/mips/sni arch/mips/arc
662 LIBS            += arch/mips/arc/arclib.a
663 LOADADDR        := 0x80080000
664 endif
665
666 #
667 # Toshiba JMR-TX3927 board
668 #
669 ifdef CONFIG_TOSHIBA_JMR3927
670 CORE_FILES      += arch/mips/jmr3927/rbhma3100/jmr3927.o \
671                    arch/mips/jmr3927/common/tx3927.o
672 SUBDIRS         += arch/mips/jmr3927/rbhma3100 arch/mips/jmr3927/common
673 LOADADDR        := 0x80050000
674 endif
675
676 #
677 # Toshiba RBTX4927 board or
678 # Toshiba RBTX4937 board
679 #
680 ifdef CONFIG_TOSHIBA_RBTX4927
681 MIPS           = arch/mips
682 CEC            = tx4927
683 COMMON         = $(MIPS)/$(CEC)/common
684 BOARD          = $(MIPS)/$(CEC)/toshiba_rbtx4927
685 LIBS          += $(BOARD)/toshiba_rbtx4927.o $(COMMON)/tx4927.o
686 SUBDIRS       += $(BOARD)                    $(COMMON)
687 LOADADDR      += 0x80020000
688 endif
689
690 #
691 # Choosing incompatible machines durings configuration will result in
692 # error messages during linking.  Select a default linkscript if
693 # none has been choosen above.
694 #
695 vmlinux: arch/$(ARCH)/ld.script
696
697 arch/$(ARCH)/ld.script: arch/$(ARCH)/ld.script.in arch/$(ARCH)/Makefile
698         sed -e 's/@@LOADADDR@@/$(LOADADDR)/' <$< >$@
699 LINKFLAGS       += -T arch/$(ARCH)/ld.script
700
701 HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
702
703 SUBDIRS := $(addprefix arch/mips/, tools) $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib)
704 CORE_FILES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(CORE_FILES)
705 LIBS := arch/mips/lib/lib.a $(LIBS)
706
707 ifdef CONFIG_BAGET_MIPS
708
709 BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget
710
711 balo: vmlinux
712         $(BAGETBOOT) balo
713
714 endif
715
716 ifdef CONFIG_MIPS_EV64120
717 gboot: vmlinux
718         $(MAKE) -C arch/$(ARCH)/galileo-boards/ev64120/compressed
719 endif
720
721 ifdef CONFIG_LASAT
722 rom.bin rom.sw: vmlinux
723         $(MAKE) -C arch/$(ARCH)/lasat/image $@
724 endif
725
726 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
727 MAKEZBOOT = $(MAKE) -C arch/$(ARCH)/zboot
728 BOOT_TARGETS = zImage zImage.initrd zImage.flash zImage.flash.bin
729
730 vmlinux.ecoff: vmlinux
731         @$(MAKEBOOT) $@
732
733  $(BOOT_TARGETS): vmlinux
734         @$(MAKEZBOOT) $@
735
736 vmlinux.srec: vmlinux
737         @$(MAKEBOOT) $@
738
739 archclean:
740         @$(MAKEBOOT) clean
741         @$(MAKEZBOOT) clean
742         rm -f arch/$(ARCH)/ld.script
743         $(MAKE) -C arch/$(ARCH)/tools clean
744         $(MAKE) -C arch/mips/baget clean
745         $(MAKE) -C arch/mips/lasat clean
746
747 archmrproper:
748         @$(MAKEBOOT) mrproper
749         $(RM) $(TOPDIR)/include/asm-$(ARCH)/offset.h
750         $(MAKE) -C arch/$(ARCH)/tools mrproper
751
752 archdep:
753         if [ ! -f $(TOPDIR)/include/asm-$(ARCH)/offset.h ]; then \
754                 touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \
755         fi;
756         @$(MAKEBOOT) dep