-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
52 lines (44 loc) · 1.19 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
.PHONY: default
default:
@echo "make doc | examples | check | clean"
# Produce HTML documentation
#
.PHONY: doc
doc:
@cd doxygen && $(MAKE) --no-print-directory
# Remove all built files
#
.PHONY:clean
clean:
@find . '(' \
-name '*~' \
-o -name '*.cp.*' \
-o -name '*.pyc' \
-o -name '*.bak' \
-o -name 'failed' \
')' -exec rm -rf {} ';'
@find . -name 'build' -prune -exec rm -rf {} ';'
@rm -rf doxygen/html
# Compile all the examples
#
.PHONY: examples
examples:
@FAILS=$$(mktemp) ; export FAILS ;\
(cd atmel/avr/examples && bash make/make-all.sh) ;\
(cd st/stm32/examples && bash make/make-all.sh) ;\
(cd espressif/esp8266/examples && bash make/make-all.sh) ;\
fails=$$(cat $$FAILS | wc -l) ;\
if [ $$fails -eq 0 ] ; then \
echo "Success." ; echo ;\
else \
echo "$$fails examples failed:" ;\
cat $$FAILS ; echo ;\
fi ;\
rm $$FAILS
# Verify the examples CRCs
#
.PHONY: check
check:
@cd atmel/avr/examples && $(MAKE) --no-print-directory check
# @cd st/stm32/examples && $(MAKE) --no-print-directory check
# @cd espressif/esp8266/examples && $(MAKE) --no-print-directory check