-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
34 lines (28 loc) · 847 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
#pkg-config from: https://www.geany.org/manual/gtk/glib/glib-compiling.html
#https://github.com/joprietoe/gdbus/blob/master/Makefile
#https://stackoverflow.com/questions/51269129/minimal-gdbus-client
TARGET = dvorak
CC = gcc
CFLAGS = -Wall -O3
.PHONY: default all clean install uninstall
default: all
all: dvorak.c
$(CC) $(CFLAGS) -o $(TARGET) dvorak.c
clean:
-rm -f *.o
-rm -f $(TARGET)
install:
cp dvorak /usr/local/bin/
cp 80-dvorak.rules /etc/udev/rules.d/
cp [email protected] /etc/systemd/system/
udevadm control --reload
systemctl restart systemd-udevd.service
systemctl daemon-reload
uninstall:
systemctl stop 'dvorak@*.service'
rm /usr/local/bin/dvorak
rm /etc/udev/rules.d/80-dvorak.rules
rm /etc/systemd/system/[email protected]
udevadm control --reload
systemctl restart systemd-udevd.service
systemctl daemon-reload