diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2007-11-30 10:28:26 -0500 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-02-08 05:06:26 -0500 |
commit | dbf9f14476dc88887b6e8f29eea97162ce4d8cbd (patch) | |
tree | 69297c3545d44df35f3e55348c514a844ff8c984 /arch/cris/arch-v32/boot | |
parent | 28bf739b127c0f0e893baf4efd97d218247d5d71 (diff) |
CRIS v32: Update boot rescue Kbuild makefile.
- Remove old specific targets, use more generic ones instead.
- Use if_changed to avoid creating new images when no change.
- Use EXTRA_CFLAGS instead of CFLAGS.
Diffstat (limited to 'arch/cris/arch-v32/boot')
-rw-r--r-- | arch/cris/arch-v32/boot/rescue/Makefile | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/arch/cris/arch-v32/boot/rescue/Makefile b/arch/cris/arch-v32/boot/rescue/Makefile index f668a8198724..43260e772007 100644 --- a/arch/cris/arch-v32/boot/rescue/Makefile +++ b/arch/cris/arch-v32/boot/rescue/Makefile | |||
@@ -1,36 +1,27 @@ | |||
1 | # | 1 | # |
2 | # Makefile for rescue code | 2 | # Makefile for rescue (bootstrap) code |
3 | # | 3 | # |
4 | target = $(target_rescue_dir) | ||
5 | src = $(src_rescue_dir) | ||
6 | 4 | ||
7 | CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) | 5 | CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) |
8 | CFLAGS = -O2 | 6 | EXTRA_CFLAGS = -O2 |
7 | AFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch | ||
8 | EXTRA_CFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch | ||
9 | LD = gcc-cris -mlinux -march=v32 -nostdlib | 9 | LD = gcc-cris -mlinux -march=v32 -nostdlib |
10 | LDFLAGS = -T $(obj)/rescue.ld | ||
11 | LDPOSTFLAGS = -lgcc | ||
10 | OBJCOPY = objcopy-cris | 12 | OBJCOPY = objcopy-cris |
11 | OBJCOPYFLAGS = -O binary --remove-section=.bss | 13 | OBJCOPYFLAGS = -O binary --remove-section=.bss |
14 | obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o | ||
15 | OBJECT := $(obj)/head.o | ||
12 | 16 | ||
13 | all: $(target)/rescue.bin | 17 | targets := rescue.o rescue.bin |
14 | 18 | ||
15 | rescue: rescue.bin | 19 | quiet_cmd_ldlibgcc = LD $@ |
16 | # do nothing | 20 | cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@ |
17 | 21 | ||
18 | $(target)/rescue.bin: $(target) $(target)/head.o | 22 | $(obj)/rescue.o: $(OBJECTS) FORCE |
19 | $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o | 23 | $(call if_changed,ldlibgcc) |
20 | $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin | ||
21 | cp -p $(target)/rescue.bin $(objtree) | ||
22 | 24 | ||
23 | $(target): | 25 | $(obj)/rescue.bin: $(obj)/rescue.o FORCE |
24 | mkdir -p $(target) | 26 | $(call if_changed,objcopy) |
25 | 27 | cp -p $(obj)/rescue.bin $(objtree) | |
26 | $(target)/head.o: $(src)/head.S | ||
27 | $(CC) -D__ASSEMBLY__ -c $< -o $*.o | ||
28 | |||
29 | clean: | ||
30 | rm -f $(target)/*.o $(target)/*.bin | ||
31 | |||
32 | fastdep: | ||
33 | |||
34 | modules: | ||
35 | |||
36 | modules-install: | ||