1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 19:13:42 +00:00

Makefile: Add rules to build .png, .bin and .jpg in assets/ too

This commit is contained in:
Dragorn421 2025-02-10 18:28:07 +01:00
parent e3a2693b87
commit f4cdf0a34b
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335

View file

@ -984,8 +984,28 @@ $(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/spec
$(POSTPROCESS_OBJ) $(@:.o=.s)
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
$(BUILD_DIR)/assets/%.inc.c: assets/%.png
false # TODO duplicate extracted/ build rules for git-tracked assets/ too
# Assets from assets/
$(BUILD_DIR)/assets/%.u64.inc.c: assets/%.u64.png
$(PYTHON) tools/assets/build_from_png.py $< $(@:.inc.c=.bin)
@echo // From file://`realpath $<` >$@
tools/assets/bin2c/bin2c u64 <$(@:.inc.c=.bin) >>$@
# same as above rule but u32
$(BUILD_DIR)/assets/%.u32.inc.c: assets/%.u32.png
$(PYTHON) tools/assets/build_from_png.py $< $(@:.inc.c=.bin)
@echo // From file://`realpath $<` >$@
tools/assets/bin2c/bin2c u32 <$(@:.inc.c=.bin) >>$@
$(BUILD_DIR)/assets/%.u8.inc.c: assets/%.u8.bin
@echo // From file://`realpath $<` >$@
tools/assets/bin2c/bin2c u8 <$< >>$@
$(BUILD_DIR)/assets/%.u64.jpg.inc.c: assets/%.u64.jpg
@echo // From file://`realpath $<` >$@
tools/assets/bin2c/bin2c u64 <$< >>$@
# Assets from extracted/
$(BUILD_DIR)/assets/%.u64.inc.c: $(EXTRACTED_DIR)/assets/%.u64.png
$(PYTHON) tools/assets/build_from_png.py $< $(@:.inc.c=.bin)