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#
8
9USE_STANDARD_AS_RULE := true
10
11#
12# Some DECstations need all possible sections of an ECOFF executable
13#
14ifdef CONFIG_DECSTATION
15  E2EFLAGS = -a
16else
17  E2EFLAGS =
18endif
19
20#
21# Drop some uninteresting sections in the kernel.
22# This is only relevant for ELF kernels but doesn't hurt a.out
23#
24drop-sections	= .reginfo .mdebug
25strip-flags	= $(addprefix --remove-section=,$(drop-sections))
26
27all: vmlinux.ecoff addinitrd
28
29vmlinux.ecoff:	$(CONFIGURE) elf2ecoff $(TOPDIR)/vmlinux
30	./elf2ecoff $(TOPDIR)/vmlinux vmlinux.ecoff $(E2EFLAGS)
31
32elf2ecoff: elf2ecoff.c
33	$(HOSTCC) -o $@ $^
34
35addinitrd: addinitrd.c
36	$(HOSTCC) -o $@ $^
37
38# Don't build dependencies, this may die if $(CC) isn't gcc
39dep:
40
41clean:
42	rm -f vmlinux.ecoff
43	rm -f zImage zImage.tmp
44
45mrproper:
46	rm -f vmlinux.ecoff
47	rm -f addinitrd
48	rm -f elf2ecoff
49
50dummy:
51
52include $(TOPDIR)/Rules.make
53