No Description

Makefile 674B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. AS = arm-none-eabi-as
  2. AR = arm-none-eabi-ar
  3. S_FILES = $(sort $(wildcard S_CUSTOM/*.s))
  4. OBJ_S_FILES = $(S_FILES:.s=.o)
  5. WAV_FILES = $(sort $(wildcard WAV/*.wav))
  6. OBJ_WAV_FILES = $(WAV_FILES:.wav=.o)
  7. S_DUMP_FILES = $(sort $(wildcard S_DUMP/*.s))
  8. OBJ_S_DUMP_FILES = $(S_DUMP_FILES:.s=.o)
  9. all: sample.a
  10. .PHONY: clean
  11. clean:
  12. rm -f OBJ/*.o OBJ_DUMP/*.o sample.a S/*.s
  13. #----------------
  14. S/%.o: S/%.s
  15. $(AS) $< -o $@
  16. #----------------
  17. WAV/%.s: WAV/%.wav
  18. wav2agb $< $@
  19. WAV/%.o: WAV/%.s
  20. $(AS) $< -o $@
  21. #----------------
  22. S_DUMP/%.o: S_DUMP/%.s
  23. $(AS) $< -o $@
  24. #----------------
  25. sample.a: $(OBJ_S_FILES) $(OBJ_WAV_FILES) $(OBJ_S_DUMP_FILES)
  26. rm -f $@
  27. $(AR) rcs $@ $^