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
6 # Copyright (C) 1995, 1998, 2001 by Ralf Baechle
7 # Copyright (C) 2004 Maciej W. Rozycki
10 USE_STANDARD_AS_RULE := true
13 # Some DECstations need all possible sections of an ECOFF executable
15 ifdef CONFIG_DECSTATION
22 # Drop some uninteresting sections in the kernel.
23 # This is only relevant for ELF kernels but doesn't hurt a.out
25 drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options
26 strip-flags = $(addprefix --remove-section=,$(drop-sections))
28 VMLINUX = $(TOPDIR)/vmlinux
32 boot: vmlinux.ecoff vmlinux.srec addinitrd
34 vmlinux.ecoff: $(CONFIGURE) elf2ecoff $(VMLINUX)
35 ./elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS)
37 elf2ecoff: elf2ecoff.c
40 vmlinux.srec: $(CONFIGURE) $(VMLINUX)
41 $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) vmlinux.srec
43 addinitrd: addinitrd.c
46 # Don't build dependencies, this may die if $(CC) isn't gcc
50 rm -f vmlinux.ecoff vmlinux.srec
53 rm -f vmlinux.ecoff vmlinux.srec addinitrd elf2ecoff
57 include $(TOPDIR)/Rules.make