Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (63 loc) · 2.44 KB
/
Copy pathMakefile
File metadata and controls
89 lines (63 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# PS5-Python - CPython for the PlayStation 5.
# Copyright (C) 2026 BlackBearReloaded
# SPDX-License-Identifier: GPL-3.0-or-later
PYTHON ?= python3
POWERSHELL ?= powershell.exe
PS5_PAYLOAD_SDK ?= /opt/ps5-payload-sdk
CPYTHON_SRC ?= upstream/cpython
PS5_JOBS ?= $(shell nproc 2>/dev/null || echo 2)
SCRIPT ?= examples/main.py
APP ?= apps/flask_dashboard
.PHONY: format format-check tidy lint host-test host-suite host-lifetime host-app package-app host-build source-fetch source-check ps5-check ps5-configure ps5-core ps5-run ps5-test ps5-suite ps5-lifetime ps5-app ps5-web ps5-web-test ps5-kill clean
format:
bash tools/run_clang_format.sh
format-check:
bash tools/run_clang_format.sh --check
tidy:
bash tools/run_clang_tidy.sh
lint: format-check tidy
host-test:
$(POWERSHELL) -NoProfile -ExecutionPolicy Bypass -File host/run_core_tests.ps1
host-suite:
$(POWERSHELL) -NoProfile -ExecutionPolicy Bypass -File host/run_core_suite.ps1
host-lifetime:
$(POWERSHELL) -NoProfile -ExecutionPolicy Bypass -File host/run_lifetime_suite.ps1
host-app:
$(POWERSHELL) -NoProfile -ExecutionPolicy Bypass -File host/run_app.ps1 -AppPath "$(APP)"
package-app:
$(PYTHON) tools/package_app.py "$(APP)"
host-build:
bash tools/build_host.sh
source-fetch:
$(POWERSHELL) -NoProfile -ExecutionPolicy Bypass -File tools/fetch_cpython.ps1
source-check:
@test -f "$(CPYTHON_SRC)/Include/Python.h"
@test -f "$(CPYTHON_SRC)/configure.ac"
@echo "CPython source: $(CPYTHON_SRC)"
@git -C "$(CPYTHON_SRC)" describe --tags --always
ps5-check:
@test -f "$(PS5_PAYLOAD_SDK)/toolchain/prospero.mk"
@test -f "$(CPYTHON_SRC)/Include/Python.h"
@echo "PS5 SDK and CPython source are present."
ps5-configure: lint host-build
bash tools/build_ps5.sh configure
ps5-core: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/build_ps5.sh core
ps5-run: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5.sh "$(SCRIPT)"
ps5-test: lint host-build
PS5_JOBS=$(PS5_JOBS) RUN_TIMEOUT=120 bash tools/run_ps5.sh tests/core_suite.py
ps5-suite: ps5-test
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5_lifetime.sh
ps5-lifetime: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5_lifetime.sh
ps5-app: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5_app.sh "$(APP)"
ps5-web: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5_web.sh
ps5-web-test: lint host-build
PS5_JOBS=$(PS5_JOBS) bash tools/run_ps5_web_test.sh
ps5-kill: lint
bash tools/run_ps5_kill.sh $(PID) $(SIGNAL)
clean:
rm -rf build