- Log messages, script output, test labels, Makefile errors and comments are English. Red log lines start with "[RED] " (was 【红】). - Shader map stage column: vertex / pixel / compute / geometry / hull / domain (generators, dmsh_build / dmsh_facts and nvn_mtl.m stage_of follow). - The NSP script's regexes match the new shader_split.py / dmsh_build.py summary lines; patch_nso cut scopes are all / host-only. - Host UI text table (dm_i18n_tab.h) is English only; dm_lang_zh() removed. - Text that matches game data (t_swkbd.c, t_textbox.c) is written as \x escapes. - Shader chain: the chain files lose their bilingual comments, so every profile has a new chain version. dmsh_xlate.dll rebuilt from the translated Program.cs (SPIR-V byte-identical on 4,500 shaders of Wonder, TOTK and Age of Calamity), lock and dmsh_chain.h headers regenerated. c1_full.tsv restamped for Dread, 13 Sentinels and Wonder; the other profiles follow when their rebuild finishes. - AGENTS.md and docs/agents: the language rule now covers logs; quoted log lines updated.
110 lines
6.9 KiB
Makefile
110 lines
6.9 KiB
Makefile
DM_ROOT ?= $(HOME)/dm-work
|
|
# dm/host unit tests in one command: make -C dm/host/tests run (takes seconds; build output goes to build/ and is not committed)
|
|
PY ?= $(DM_ROOT)/build/cache/dm/venv/bin/python
|
|
EXEFS ?= $(DM_ROOT)/data/switch/3.3.94012/Update/ExeFS
|
|
B = build
|
|
# game profile header (dm.h needs game_profile.h, generated by the host Makefile into ../gen/<profile>/)
|
|
# tests that use the game profile need GAME=<base game title ID> (there is no default game); GINC only expands when used, so tests without the profile build as before
|
|
GINC = $(if $(strip $(GAME)),-I../gen/$(GAME) -I../../games/$(GAME),$(error GAME is not set: make GAME=<base game title ID>: $(shell python3 ../../games/game.py list | awk -F'\t' '{printf "%s (%s) ", $$1, $$3}')))
|
|
run: $(B)/t_textbox $(B)/t_padmap $(B)/t_touch $(B)/t_hid_receipt $(B)/t_hid_script $(B)/t_touch_mac $(B)/t_oe $(B)/t_fs $(B)/t_thread_leak $(B)/t_fs_case $(B)/t_romfs_validate $(B)/t_audio $(B)/t_audio_spsc $(B)/t_swkbd $(B)/t_altstack $(B)/t_movie $(B)/t_condvar $(B)/t_condvar_old $(B)/t_target_rank $(B)/t_hud_dead $(B)/t_namegen $(B)/t_modetx $(B)/t_unit_level $(B)/t_widget $(B)/t_doorspot $(B)/t_cloudsync $(B)/t_i18n $(B)/main.orig.bin $(B)/subsdk0.orig.bin
|
|
python3 native_write_scan.py --selftest ..
|
|
python3 mode_scan.py ../..
|
|
python3 ../../ios/tools/dm_i18n.py --check
|
|
python3 ../../i18n/scan_literals.py
|
|
$(B)/t_textbox
|
|
$(B)/t_touch
|
|
$(B)/t_hid_script 2>/dev/null
|
|
$(B)/t_hid_receipt 2>/dev/null
|
|
$(B)/t_touch_mac
|
|
$(B)/t_oe 2>/dev/null
|
|
$(B)/t_fs 2>/dev/null
|
|
$(B)/t_thread_leak
|
|
TMPDIR="$(abspath $(B))" $(B)/t_fs_case 2>/dev/null
|
|
DM_ROMFS="$(DM_ROOT)/data/switch/3.3.94012/Update/RomFS" $(B)/t_romfs_validate
|
|
$(B)/t_audio
|
|
$(B)/t_audio_spsc
|
|
$(B)/t_swkbd
|
|
$(B)/t_altstack
|
|
$(B)/t_movie
|
|
$(B)/t_condvar
|
|
$(B)/t_condvar_old
|
|
$(B)/t_target_rank 2>/dev/null
|
|
$(B)/t_hud_dead
|
|
$(B)/t_namegen
|
|
$(B)/t_modetx
|
|
$(B)/t_padmap
|
|
$(B)/t_unit_level
|
|
$(B)/t_widget
|
|
$(B)/t_doorspot
|
|
TMPDIR="$(abspath $(B))" $(B)/t_cloudsync 2>/dev/null
|
|
for m in en zh none sysen systw tags game; do TMPDIR="$(abspath $(B))" $(B)/t_i18n $$m || exit 1; done
|
|
$(PY) movie_cut.py $(B)/main.orig.bin $(B)/subsdk0.orig.bin
|
|
$(PY) oe_notify.py $(B)/main.orig.bin
|
|
$(B)/t_i18n: t_i18n.c ../dm_i18n.c ../dm_i18n.h ../dm_i18n_tab.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_i18n.c ../dm_i18n.c
|
|
$(B)/t_hud_dead: t_hud_dead.c ../dm_hud.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_hud_dead.c
|
|
$(B)/t_textbox: t_textbox.c ../dm_textbox_core.c ../dm_textbox_core.h | $(B)
|
|
clang -O1 -Wall -Werror -o $@ t_textbox.c ../dm_textbox_core.c
|
|
$(B)/t_doorspot: t_doorspot.c ../dm_doorspot.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_doorspot.c
|
|
$(B)/t_widget: t_widget.c ../dm_widget.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_widget.c
|
|
$(B)/t_unit_level: t_unit_level.c ../dm_unit.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_unit_level.c
|
|
$(B)/t_padmap: t_padmap.c ../dm_padmap.h ../dm_input.h | $(B)
|
|
clang -O1 -Wall -Werror -o $@ t_padmap.c
|
|
$(B)/t_modetx: t_modetx.c ../dm_modetx.h | $(B)
|
|
clang -O1 -Wall -Werror -o $@ t_modetx.c
|
|
$(B)/t_namegen: t_namegen.c ../dm_namegen.c | $(B)
|
|
clang -O1 -Wall -Werror -o $@ t_namegen.c ../dm_namegen.c
|
|
$(B)/t_cloudsync: t_cloudsync.c ../dm_cloudsync.c ../dm.h | $(B)
|
|
clang -O1 -Wall -Werror -I.. -o $@ t_cloudsync.c ../dm_cloudsync.c
|
|
$(B)/t_touch: t_touch.c ../hle_touch.c ../front.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_touch.c ../hle_touch.c
|
|
$(B)/t_thread_leak: t_thread_leak.c ../thread.c ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_thread_leak.c
|
|
$(B)/t_fs: t_fs.c t_fs_stub.c ../hle_fs.c ../hle.h ../dm.h ../dm_i18n.c | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_fs.c t_fs_stub.c ../dm_i18n.c
|
|
$(B)/t_audio: t_audio.c ../hle_audio.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_audio.c -framework AudioToolbox
|
|
$(B)/t_audio_spsc: t_audio_spsc.c ../hle_audio.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_audio_spsc.c -framework AudioToolbox
|
|
$(B)/t_audio_spsc_tsan: t_audio_spsc.c ../hle_audio.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -g -O1 -fsanitize=thread -Wno-unused-function -I.. -o $@ t_audio_spsc.c -framework AudioToolbox
|
|
$(B)/t_swkbd: t_swkbd.c ../hle_swkbd.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_swkbd.c ../hle_swkbd.c
|
|
$(B)/t_movie: t_movie.c ../hle_movie.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_movie.c ../hle_movie.c
|
|
$(B)/t_altstack: t_altstack.c t_altstack_stub.c ../crash.c ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_altstack.c t_altstack_stub.c ../crash.c
|
|
$(B)/%.orig.bin: $(EXEFS)/% | $(B)
|
|
$(PY) ../../tools/nso.py $< $@ > /dev/null
|
|
$(B):
|
|
mkdir -p $@
|
|
.PHONY: run tsan
|
|
tsan: $(B)/t_audio_spsc_tsan
|
|
$(B)/t_audio_spsc_tsan
|
|
$(B)/t_condvar: t_condvar.c t_condvar_stub.c ../hle_thread.c ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -DDM_TEST_HOOKS -I.. -o $@ t_condvar.c t_condvar_stub.c ../hle_thread.c
|
|
$(B)/t_condvar_old: t_condvar.c t_condvar_stub.c ../hle_thread.c ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -DDM_TEST_HOOKS -DDM_TEST_CV_OLD_ORDER -I.. -o $@ t_condvar.c t_condvar_stub.c ../hle_thread.c
|
|
|
|
$(B)/t_fs_case: t_fs_case.c ../hle_fs.c ../hle.h ../dm.h ../dm_i18n.c | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_fs_case.c ../dm_i18n.c
|
|
$(B)/t_romfs_validate: t_romfs_validate.c ../romfs_validate.c ../romfs_validate.h ../dm_i18n.c ../dm_i18n_tab.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_romfs_validate.c ../romfs_validate.c ../dm_i18n.c
|
|
|
|
$(B)/t_hid_script: t_hid_script.c t_touch_tick_stub.c ../hle_hid.c ../dm_cursor.c ../dm_hud.c ../dm_hud.h ../touch_mac.c ../../ios/Sources/dm_touch_controls.c ../hle.h ../dm.h ../dm_input.h ../front.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -I../../ios/Sources -o $@ t_hid_script.c t_touch_tick_stub.c ../dm_cursor.c ../dm_hud.c ../touch_mac.c ../../ios/Sources/dm_touch_controls.c -lm
|
|
|
|
$(B)/t_oe: t_oe.c ../hle_oe.c ../hle.h ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. $(GINC) -o $@ t_oe.c
|
|
|
|
$(B)/t_hid_receipt: t_hid_receipt.c t_touch_tick_stub.c ../hle_hid.c ../dm_cursor.c ../dm_hud.c ../dm_hud.h ../touch_mac.c ../../ios/Sources/dm_touch_controls.c ../hle.h ../dm.h ../dm_input.h ../front.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -I../../ios/Sources -o $@ t_hid_receipt.c t_touch_tick_stub.c ../dm_cursor.c ../dm_hud.c ../touch_mac.c ../../ios/Sources/dm_touch_controls.c -lm
|
|
$(B)/t_touch_mac: t_touch_mac.c ../touch_mac.c ../dm_cursor.c ../dm_hud.c ../dm_hud.h ../../ios/Sources/dm_touch_controls.c ../../ios/Sources/dm_touch_controls.h ../../host/dm_input.h | $(B) # the test #includes touch_mac.c and dm_touch_controls.c, which must be listed as dependencies (omitting them means source changes do not trigger a rebuild)
|
|
clang -std=c11 -Wall -Wextra -Werror -I.. -I../../ios/Sources -o $@ t_touch_mac.c ../dm_cursor.c ../dm_hud.c -lm
|
|
$(B)/t_target_rank: t_target_rank.c ../hle_target.c ../dm.h | $(B)
|
|
clang -O1 -Wno-unused-function -I.. -o $@ t_target_rank.c ../hle_target.c
|