summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..eca1cac
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+PREFIX ?= $(HOME)/.local
+
+.PHONY: build install uninstall test clean
+
+build:
+ cargo build --release
+
+test:
+ cargo test
+
+install: build
+ install -Dm755 target/release/notification-badge $(PREFIX)/bin/notification-badge
+ install -Dm644 notification-badge.service $(HOME)/.config/systemd/user/notification-badge.service
+
+uninstall:
+ rm -f $(PREFIX)/bin/notification-badge
+ rm -f $(HOME)/.config/systemd/user/notification-badge.service
+ -systemctl --user stop notification-badge.service 2>/dev/null
+ -systemctl --user disable notification-badge.service 2>/dev/null
+
+clean:
+ cargo clean