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