generated from ztnel/arduino-make
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (37 loc) · 1 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
# Makefile for Arduino Interfacing
# ================================
# Makefile for linting, compiling, flashing larger scale ardunio projects and
# interfacing with the arduino serial monitor
#
# Modified: 2021-04
# Copyright © 2021 Christian Sargusingh
.PHONY: help
help:
@echo Usage:
@echo " make [target]"
@echo
@echo Targets:
@awk -F ':|##' \
'/^[^\t].+?:.*?##/ {\
printf " %-30s %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST)
.PHONY: all
all: lint compile flash monitor
.PHONY: setup
setup: ## configure arduino-cli and install cpplinter
@./scripts/setup.sh
.PHONY: lint
lint: ## lint with cpplint (Google standards)
@./scripts/lint.sh
.PHONY: compile
compile: ## compile source code and save artefactsto the build directory
@./scripts/compile.sh $(mode)
.PHONY: flash
flash: ## flash arduino build artefacts to board
@./scripts/flash.sh
.PHONY: clean
clean: ## wipe build artefacts
@./scripts/clean.sh
.PHONY: monitor
monitor: ## Stream plaintext from arduino serial monitor
@./scripts/monitor.sh