aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32/boot
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2007-11-30 10:28:26 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:26 -0500
commitdbf9f14476dc88887b6e8f29eea97162ce4d8cbd (patch)
tree69297c3545d44df35f3e55348c514a844ff8c984 /arch/cris/arch-v32/boot
parent28bf739b127c0f0e893baf4efd97d218247d5d71 (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/Makefile41
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#
4target = $(target_rescue_dir)
5src = $(src_rescue_dir)
6 4
7CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) 5CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
8CFLAGS = -O2 6EXTRA_CFLAGS = -O2
7AFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch
8EXTRA_CFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch
9LD = gcc-cris -mlinux -march=v32 -nostdlib 9LD = gcc-cris -mlinux -march=v32 -nostdlib
10LDFLAGS = -T $(obj)/rescue.ld
11LDPOSTFLAGS = -lgcc
10OBJCOPY = objcopy-cris 12OBJCOPY = objcopy-cris
11OBJCOPYFLAGS = -O binary --remove-section=.bss 13OBJCOPYFLAGS = -O binary --remove-section=.bss
14obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
15OBJECT := $(obj)/head.o
12 16
13all: $(target)/rescue.bin 17targets := rescue.o rescue.bin
14 18
15rescue: rescue.bin 19quiet_cmd_ldlibgcc = LD $@
16 # do nothing 20cmd_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
29clean:
30 rm -f $(target)/*.o $(target)/*.bin
31
32fastdep:
33
34modules:
35
36modules-install: