-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (45 loc) · 876 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: MIT
PROJECT := template
BASEDIR := $(shell pwd)
BUILDIR := build
VERBOSE ?= 0
V ?= $(VERBOSE)
ifeq ($(V), 0)
Q = @
else
Q =
endif
export PROJECT
export BASEDIR
export BUILDIR
export Q
include projects/version.mk
include projects/defines.mk
include projects/app.mk
include projects/toolchain.mk
include projects/rules.mk
.PHONY: confirm
confirm:
@echo 'Are you sure? [y/N] ' && read ans && [ $${ans:-N} = y ]
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## test
.PHONY: test
test:
$(Q)$(MAKE) -C tests
## coverage
.PHONY: coverage
coverage:
$(Q)$(MAKE) -C tests $@
## clean
.PHONY: clean
clean:
$(Q)rm -fr $(BUILDIR)
$(Q)$(MAKE) -C tests $@
## version: print firmware version
.PHONY: version
version:
$(info $(VERSION_TAG), $(VERSION))