No Description

Makefile 1000B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. AS = arm-none-eabi-as
  2. AR = arm-none-eabi-ar
  3. M_FLAGS = -V100 -E -P000 -R000 -G000
  4. SE_FLAGS = -V127 -E -P005 -R000 -G001
  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: MID_FINAL/%.mid
  17. MID_FINAL/%.mid: MID/%.mid
  18. midfix4agb $< $@ $(FIX_FLAGS)
  19. #.PRECIOUS: S_FINAL/%.s
  20. S_FINAL/%.s: MID_FINAL/%.mid
  21. mid2agb $< $@ $(M_FLAGS)
  22. #.PRECIOUS: S_SE/%.s
  23. S_SE/%.s: MID_SE/%.mid
  24. mid2agb $< $@ $(SE_FLAGS)
  25. OBJ_SE/%.o: S_SE/%.s
  26. $(AS) $< -o $@
  27. OBJ/%.o: S_FINAL/%.s
  28. $(AS) $< -o $@
  29. OBJ_DUMP/%.o: S_DUMP/%.s
  30. $(AS) $< -o $@
  31. music.a: $(OBJ_FILES) $(DUMP_OBJ_FILES) $(SE_OBJ_FILES)
  32. rm -f $@
  33. $(AR) rcs $@ $^