Makefile 783 字节
Newer Older
1
#
2
# Makefile for rescue (bootstrap) code
3 4 5
#

CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
6 7 8
ccflags-y += -O2 -I $(srctree)/include/asm/arch/mach/ \
		-I $(srctree)/include/asm/arch
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
11
LDPOSTFLAGS = -lgcc
12
OBJCOPYFLAGS = -O binary --remove-section=.bss
13 14
obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
OBJECT := $(obj)/head.o
15

16
targets := rescue.o rescue.bin
17

18 19
quiet_cmd_ldlibgcc = LD      $@
cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@
20

21 22
$(obj)/rescue.o: $(OBJECTS) FORCE
	$(call if_changed,ldlibgcc)
23

24 25 26
$(obj)/rescue.bin: $(obj)/rescue.o FORCE
	$(call if_changed,objcopy)
	cp -p $(obj)/rescue.bin $(objtree)