You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
668 B

3 years ago
  1. PNGFILES := $(shell find png/sprite -type f -name '*.png')
  2. IMGFILES := $(PNGFILES:%.png=%.2bpp)
  3. COLLFILES := $(shell find png/map -type f -name '*_coll.png')
  4. BUILT_COLLFILES := $(COLLFILES:%_coll.png=%.s)
  5. SFILES := $(shell find src -type f -name '*.s')
  6. OFILES := $(SFILES:%.s=%.o)
  7. .PHONY: clean
  8. is.gb is.gb.sym: $(IMGFILES) $(OFILES) $(BUILT_COLLFILES)
  9. rgblink -o $@ -n $@.sym $(OFILES)
  10. rgbfix -v $@
  11. $(OFILES): $(IMGFILES)
  12. %.o: %.s
  13. rgbasm -i inc -o $@ $<
  14. png/map/%.s: png/map/%_coll.png
  15. python scripts/generate_coll_map.py -o $@ $<
  16. png/sprite/%.2bpp: png/sprite/%.png
  17. rgbgfx -o $@ $<
  18. clean:
  19. rm -f is.gb is.gb.sym $(IMGFILES) $(OFILES) $(BUILT_COLLFILES)