2 # Makefile for rescue (bootstrap) code
5 CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
6 ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \
7 -I $(srctree)/include/asm/arch
8 asflags-y += -I $(srctree)/include/asm/arch/mach/ -I $(srctree)/include/asm/arch
9 LD = gcc-cris -mlinux -march=v32 -nostdlib
10 ldflags-y += -T $(srctree)/$(src)/rescue.lds
12 OBJCOPYFLAGS = -O binary --remove-section=.bss
13 obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
14 OBJECT := $(obj)/head.o
16 targets := rescue.o rescue.bin
18 quiet_cmd_ldlibgcc = LD $@
19 cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@
21 $(obj)/rescue.o: $(OBJECTS) FORCE
22 $(call if_changed,ldlibgcc)
24 $(obj)/rescue.bin: $(obj)/rescue.o FORCE
25 $(call if_changed,objcopy)
26 cp -p $(obj)/rescue.bin $(objtree)