-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
53 lines (42 loc) · 1.31 KB
/
Justfile
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
default: lint build
# Install pip modules
pipinstall:
python3 -m pip install toml pylint pylint-quotes keystone
# Lint .cpp, .hpp and .py files. Pass --verbose to see more output
lint VERBOSE="":
@just lintpy {{VERBOSE}}
@just lintc {{VERBOSE}}
lintpy VERBOSE="":
python3 scripts/lint.py {{VERBOSE}}
pylint scripts
lintc VERBOSE="":
clang-format-12 -n -Werror {{VERBOSE}} $(find src -name *.hpp)
clang-format-12 -n -Werror {{VERBOSE}} $(find src -name *.cpp)
# Run clang-format on source files
format VERBOSE="":
@echo "Checking .hpp"
clang-format-12 -i {{VERBOSE}} $(find src -name *.hpp)
@echo "Checking .cpp"
clang-format-12 -i {{VERBOSE}} $(find src -name *.cpp)
# Generate linker script
ld:
mkdir -p build
python3 scripts/gen_linker_script.py
# Build botwigd, app.npdm, and the ips patches
build:
mkdir -p build
make -C build -f ../build.mk
objdump -T build/botwigd.elf > build/botwigd.syms
python3 scripts/check_unlinked_symbols.py build/botwigd.syms
python3 scripts/gen_ips_patch.py
# Regenerate the linker script and rebuild
relink:
rm -f build/botwigd.nso build/botwigd.elf
@just ld
@just build
clean:
rm -rf build
lib FLAGS:
python3 scripts/libtool.py {{FLAGS}}
ftp FTP_OPTION:
python3 scripts/ftp.py {{FTP_OPTION}}