Nenhuma descrição

Makefile 545B

1234567891011121314151617181920212223242526272829
  1. AS = arm-none-eabi-as
  2. AR = arm-none-eabi-ar
  3. BIN_FILES = $(sort $(wildcard BIN/*.bin))
  4. OBJ_FILES = $(addprefix OBJ/,$(notdir $(BIN_FILES:.bin=.o)))
  5. S_DUMP_FILES = $(sort $(wildcard S_DUMP/*.s))
  6. OBJ_DUMP_FILES = $(addprefix OBJ_DUMP/,$(notdir $(S_DUMP_FILES:.s=.o)))
  7. all: sample.a
  8. .PHONY: clean
  9. clean:
  10. rm -f OBJ/*.o OBJ_DUMP/*.o sample.a S/*.s
  11. #.PRECIOUS: S/%.s
  12. S/%.s: BIN/%.bin
  13. bin2asm $< > $@
  14. OBJ/%.o: S/%.s
  15. $(AS) $< -o $@
  16. OBJ_DUMP/%.o: S_DUMP/%.s
  17. $(AS) $< -o $@
  18. sample.a: $(OBJ_FILES) $(OBJ_DUMP_FILES)
  19. rm -f $@
  20. $(AR) rcs $@ $^