-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (36 loc) · 1.57 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
WITHX11 ?= 0
ifeq ($(WITHX11), 0)
XLIB = -ludev -linput -levdev -I/usr/include/libevdev-1.0/
else
XLIB = -lX11
FLAGS +=-DWITHX11
endif
CC = cc
CFLAGS = `pkg-config --cflags gtk+-3.0 ayatana-appindicator3-0.1` $(FLAGS) $(XLIB)
LIBS = `pkg-config --libs gtk+-3.0 ayatana-appindicator3-0.1` -lpthread $(FLAGS) $(XLIB)
SRC = gxcapindicator.c
OBJ = $(SRC:.c=.o)
EXE = gxcapindicator
all: $(EXE)
$(EXE): $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
debug: $(SRC)
$(CC) $(CFLAGS) -g $^ -o debug $(LIBS)
test: $(EXE)
./$(EXE)
clean:
rm -f $(OBJ) $(EXE) debug
install: $(EXE)
install -Dm755 $(EXE) /usr/local/bin/$(EXE)
install -Dm755 gxcapindicator.desktop /usr/local/share/applications/gxcapindicator.desktop
install -Dm644 icons/keyboard-caps-disabled.svg /usr/local/share/icons/hicolor/32x32/devices/keyboard-caps-disabled.svg
install -Dm644 icons/keyboard-caps-enabled.svg /usr/local/share/icons/hicolor/32x32/devices/keyboard-caps-enabled.svg
install -Dm644 icons/keyboard-num-disabled.svg /usr/local/share/icons/hicolor/32x32/devices/keyboard-num-disabled.svg
install -Dm644 icons/keyboard-num-enabled.svg /usr/local/share/icons/hicolor/32x32/devices/keyboard-num-enabled.svg
uninstall:
rm -f /usr/local/bin/$(EXE)
rm -f /usr/local/share/applications/gxcapindicator.desktop
rm -f /usr/local/share/icons/hicolor/32x32/devices/keyboard-caps-disabled.svg
rm -f /usr/local/share/icons/hicolor/32x32/devices/keyboard-caps-enabled.svg
rm -f /usr/local/share/icons/hicolor/32x32/devices/keyboard-num-disabled.svg
rm -f /usr/local/share/icons/hicolor/32x32/devices/keyboard-num-enabled.svg