mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-11 19:43:44 +00:00
Makefile: Add rules to build .png, .bin and .jpg in assets/ too
This commit is contained in:
parent
e3a2693b87
commit
f4cdf0a34b
1 changed files with 22 additions and 2 deletions
24
Makefile
24
Makefile
|
@ -984,8 +984,28 @@ $(BUILD_DIR)/src/overlays/%_reloc.o: $(BUILD_DIR)/spec
|
||||||
$(POSTPROCESS_OBJ) $(@:.o=.s)
|
$(POSTPROCESS_OBJ) $(@:.o=.s)
|
||||||
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
|
$(AS) $(ASFLAGS) $(@:.o=.s) -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/assets/%.inc.c: assets/%.png
|
# Assets from assets/
|
||||||
false # TODO duplicate extracted/ build rules for git-tracked assets/ too
|
|
||||||
|
$(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
|
$(BUILD_DIR)/assets/%.u64.inc.c: $(EXTRACTED_DIR)/assets/%.u64.png
|
||||||
$(PYTHON) tools/assets/build_from_png.py $< $(@:.inc.c=.bin)
|
$(PYTHON) tools/assets/build_from_png.py $< $(@:.inc.c=.bin)
|
||||||
|
|
Loading…
Add table
Reference in a new issue