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