No Description

Makefile 907B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. AS = arm-none-eabi-as
  2. AR = arm-none-eabi-ar
  3. M_FLAGS = -m 100 -n -p 0 -r 0 -g voicegroup000
  4. SE_FLAGS = -p 5 -r 0 -g voicegroup001
  5. FIX_FLAGS =
  6. MID_FILES = $(sort $(wildcard MID/*.mid))
  7. OBJ_FILES = $(addprefix OBJ/,$(notdir $(MID_FILES:.mid=.o)))
  8. SE_MID_FILES = $(sort $(wildcard MID_SE/*.mid))
  9. SE_OBJ_FILES = $(addprefix OBJ_SE/,$(notdir $(SE_MID_FILES:.mid=.o)))
  10. DUMP_S_FILES = $(sort $(wildcard S_DUMP/*.s))
  11. DUMP_OBJ_FILES = $(addprefix OBJ_DUMP/,$(notdir $(DUMP_S_FILES:.s=.o)))
  12. all: music.a
  13. .PHONY: clean
  14. clean:
  15. rm -f OBJ/*.o OBJ_DUMP/*.o OBJ_SE/*.o music.a
  16. #.PRECIOUS: S_FINAL/%.s
  17. S/%.s: MID/%.mid
  18. midi2agb $< $@ $(M_FLAGS)
  19. #.PRECIOUS: S_SE/%.s
  20. S_SE/%.s: MID_SE/%.mid
  21. midi2agb $< $@ $(SE_FLAGS)
  22. OBJ_SE/%.o: S_SE/%.s
  23. $(AS) $< -o $@
  24. OBJ/%.o: S/%.s
  25. $(AS) $< -o $@
  26. OBJ_DUMP/%.o: S_DUMP/%.s
  27. $(AS) $< -o $@
  28. music.a: $(OBJ_FILES) $(DUMP_OBJ_FILES) $(SE_OBJ_FILES)
  29. rm -f $@
  30. $(AR) rcs $@ $^