PNGFILES := $(shell find png -type f -name '*.png') IMGFILES := $(PNGFILES:%.png=%.2bpp) SFILES := $(shell find src -type f -name '*.s') OFILES := $(SFILES:%.s=%.o) .PHONY: clean is.gb is.gb.sym: $(IMGFILES) $(OFILES) rgblink -o $@ -n $@.sym $(OFILES) rgbfix -v $@ $(OFILES): $(IMGFILES) %.o: %.s rgbasm -o $@ $< %.2bpp: %.png rgbgfx -o $@ $< clean: rm -f is.gb is.gb.sym $(IMGFILES) $(OFILES)