Workin on Yaml and makefile

This commit is contained in:
2026-07-12 19:36:45 -05:00
parent 13ca948e5a
commit 437a593785
2 changed files with 31 additions and 70 deletions
+26 -66
View File
@@ -4,8 +4,7 @@ MAKEFLAGS += --no-print-directory
NUMPROC ?= $(shell nproc) NUMPROC ?= $(shell nproc)
.PHONY: help \ .PHONY: help \
.us-build-only .us-check-files-on-error us-configure us-build us-extract-data us-make-asm us-map-mismatch us-report clean \ .build-only .check-files-on-error configure build extract-data make-asm map-mismatch report clean \
.eu-build-only .eu-check-files-on-error eu-configure eu-build eu-extract-data eu-make-asm eu-map-mismatch eu-report clean
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
@@ -54,82 +53,43 @@ PYHELP := python3 -c "$$PY_HELP_SCRIPT"
help: ## Show this help help: ## Show this help
@$(PYHELP) $(MAKEFILE_LIST) @$(PYHELP) $(MAKEFILE_LIST)
## ##
## US Commands: ## Commands:
us-configure: ## Configure US project (needs SLUS_203.88) configure: ## Configure project (needs SLUS_210.07)
@python3 configure.py config/us/ff1.us.yaml -c @python3 configure.py config/kuon.yaml -c
.us-build-only: .build-only:
@cd config/us; \ @cd config/; \
ninja -t clean; \ ninja -t clean; \
ninja -j$(NUMPROC) ninja -j$(NUMPROC)
.us-check-files-on-error: .check-files-on-error:
ls -l config/us/build/SLUS_203.88 config/us/SLUS_203.88 ls -l config/build/SLUS_210.07 config/SLUS_210.07
us-build: ## Build US project build: ## Build project
@$(MAKE) .us-build-only; status=$$?; [ $$status -eq 0 ] || { $(MAKE) .us-check-files-on-error; }; exit $$status @$(MAKE) .build-only; status=$$?; [ $$status -eq 0 ] || { $(MAKE) .check-files-on-error; }; exit $$status
us-extract-data: ## Extract variables from .data in US config directory extract-data: ## Extract variables from .data in config directory
@python3 tools/python/parse_data.py us @python3 tools/python/parse_data.py
us-make-asm: ## Create expected asm folder in US config directory make-asm: ## Create expected asm folder in config directory
@python3 configure.py config/us/ff1.us.yaml --make-asm @python3 configure.py config/kuon.yaml --make-asm
us-map-mismatch: ## Check for mismatches in US mapfile map-mismatch: ## Check for mismatches in mapfile
@python3 tools/python/map_mismatch.py --language us @python3 tools/python/map_mismatch.py --language
us-report: ## Create progress report in US config directory report: ## Create progress report in config directory
@(stat config/us/expected/obj/ >/dev/null 2>&1 || (echo "Target objects do not exist, please run \`make us-make-asm\`"; false)); @(stat config/expected/obj/ >/dev/null 2>&1 || (echo "Target objects do not exist, please run \`make make-asm\`"; false));
@(stat config/us/build/src/ >/dev/null 2>&1 || (echo "Base objects do not exist, please run \`make us-build\`"; false)); @(stat config/build/src/ >/dev/null 2>&1 || (echo "Base objects do not exist, please run \`make build\`"; false));
@tools/objdiff/objdiff-cli report generate -p config/us/ -o config/us/report.json -f json @tools/objdiff/objdiff-cli report generate -p config/ -o config/report.json -f json
@python3 tools/python/fix_report.py config/us/report.json @python3 tools/python/fix_report.py config/report.json
@python3 -c "import json;from pathlib import Path;report=json.loads(Path('config/us/report.json').read_text());print(f\"Progress: {report['measures']['fuzzy_match_percent']:.2f}%\")" @python3 -c "import json;from pathlib import Path;report=json.loads(Path('config/report.json').read_text());print(f\"Progress: {report['measures']['fuzzy_match_percent']:.2f}%\")"
us-clean: ## Clean artifact in US config directory clean: ## Clean artifact in config directory
@cd config/us; \ @cd config/; \
ninja -t clean ninja -t clean
us-reset: ## Resets the US config directory to its original state reset: ## Resets the config directory to its original state
@python3 configure.py config/us/ff1.us.yaml --reset @python3 configure.py config/kuon.yaml --reset
##
## EU Commands:
eu-configure: ## Configure EU project (needs SLES_508.21)
@python3 configure.py config/eu/ff1.eu.yaml -c
.eu-build-only:
@cd config/eu; \
ninja -t clean; \
ninja -j$(NUMPROC)
.eu-check-files-on-error:
ls -l config/eu/build/SLES_508.21 config/eu/SLES_508.21
eu-build: ## Build EU project
@$(MAKE) .eu-build-only; status=$$?; [ $$status -eq 0 ] || { $(MAKE) .eu-check-files-on-error; }; exit $$status
eu-extract-data: ## Extract initialized variables from .data in EU config directory
@python3 tools/python/parse_data.py eu
eu-make-asm: ## Create expected asm folder in EU config directory
@python3 configure.py config/eu/ff1.eu.yaml --make-asm
eu-map-mismatch: ## Check for mismatches in EU mapfile
@python3 tools/python/map_mismatch.py --language eu
eu-report: ## Create progress report in EU config directory
@(stat config/eu/expected/obj/ >/dev/null 2>&1 || (echo "Target objects do not exist, please run \`make eu-make-asm\`"; false));
@(stat config/eu/build/src/ >/dev/null 2>&1 || (echo "Base objects do not exist, please run \`make eu-build\`"; false));
@tools/objdiff/objdiff-cli report generate -p config/eu/ -o config/eu/report.json -f json
@python3 tools/python/fix_report.py config/eu/report.json
@python3 -c "import json;from pathlib import Path;report=json.loads(Path('config/eu/report.json').read_text());print(f\"Progress: {report['measures']['fuzzy_match_percent']:.2f}%\")"
eu-clean: ## Clean artifact in US config directory
@cd config/eu; \
ninja -t clean
eu-reset: ## Resets the EU config directory to its original state
@python3 configure.py config/eu/ff1.eu.yaml --reset
# Include custom makefile for user-defined commands # Include custom makefile for user-defined commands
-include Makefile.custom -include Makefile.custom
+5 -4
View File
@@ -8,7 +8,7 @@ options:
src_path: ../../src src_path: ../../src
build_path: build build_path: build
asset_path: assets asset_path: assets
compiler: EEGCC compiler: MWCCPS2
find_file_boundaries: False find_file_boundaries: False
platform: ps2 platform: ps2
string_encoding: EUC-JP string_encoding: EUC-JP
@@ -23,7 +23,7 @@ options:
disasm_unknown: True disasm_unknown: True
subalign: 4 subalign: 4
named_regs_for_c_funcs: False named_regs_for_c_funcs: False
gp_value: 0x35d070 gp_value: 0x25f4f0
ld_bss_is_noload: true ld_bss_is_noload: true
# custom field used by fix_linkerscript.py to fix linkerscript alignments # custom field used by fix_linkerscript.py to fix linkerscript alignments
_section_subalign: _section_subalign:
@@ -37,7 +37,7 @@ segments:
- [0, databin, elf_header] - [0, databin, elf_header]
- name: main - name: main
type: code type: code
start: 0x1000 start: 0x80
vram: 0x100000 vram: 0x100000
bss_size: 0x0b3024 # size of .sbss + size of .bss bss_size: 0x0b3024 # size of .sbss + size of .bss
align: 1 align: 1
@@ -47,7 +47,8 @@ segments:
# project configuration. vram address is used, when reported, in non text # project configuration. vram address is used, when reported, in non text
# sections to calculate the correct align value. # sections to calculate the correct align value.
subsegments: subsegments:
- [0x1000, asm, crt0] - [0x80, asm, crt0]
- [00257880, asm, bss]
- [0x7775b8] - [0x7775b8]