diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2010-05-30 10:28:03 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-08-05 08:25:58 -0400 |
commit | 35eaa1e9c9b4579100320814aeebff167ee59b0a (patch) | |
tree | ffa02e53532248ff0f24fa4aaa5ac0922d03a70d /arch/mips/Makefile | |
parent | 961e196c7a3b3c3d1d9eb32629b0e745ce0a68d1 (diff) |
MIPS: Refactor arch/mips/boot/compressed/Makefile
- use hostprogs-y for the elf2ecoff
- list all *.o file in targets
- renamed obj-y to vmlinuzobjs-y (it was confusing to re-use a kbuild variable)
- fix all uses of if_changed/cmd
- use kbuild rules to beautify output
- update clean-file to clean vmlinuz.* in top-level directory
- simplied logic in arch/mips/Makefile for compressed targets
The net result is a more kbuild conformant Makefile but
readability did not increase.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
To: linux-mips <linux-mips@linux-mips.org>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/1304/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 93ce1cefcdf8..3637ba52ebce 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -266,26 +266,18 @@ vmlinux.32: vmlinux | |||
266 | vmlinux.64: vmlinux | 266 | vmlinux.64: vmlinux |
267 | $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@ | 267 | $(OBJCOPY) -O $(64bit-bfd) $(OBJCOPYFLAGS) $< $@ |
268 | 268 | ||
269 | makezboot =$(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ | ||
270 | VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $(1) | ||
271 | |||
272 | all: $(all-y) | 269 | all: $(all-y) |
273 | 270 | ||
274 | vmlinuz: vmlinux FORCE | 271 | # boot |
275 | +@$(call makezboot,$@) | ||
276 | |||
277 | vmlinuz.bin: vmlinux | ||
278 | +@$(call makezboot,$@) | ||
279 | |||
280 | vmlinuz.ecoff: vmlinux | ||
281 | +@$(call makezboot,$@) | ||
282 | |||
283 | vmlinuz.srec: vmlinux | ||
284 | +@$(call makezboot,$@) | ||
285 | |||
286 | vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE | 272 | vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE |
287 | $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) arch/mips/boot/$@ | 273 | $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) arch/mips/boot/$@ |
288 | 274 | ||
275 | # boot/compressed | ||
276 | vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE | ||
277 | $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ | ||
278 | VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@ | ||
279 | |||
280 | |||
289 | CLEAN_FILES += vmlinux.ecoff \ | 281 | CLEAN_FILES += vmlinux.ecoff \ |
290 | vmlinux.srec | 282 | vmlinux.srec |
291 | 283 | ||