summaryrefslogtreecommitdiff
path: root/Makefile
blob: ab0396d50c8df71220c9db2bb72a2d5cb4b7a79c (plain)
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
MAKEPATH:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
BINARY:=$(MAKEPATH)/target/release/gfold

all: fmt build

final: prepare scan build

build:
	cd $(MAKEPATH); cargo build --release
	du -h $(BINARY)
	strip $(BINARY)
	du -h $(BINARY)

fmt:
	cd $(MAKEPATH); cargo +nightly fmt
	cd $(MAKEPATH); cargo clippy

prepare:
	cd $(MAKEPATH); cargo update
	cd $(MAKEPATH); cargo fix --edition-idioms --allow-dirty --allow-staged
	cd $(MAKEPATH); cargo +nightly fmt
	cd $(MAKEPATH); cargo clippy

scan:
	cd $(MAKEPATH); cargo +nightly udeps
	cd $(MAKEPATH); cargo bloat --release
	cd $(MAKEPATH); cargo bloat --release --crates
	cd $(MAKEPATH); cargo audit