No Description

Makefile 634B

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