-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
57 lines (43 loc) · 1.47 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
47
48
49
50
51
52
53
54
55
56
57
# Bluetooth software keyboard
# Lubomir Rintel <[email protected]>
# License: GPL
VERSION = 1.5
CFLAGS += -Wall -g3
override LDFLAGS += $(shell pkg-config bluez --libs)
override LDFLAGS += -Wl,--as-needed
PREFIX = /usr/local
BINS = btkbdd/btkbdd evmuxd/evmuxd
MAN = btkbdd/btkbdd.8 evmuxd/evmuxd.8
UDEV_RULES = btkbdd/90-btkbdd.rules btkbdd/89-evmuxd.rules
SERVICES = btkbdd/[email protected] evmuxd/[email protected]
DOC = architecture.png
all: $(BINS) $(MAN)
local: $(DOC)
btkbdd/btkbdd: btkbdd/main.o btkbdd/keyb.o btkbdd/sdp.o btkbdd/l2cap.o btkbdd/hci.o
btkbbdd/keyb.o: btkbdd/btkbdd.h btkbdd/hid.h btkbdd/linux2hid.h
btkbbdd/l2cap.o: btkbdd/btkbdd.h
btkbbdd/main.o: btkbdd/btkbdd.h
btkbbdd/sdp.o: btkbdd/btkbdd.h btkbdd/apple.h
evmuxd/evmuxd: evmuxd/main.o
$(BINS):
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
%.8: %.pod
pod2man --center 'System management commands' --release $(VERSION) $< >$@
%.html: %.pod
pod2html $< >$@
%.ps: %.8
groff -mman $< >$@
%.png: %.dot
dot -Tpng -o $@ $<
clean:
rm -f */*.o $(BINS) $(MAN)
install: $(BINS)
mkdir -p $(DESTDIR)$(PREFIX)/sbin
install -p $(BINS) $(DESTDIR)$(PREFIX)/sbin
mkdir -p $(DESTDIR)$(PREFIX)/lib/udev/rules.d
install -p -m644 $(UDEV_RULES) $(DESTDIR)$(PREFIX)/lib/udev/rules.d
mkdir -p $(DESTDIR)$(PREFIX)/lib/systemd/system
install -p -m644 $(SERVICES) $(DESTDIR)$(PREFIX)/lib/systemd/system
mkdir -p $(DESTDIR)/var/lib/btkbdd
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8
install -p -m644 $(MAN) $(DESTDIR)$(PREFIX)/share/man/man8