|
|
- # Graphics
- SPRITE_PNG := $(shell find png/sprite -type f -name '*.png')
- MAP_PNG := $(shell find png/map -type f -name '*.png' -not -name '*_coll.png')
- MAP_COLL := $(shell find png/map -type f -name '*_coll.png')
- MAP_ASM := $(MAP_PNG:%.png:%.s)
- ALL_2BPP := $(SPRITE_PNG:%.png=%.2bpp) $(MAP_PNG:%.png=%.map.2bpp) $(MAP_PNG:%.png=%.tiles.2bpp)
-
- # Code
- SFILES := $(shell find src -type f -name '*.s')
- OFILES := $(SFILES:%.s=%.o) $(MAP_ASM)
-
- .PHONY: clean
-
- is.gb is.gb.sym:$(OFILES) $(ALL_2BPP)
- rgblink -o $@ -n $@.sym $(OFILES)
- rgbfix -v $@
-
- $(OFILES): $(ALL_2BPP)
-
- %.o: %.s
- rgbasm -i inc -o $@ $<
-
- png/map/%.tiles.2bpp png/map/%.map.2bpp: png/map/%.png
- rgbgfx -u -t $(<:%.png=%.map.2bpp) -o $(<:%.png=%.tiles.2bpp) $<
-
- png/map/%.s: png/map/%_coll.png
- python scripts/generate_coll_map.py -o $@ $<
-
- png/sprite/%.2bpp: png/sprite/%.png
- rgbgfx -o $@ $<
-
- clean:
- rm -f is.gb is.gb.sym $(ALL_2BPP) $(OFILES) $(MAP_ASM)
|