-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 686 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 686 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
CC=gcc
CFLAGS=-O2 -Wall -Wextra $(shell pkg-config --cflags libusb-1.0)
LDFLAGS=$(shell pkg-config --libs libusb-1.0)
PREFIX=/usr
harpoond: harpoond.c
$(CC) $(CFLAGS) harpoond.c -o harpoond $(LDFLAGS)
install:
install -c harpoond $(PREFIX)/bin
install -c harpoond.service $(PREFIX)/lib/systemd/user
install -c -m 644 99-harpoond.rules $(PREFIX)/lib/udev/rules.d
udevadm control --reload-rules
@echo
@echo '### Please unplug and plug back the mouse ###'
uninstall:
rm -f $(PREFIX)/bin/harpoond
rm -f $(PREFIX)/lib/systemd/user/harpoond.service
rm -f $(PREFIX)/lib/udev/rules.d/99-harpoond.rules
udevadm control --reload-rules
clean:
rm -f harpoond
.PHONY: clean install