-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (25 loc) · 926 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (25 loc) · 926 Bytes
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
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man/man1
.PHONY: build build-release run-scan install uninstall
build:
cargo build --bin mvis
@if [ "$$(uname)" = "Darwin" ]; then \
codesign --force --sign - --entitlements mvis.entitlements --timestamp=none target/debug/mvis; \
fi
build-release:
cargo build --release --bin mvis
@if [ "$$(uname)" = "Darwin" ]; then \
codesign --force --sign - --entitlements mvis.entitlements --timestamp=none target/release/mvis; \
fi
run-scan:
$(MAKE) build
sudo target/debug/mvis scan $(PROCESS) $(MODE)
install:
@test -f target/release/mvis || { echo "error: run 'make build-release' first"; exit 1; }
install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 target/release/mvis $(DESTDIR)$(PREFIX)/bin/mvis
install -d $(DESTDIR)$(MANDIR)
install -m 644 doc/mvis.1 $(DESTDIR)$(MANDIR)/mvis.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/mvis
rm -f $(DESTDIR)$(MANDIR)/mvis.1