mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
tools: teach msgenc to avoid comments (#1151)
Currently the C preprocessor is used to remove comments from the text files before encoding them. However the option used (`-fpreprocessed`) is only supported by gcc – but not by clang, which breaks the macOS build. By using Python to remove comments, we can remove the use of this gcc-specific option, and fix the macOS build.
This commit is contained in:
parent
5b0f79ec6e
commit
267e20dd4c
2 changed files with 17 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -297,8 +297,7 @@ build/data/%.o: data/%.s
|
|||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
build/assets/text/%.enc.h: assets/text/%.h assets/text/charmap.txt
|
||||
$(CPP) -P -dD -fpreprocessed $< > $(@:.enc.h=.h)
|
||||
python3 tools/msgenc.py assets/text/charmap.txt $(@:.enc.h=.h) $@
|
||||
python3 tools/msgenc.py assets/text/charmap.txt $< $@
|
||||
|
||||
build/assets/text/fra_message_data_static.o: build/assets/text/message_data.enc.h
|
||||
build/assets/text/ger_message_data_static.o: build/assets/text/message_data.enc.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue