Makefile 732 B

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Makefile for rescue code
  3. #
  4. target = $(target_rescue_dir)
  5. src = $(src_rescue_dir)
  6. CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
  7. CFLAGS = -O2
  8. LD = gcc-cris -mlinux -march=v32 -nostdlib
  9. OBJCOPY = objcopy-cris
  10. OBJCOPYFLAGS = -O binary --remove-section=.bss
  11. all: $(target)/rescue.bin
  12. rescue: rescue.bin
  13. # do nothing
  14. $(target)/rescue.bin: $(target) $(target)/head.o
  15. $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o
  16. $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin
  17. cp -p $(target)/rescue.bin $(objtree)
  18. $(target):
  19. mkdir -p $(target)
  20. $(target)/head.o: $(src)/head.S
  21. $(CC) -D__ASSEMBLY__ -c $< -o $*.o
  22. clean:
  23. rm -f $(target)/*.o $(target)/*.bin
  24. fastdep:
  25. modules:
  26. modules-install: