import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / mips / boot / 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) 1995, 1998, 2001 by Ralf Baechle
7 # Copyright (C) 2004  Maciej W. Rozycki
8 #
9
10 USE_STANDARD_AS_RULE := true
11
12 #
13 # Some DECstations need all possible sections of an ECOFF executable
14 #
15 ifdef CONFIG_DECSTATION
16   E2EFLAGS = -a
17 else
18   E2EFLAGS =
19 endif
20
21 #
22 # Drop some uninteresting sections in the kernel.
23 # This is only relevant for ELF kernels but doesn't hurt a.out
24 #
25 drop-sections   = .reginfo .mdebug .comment .note .pdr .options .MIPS.options
26 strip-flags     = $(addprefix --remove-section=,$(drop-sections))
27
28 VMLINUX = $(TOPDIR)/vmlinux
29
30 all:
31
32 boot: vmlinux.ecoff vmlinux.srec addinitrd
33
34 vmlinux.ecoff:  $(CONFIGURE) elf2ecoff $(VMLINUX)
35         ./elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS)
36
37 elf2ecoff: elf2ecoff.c
38         $(HOSTCC) -o $@ $^
39
40 vmlinux.srec: $(CONFIGURE) $(VMLINUX)
41         $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) vmlinux.srec
42
43 addinitrd: addinitrd.c
44         $(HOSTCC) -o $@ $^
45
46 # Don't build dependencies, this may die if $(CC) isn't gcc
47 dep:
48
49 clean:
50         rm -f vmlinux.ecoff vmlinux.srec
51
52 mrproper:
53         rm -f vmlinux.ecoff vmlinux.srec addinitrd elf2ecoff
54
55 dummy:
56
57 include $(TOPDIR)/Rules.make