|
|
@ -2,7 +2,7 @@ PYTHON ?= python |
|
|
|
|
|
|
|
# Graphics
|
|
|
|
SPRITE_PNG := $(shell find png/sprite -type f -name '*.png') |
|
|
|
|
|
|
|
BG_PNG := $(shell find png/bg -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') |
|
|
|
|
|
|
@ -10,6 +10,7 @@ MAP_COLL := $(shell find png/map -type f -name '*_coll.png') |
|
|
|
MAP_S := $(MAP_PNG:%.png=%.s) |
|
|
|
MAP_INC := $(MAP_PNG:%.png=%.inc) |
|
|
|
SPRITE_2BPP := $(SPRITE_PNG:%.png=%.2bpp) |
|
|
|
BG_DATA := $(BG_PNG:%.png=%.2bpp) $(BG_PNG:%.png=%.tilemap) |
|
|
|
|
|
|
|
# Code
|
|
|
|
SFILES := $(shell find src -type f -name '*.s') |
|
|
@ -24,6 +25,7 @@ is.gb is.gb.sym: $(OFILES) |
|
|
|
|
|
|
|
$(OFILES): $(MAP_INC) |
|
|
|
$(OFILES): $(SPRITE_2BPP) |
|
|
|
$(OFILES): $(BG_DATA) |
|
|
|
|
|
|
|
%.o: %.s |
|
|
|
@echo "[ASSEMBLE] $<" |
|
|
@ -37,6 +39,10 @@ png/sprite/%.2bpp: png/sprite/%.png |
|
|
|
@echo "[SPRITE] $<" |
|
|
|
@rgbgfx -o $@ $< |
|
|
|
|
|
|
|
png/bg/%.2bpp png/bg/%.tilemap: png/bg/%.png |
|
|
|
@echo "[BG] $<" |
|
|
|
@rgbgfx -T -u -o "$(shell dirname $<)/$(shell basename --suffix=.png $<).2bpp" $< |
|
|
|
|
|
|
|
clean: |
|
|
|
@rm -f is.gb is.gb.sym $(OFILES) $(MAP_S) $(MAP_INC) $(SPRITE_2BPP) |
|
|
|
@rm -f is.gb is.gb.sym $(OFILES) $(MAP_S) $(MAP_INC) $(SPRITE_2BPP) $(BG_DATA) |
|
|
|
@echo "All build files removed" |