-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
97 lines (73 loc) · 1.98 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
## Configuration
## =============
# Parameters
# ----------
# Name of package containing the app to be built.
# Rust does not enforce that the path to the package matches the package name, but
# this makefile does to keep things simple.
# Keep in sync with both
# - `acapPackageConf.setup.appName` in `manifest.json`
# - `package.name` in `Cargo.toml`
export AXIS_PACKAGE ?= hello_world
# The architecture that will be assumed when interacting with the device.
export AXIS_DEVICE_ARCH ?= aarch64
# The IP address of the device to interact with.
export AXIS_DEVICE_IP ?= 192.168.0.90
# The username to use when interacting with the device.
export AXIS_DEVICE_USER ?= root
# The password to use when interacting with the device.
export AXIS_DEVICE_PASS ?= pass
# Other
# -----
# Have zero effect by default to prevent accidental changes.
.DEFAULT_GOAL := none
# Delete targets that fail to prevent subsequent attempts incorrectly assuming
# the target is up to date.
.DELETE_ON_ERROR: ;
# Prevent pesky default rules from creating unexpected dependency graphs.
.SUFFIXES: ;
## Verbs
## =====
none:;
## Checks
## ------
## Run all other checks
check_all: check_build check_docs check_format check_lint
.PHONY: check_all
## Check that all crates can be built
check_build:
cargo-acap-build --target aarch64
.PHONY: check_build
## Check that docs can be built
check_docs:
RUSTDOCFLAGS="-Dwarnings" cargo doc \
--document-private-items \
--no-deps \
--target aarch64-unknown-linux-gnu \
--workspace
.PHONY: check_docs
## Check that the code is formatted correctly
check_format:
cargo fmt --check
.PHONY: check_format
## Check that the code is free of lints
check_lint:
cargo clippy \
--all-targets \
--no-deps \
--target aarch64-unknown-linux-gnu \
-- \
-Dwarnings
.PHONY: check_lint
## Fixes
## -----
## Attempt to fix formatting automatically
fix_format:
cargo fmt
.PHONY: fix_format
## Attempt to fix lints automatically
fix_lint:
cargo clippy --fix
.PHONY: fix_lint
## Nouns
## =====