-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (25 loc) · 838 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
35
36
PREFIX = /usr/local
INSTALLROOT =
QUICKCALLD = $(PREFIX)/sbin/quickcalld
RULESFILE = /etc/udev/rules.d/85-$(RULESTEMPLATE)
CFLAGS = -ggdb -Wall $(CCANFLAGS) -I./
LDLIBS = -lusb -lasound
TARGETS = quickcalld
OBJS = quickcall.o main.o lib.o hid.o audio.o
RULESTEMPLATE = quickcall.rules
all: $(TARGETS)
quickcalld: $(OBJS) libccan.a
$(LINK.c) -o $@ $^ $(LDLIBS)
install: all
install -m 755 quickcalld $(INSTALLROOT)$(QUICKCALLD)
sed 's!@QUICKCALLD@!$(QUICKCALLD)!' $(RULESTEMPLATE) > $(INSTALLROOT)$(RULESFILE)
uninstall:
rm -f $(INSTALLROOT)$(QUICKCALLD) $(INSTALLROOT)$(RULESFILE)
go: all
./quickcalld $$(udevadm trigger --verbose --subsystem-match=usb --attr-match=idVendor=046d --attr-match=idProduct=08d5)
clean: ccanclean
rm -f $(TARGETS)
rm -f *.o *.d
rm -f *~
include ccan/Makefile.ccan
-include $(OBJS:%.o=%.d)