-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 890 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (32 loc) · 890 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PROG = throughout
SRCS = bt/bt_hid.c bt/utils/bt_utils.c $(PROG).c
DEBUG = -g3
$(PROG): $(patsubst %.c,%.o,$(SRCS))
gcc -o $@ $^ `pkg-config --libs glib-2.0` -lbluetooth
%.o: %.c
gcc -c -o $@ $< $(DEBUG) $(DEFS) `pkg-config --cflags glib-2.0` -I.
bt/config_controller: bt/config_controller.o bt/mgmt_api/mgmt_api.o
gcc $^ -o $@ -lbluetooth `pkg-config --libs glib-2.0`
bt/sdp/sdpd: bt/sdp/sdpd.o bt/utils/bt_utils.o
gcc $^ -o $@ -lbluetooth
.PHONY : config
config: bt/config_controller
.PHONY : sdpd
sdpd: bt/sdp/sdpd
.PHONY : clean-sdpd
clean-sdpd:
rm -f bt/utils/bt_utils.o
rm -f bt/sdp/sdpd.o
rm -f bt/sdp/sdpd
.PHONY : clean-config
clean-config:
rm -f bt/config_controller.o
rm -f bt/mgmt_api/mgmt_api.o
rm -f bt/config_controller
.PHONY : clean
clean:
rm -f $(patsubst %.c,%.o,$(SRCS))
rm -f $(PROG)
.PHONY : apple
apple: DEFS := -DAPPLE_KEYBOARD
apple: $(PROG)