-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (21 loc) · 790 Bytes
/
Makefile
File metadata and controls
25 lines (21 loc) · 790 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
DESTDIR:=/
PREFIX:=/usr/local
SYSTEMD_DIR:=/usr/local/lib/systemd/system/
NVFANS_SERVICE:=nvfans.service
NVFANS_SLEEP_SERVICE:=nvfans-sleep.service
NVFANS_RESUME_SERVICE:=nvfans-resume.service
.PHONY: build-release
build-release:
cargo build -p nvfans --release
install:
install -Dm755 target/release/nvfans $(DESTDIR)$(PREFIX)/bin/nvfans
# Services
install -Dm644 services/nvfans.service $(DESTDIR)$(SYSTEMD_DIR)
install -Dm644 services/nvfans-sleep.service $(DESTDIR)$(SYSTEMD_DIR)
install -Dm644 services/nvfans-resume.service $(DESTDIR)$(SYSTEMD_DIR)
.PHONY: uninstall
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/nvfans
rm $(DESTDIR)$(SYSTEMD_DIR)$(NVFANS_SERVICE)
rm $(DESTDIR)$(SYSTEMD_DIR)$(NVFANS_SLEEP_SERVICE)
rm $(DESTDIR)$(SYSTEMD_DIR)$(NVFANS_RESUME_SERVICE)