ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.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, 2002 by Ralf Baechle
7 #
8
9 #
10 # Some DECstations need all possible sections of an ECOFF executable
11 #
12 ifdef CONFIG_MACH_DECSTATION
13   E2EFLAGS = -a
14 else
15   E2EFLAGS =
16 endif
17
18 #
19 # Drop some uninteresting sections in the kernel.
20 # This is only relevant for ELF kernels but doesn't hurt a.out
21 #
22 drop-sections   = .reginfo .mdebug .comment .note .pdr
23 strip-flags     = $(addprefix --remove-section=,$(drop-sections))
24
25 all: vmlinux.ecoff vmlinux.srec addinitrd
26
27 vmlinux.ecoff:  $(obj)/elf2ecoff vmlinux
28         $(obj)/elf2ecoff vmlinux vmlinux.ecoff $(E2EFLAGS)
29
30 $(obj)/elf2ecoff: $(obj)/elf2ecoff.c
31         $(HOSTCC) -o $@ $^
32
33 vmlinux.srec:   vmlinux
34         $(OBJCOPY) -S -O srec $(strip-flags) vmlinux $(obj)/vmlinux.srec
35
36 $(obj)/addinitrd: $(obj)/addinitrd.c
37         $(HOSTCC) -o $@ $^
38
39 archhelp:
40         @echo   '* vmlinux.ecoff        - ECOFF boot image'
41
42 CLEAN_FILES += addinitrd \
43                elf2ecoff \
44                vmlinux.ecoff \
45                vmlinux.srec \
46                zImage.tmp \
47                zImage