forked from containers/netavark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (38 loc) · 804 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
# TODO: Make this more configurable
#prog :=xnixperms
debug ?=
ifdef debug
$(info debug is $(debug))
release :=
target :=debug
extension :=debug
else
release :=--release
target :=release
extension :=
endif
build:
cargo build $(release) --target-dir bin
cp bin/$(target)/netavark bin/netavark
clean:
rm -rf bin
$(MAKE) -C docs clean
.PHONY: docs
docs: ## build the docs on the host
$(MAKE) -C docs
.PHONY: install
install:
install -D -m0755 bin/buildah $(DESTDIR)/$(BINDIR)/netavark
$(MAKE) -C docs install
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)/$(BINDIR)/netavark
rm -f $(PREFIX)/share/man/man1/netavark*.1
test:
cargo test
validate:
cargo fmt --all -- --check
cargo clippy -p netavark -- -D warnings
all: build docs
help:
@echo "usage: make $(prog) [debug=1]"