Generate GMM headers for pl_msg at build-time

This commit is contained in:
Rachel
2023-12-22 01:44:36 -06:00
parent 81bf58ab7b
commit 9b59d2d9d6
2 changed files with 14 additions and 1 deletions

3
.gitignore vendored
View File

@@ -51,6 +51,9 @@ symbols.csv
res/**/*.c
*.o
# Generated headers
include/constants/text/*.h
# Utilities
ntruncompbw
*.elf

View File

@@ -725,15 +725,25 @@ pl_msg_gmm = files(
'pl_msg_0723.gmm',
)
gmm_header_dir = custom_target('gmm_header_dir',
output: 'gmm_header_dir',
command: [
'sh', '-c', '"$@"',
'--',
'mkdir', '-p', '../include/constants/text'
]
)
gmm_to_bin_gen = generator(msgenc_exe,
arguments: [
'-e',
'--gmm',
'-c', charmap_txt.full_path(),
'-H', '../include/constants/text/' + '@BASENAME@' + '.h',
'@INPUT@',
'@OUTPUT@'
],
depends: charmap_txt,
depends: [ charmap_txt, gmm_header_dir ],
output: '@BASENAME@' + '.bin'
)