-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
39 lines (27 loc) · 858 Bytes
/
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
MAKE?=make
SRC_FILES := $(shell find support/ include/ \( -name '*.h' -o -name '*.c' -o -name '*.mk' \)) README.md
MD_FILES := $(shell find support/ -name '*.md')
doc: doc/html/index.html
doc/html/index.html: Doxyfile $(SRC_FILES) $(MD_FILES)
@test -d doc || mkdir -p doc
doxygen > /dev/null
init:
git submodule init
git submodule update
tools:
cd tool && $(MAKE) all
tests:
cd test && $(MAKE) all
tests16:
cd test/archtest && $(MAKE) pic16b
tests32:
cd test/archtest && $(MAKE) pic32
lines:
@wc -l $(SRC_FILES)| sort -n -k1
checks:
find support -type f -exec file {} \; | grep "CRLF" | awk -F ':' '{ print $$1 }'
search.%:
grep -r $* `find . \( -name '*.h' -o -name '*.c' \)`
format:
clang-format -i `find include/ support/ test/ -name "*.c" -o -name "*.h"`
clang-format -i `find tool/ -name "*.c" -o -name "*.h" -o -name "*.cpp"`