-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (58 loc) · 2.45 KB
/
Copy pathMakefile
File metadata and controls
67 lines (58 loc) · 2.45 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
all:
@echo "Run make with 'docs', 'tests' or 'psptests'. Check README for more info"
# Format autogenerated tests if clang-format is available (optional)
formatter=clang-format
ifeq (, $(shell which clang-format))
formatter=true
endif
# Generates docs in HTML and PDF format (using weasyprint)
# Can alternative use wkhtmltopdf which is faster
.PHONY: docs
docs:
mkdir -p docs/output/
rm -f docs/output/index.html && ./gen-docs.py --format=html --output=docs/output/index.html
rm -f docs/output/pdf_doc.html && ./gen-docs.py --format=pdf --output=docs/output/pdf_doc.html
weasyprint docs/output/pdf_doc.html docs/output/docs.pdf && rm -f docs/output/pdf_doc.html
.PHONY: tests
tests:
# Tests are dividied between files due to being too big!
rm -f psp-tests/functional/autogen-test-*.c && \
./gen-tests.py --output psp-tests/functional/autogen-test-%s.c --check-prefixes && \
$(formatter) -i psp-tests/functional/autogen-test-*.c
echo "AUTO_TEST_OBJS = \\" > psp-tests/functional/Makefile.auto
(cd psp-tests/functional/ && echo "`ls autogen-test-*.c`" | sed "s/\\.c/.o \\\/g" >> Makefile.auto)
rm -f psp-tests/performance/autogen-perftest.c && \
./gen-perf-tests.py --output psp-tests/performance/autogen-perftest.c && \
$(formatter) -i psp-tests/performance/autogen-perftest.c
rm -f psp-tests/regcompat/autogen-regtests.c && \
./gen-regtests.py --output psp-tests/regcompat/autogen-regtests.c && \
$(formatter) -i psp-tests/regcompat/autogen-regtests.c
# Can build PBP or PRX:
# make psptests-clean && make psptests
# make psptests-clean BUILD_PRX=1 && make psptests BUILD_PRX=1
.PHONY: psptests
psptests:
+make -C psp-tests/manual $(MAKEFLAGS) all
+make -C psp-tests/functional $(MAKEFLAGS) all
+make -C psp-tests/accuracy $(MAKEFLAGS) all
+make -C psp-tests/performance $(MAKEFLAGS) all
+make -C psp-tests/regcompat $(MAKEFLAGS) all
+make -C psp-tests/manual/exception-module all
.PHONY: psptests-clean
psptests-clean:
make -C psp-tests/manual clean
make -C psp-tests/functional clean
make -C psp-tests/accuracy clean
make -C psp-tests/performance clean
make -C psp-tests/regcompat clean
make -C psp-tests/manual/exception-module clean
.PHONY: psptests-pbp-pack
psptests-pbp-pack:
rm -f tests-release.zip
zip -r tests-release.zip \
psp-tests/manual/EBOOT.PBP \
psp-tests/functional/EBOOT.PBP \
psp-tests/accuracy/EBOOT.PBP \
psp-tests/performance/EBOOT.PBP \
psp-tests/regcompat/EBOOT.PBP \
psp-tests/manual/exception-module/exception_module.prx