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
$(obj
)/rescue.
ld
12 OBJCOPY
= objcopy-cris
13 OBJCOPYFLAGS
= -O binary
--remove-section
=.bss
14 obj-
$(CONFIG_ETRAX_AXISFLASHMAP
) = head.o
15 OBJECT
:= $(obj
)/head.o
17 targets
:= rescue.o rescue.bin
19 quiet_cmd_ldlibgcc
= LD
$@
20 cmd_ldlibgcc
= $(LD
) $(LDFLAGS
) $(filter-out FORCE
,$^
) $(LDPOSTFLAGS
) -o
$@
22 $(obj
)/rescue.o
: $(OBJECTS
) FORCE
23 $(call if_changed
,ldlibgcc
)
25 $(obj
)/rescue.bin
: $(obj
)/rescue.o FORCE
26 $(call if_changed
,objcopy
)
27 cp
-p
$(obj
)/rescue.bin
$(objtree
)