Hi, Sam This patch really make the Makefile looks better, Could you please apply the similar modification to arch/mips/boot/compressed/Makefile? thanks! Regards, Wu Zhangjin On Sat, 2010-05-29 at 21:57 +0200, Sam Ravnborg wrote: > >From 0b95917f21f145d07351fb098b3f4804c4bf6ca1 Mon Sep 17 00:00:00 2001 > From: Sam Ravnborg <sam@xxxxxxxxxxxx> > Date: Sat, 29 May 2010 21:50:50 +0200 > Subject: [PATCH] mips: refactor arch/mips/boot/Makefile > > - remove stuff that is not needed > VMLINUX assignment, all: rule, unused assignment > - use hostprogs-y for the host program > - use direct assignmnet when possible > - use kbuild rules for the three targets - to beautify output > - update clean-files to specify the targets that is built in the top.level dir > > Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> > --- > arch/mips/boot/Makefile | 30 +++++++++++++++--------------- > 1 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile > index de20e81..28dbf92 100644 > --- a/arch/mips/boot/Makefile > +++ b/arch/mips/boot/Makefile > @@ -11,32 +11,32 @@ > # Some DECstations need all possible sections of an ECOFF executable > # > ifdef CONFIG_MACH_DECSTATION > - E2EFLAGS = -a > -else > - E2EFLAGS = > + E2EFLAGS := -a > endif > > # > # Drop some uninteresting sections in the kernel. > # This is only relevant for ELF kernels but doesn't hurt a.out > # > -drop-sections = .reginfo .mdebug .comment .note .pdr .options .MIPS.options > -strip-flags = $(addprefix --remove-section=,$(drop-sections)) > +drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options > +strip-flags := $(addprefix --remove-section=,$(drop-sections)) > > -VMLINUX = vmlinux > - > -all: vmlinux.ecoff vmlinux.srec > +hostprogs-y := elf2ecoff > > +quiet_cmd_ecoff = ECOFF $@ > + cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS) > vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) > - $(obj)/elf2ecoff $(VMLINUX) $(obj)/vmlinux.ecoff $(E2EFLAGS) > - > -$(obj)/elf2ecoff: $(obj)/elf2ecoff.c > - $(HOSTCC) -o $@ $^ > + $(call cmd,ecoff) > > +quiet_cmd_bin = OBJCOPY $@ > + cmd_bin = $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin > vmlinux.bin: $(VMLINUX) > - $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $(obj)/vmlinux.bin > + $(call cmd,bin) > > +quiet_cmd_srec = OBJCOPY $@ > + cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec > vmlinux.srec: $(VMLINUX) > - $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec > + $(call cmd,srec) > > -clean-files += elf2ecoff > +# clean files created in top-level directory > +clean-files := $(objtree)/vmlinux.*