2 # Makefile for rescue code
4 target = $(target_rescue_dir)
5 src = $(src_rescue_dir)
7 CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
9 LD = gcc-cris -mlinux -march=v32 -nostdlib
10 OBJCOPY = objcopy-cris
11 OBJCOPYFLAGS = -O binary --remove-section=.bss
13 all: $(target)/rescue.bin
18 $(target)/rescue.bin: $(target) $(target)/head.o
19 $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o
20 $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin
21 cp -p $(target)/rescue.bin $(objtree)
26 $(target)/head.o: $(src)/head.S
27 $(CC) -D__ASSEMBLY__ -c $< -o $*.o
30 rm -f $(target)/*.o $(target)/*.bin