| # Makefile for rescue code |
| target = $(target_rescue_dir) |
| CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) |
| LD = gcc-cris -mlinux -march=v32 -nostdlib |
| OBJCOPYFLAGS = -O binary --remove-section=.bss |
| all: $(target)/rescue.bin |
| $(target)/rescue.bin: $(target) $(target)/head.o |
| $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o |
| $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin |
| cp -p $(target)/rescue.bin $(objtree) |
| $(target)/head.o: $(src)/head.S |
| $(CC) -D__ASSEMBLY__ -c $< -o $*.o |
| rm -f $(target)/*.o $(target)/*.bin |