-
Notifications
You must be signed in to change notification settings - Fork 20
/
makefile
60 lines (45 loc) · 1.47 KB
/
makefile
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
.PHONY : all flash kicker kicker-test control docs clean $(ROBOT_TESTS:%=%)
ROBOT_TESTS = rtos icm-42605-angle icm-20498-rate icm-20498-angle radio-test
all: control flash
tests: control-tests kicker-test
all-kicker: kicker kicker-test
flash:
./util/flash-mtrain
flash-test:
./util/flash-mtrain-test
kicker:
cd kicker && \
mkdir -p build && cd build && \
cmake .. && make -j$(nproc) kicker && cd .. && \
python3 convert.py build/bin/kicker.nib build/bin/kicker_bin.h KICKER_BYTES
kicker-test:
cd kicker && \
mkdir -p build && cd build && \
cmake .. && make -j$(nproc) kicker-test && cd .. && \
python3 convert.py build/bin/kicker-test.nib build/bin/kicker_bin.h KICKER_BYTES
control:
cd control && \
mkdir -p build && cd build && \
cmake .. && make -j$(nproc) control
control-tests:
cd control && \
mkdir -p build && cd build && \
cmake .. && make -j$(nproc) $(ROBOT_TESTS)
$(ROBOT_TESTS): kicker-test
cd control && \
mkdir -p build && cd build && \
cmake .. && make -j $(@F)
make flash-test TEST=$(@F)
docs:
cd doc && doxygen Doxyfile
@echo "\n=> Open up 'generated-docs/index.html' in a browser to view a local copy of the documentation"
clean:
cd control && rm -rf build
cd control/mtrain && make clean
cd fpga && rm -rf build
cd kicker && rm -rf build
rm -rf generated-docs
CLANG_FORMAT_BINARY=clang-format-10
# run locally before committing
pretty-lines:
@git diff $(DIFFBASE) -U0 --no-color | python3 util/style/clang-format-diff.py -binary $(CLANG_FORMAT_BINARY) -i -p1