summaryrefslogtreecommitdiff
path: root/Makefile.tools
blob: 7c5ff55f5930eeb66f9f5f835fa8e757a94fa31c (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

if TOOLS
if CONFIGFILES
conf_DATA += tools/rfcomm.conf
endif

bin_PROGRAMS += tools/rfcomm tools/l2ping \
				tools/hcitool tools/sdptool tools/ciptool

sbin_PROGRAMS += tools/hciattach tools/hciconfig

noinst_PROGRAMS += tools/avinfo tools/ppporc \
				tools/hcieventmask tools/hcisecfilter

tools/kword.c: tools/parser.h

tools_rfcomm_SOURCES = tools/rfcomm.c tools/parser.y tools/lexer.l \
					tools/kword.h tools/kword.c
EXTRA_tools_rfcomm_SOURCES = tools/parser.h tools/parser.c \
							tools/lexer.c
tools_rfcomm_LDADD = lib/libbluetooth.la

tools_l2ping_LDADD = lib/libbluetooth.la

tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
						tools/hciattach_st.c \
						tools/hciattach_ti.c \
						tools/hciattach_tialt.c \
						tools/hciattach_ath3k.c \
						tools/hciattach_qualcomm.c
tools_hciattach_LDADD = lib/libbluetooth.la

tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c \
						src/textfile.h src/textfile.c
tools_hciconfig_LDADD = lib/libbluetooth.la

tools_hcitool_SOURCES = tools/hcitool.c src/oui.h src/oui.c \
						src/textfile.h src/textfile.c
tools_hcitool_LDADD = lib/libbluetooth.la

tools_sdptool_SOURCES = tools/sdptool.c src/sdp-xml.h src/sdp-xml.c
tools_sdptool_LDADD = lib/libbluetooth.la

tools_ciptool_LDADD = lib/libbluetooth.la

tools_avinfo_LDADD = lib/libbluetooth.la

tools_ppporc_LDADD = lib/libbluetooth.la

tools_hcieventmask_LDADD = lib/libbluetooth.la

dist_man_MANS += tools/rfcomm.1 tools/l2ping.8 \
			tools/hciattach.8 tools/hciconfig.8 \
			tools/hcitool.1 tools/sdptool.1 tools/ciptool.1
else
EXTRA_DIST += tools/rfcomm.1 tools/l2ping.8 \
			tools/hciattach.8 tools/hciconfig.8 \
			tools/hcitool.1 tools/sdptool.1 tools/ciptool.1
endif

CLEANFILES += tools/lexer.c tools/parser.c tools/parser.h

EXTRA_DIST += tools/rfcomm.conf

if TRACER
sbin_PROGRAMS += tracer/hcitrace

tracer_hcitrace_SOURCES = tracer/main.c
tracer_hcitrace_LDADD = lib/libbluetooth.la \
				@GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@
tracer_hcitrace_DEPENDENCIES = lib/libbluetooth.la
endif

if BCCMD
sbin_PROGRAMS += tools/bccmd

tools_bccmd_SOURCES = tools/bccmd.c tools/csr.h tools/csr.c \
			tools/csr_hci.c tools/csr_h4.c tools/csr_3wire.c \
			tools/csr_bcsp.c tools/ubcsp.h tools/ubcsp.c
tools_bccmd_LDADD = lib/libbluetooth.la

if USB
tools_bccmd_SOURCES += tools/csr_usb.c
tools_bccmd_LDADD += @USB_LIBS@
endif

dist_man_MANS += tools/bccmd.8
else
EXTRA_DIST += tools/bccmd.8
endif

if HID2HCI
sbin_PROGRAMS += tools/hid2hci

tools_hid2hci_LDADD = @USB_LIBS@

dist_man_MANS += tools/hid2hci.8
else
EXTRA_DIST += tools/hid2hci.8
endif

if DFUTOOL
bin_PROGRAMS += tools/dfutool

tools_dfutool_SOURCES = tools/dfutool.c tools/dfu.h tools/dfu.c
tools_dfutool_LDADD = @USB_LIBS@

dist_man_MANS += tools/dfutool.1
else
EXTRA_DIST += tools/dfutool.1
endif


if USB
noinst_PROGRAMS += tools/dfubabel tools/avctrl

tools_dfubabel_LDADD = @USB_LIBS@

tools_avctrl_LDADD = @USB_LIBS@
endif

EXTRA_DIST += tools/dfubabel.1 tools/avctrl.8


if CUPS
cupsdir = $(libdir)/cups/backend

cups_PROGRAMS = cups/bluetooth

cups_bluetooth_SOURCES = $(gdbus_sources) cups/main.c cups/cups.h \
					cups/sdp.c cups/spp.c cups/hcrp.c

cups_bluetooth_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ lib/libbluetooth.la
endif


if TEST
sbin_PROGRAMS += test/hciemu

bin_PROGRAMS += test/l2test test/rctest

noinst_PROGRAMS += test/gaptest test/sdptest test/scotest \
			test/attest test/hstest test/avtest test/ipctest \
					test/lmptest test/bdaddr test/agent \
					test/btiotest test/test-textfile \
					test/uuidtest

test_hciemu_LDADD = @GLIB_LIBS@ lib/libbluetooth.la

test_l2test_LDADD = lib/libbluetooth.la

test_rctest_LDADD = lib/libbluetooth.la

test_gaptest_LDADD = @DBUS_LIBS@

test_sdptest_LDADD = lib/libbluetooth.la

test_scotest_LDADD = lib/libbluetooth.la

test_attest_LDADD = lib/libbluetooth.la

test_hstest_LDADD = lib/libbluetooth.la

test_avtest_LDADD = lib/libbluetooth.la

test_lmptest_LDADD = lib/libbluetooth.la

test_ipctest_SOURCES = test/ipctest.c audio/ipc.h audio/ipc.c
test_ipctest_LDADD= @GLIB_LIBS@ sbc/libsbc.la

test_bdaddr_SOURCES = test/bdaddr.c src/oui.h src/oui.c
test_bdaddr_LDADD = lib/libbluetooth.la

test_agent_LDADD = @DBUS_LIBS@

test_btiotest_SOURCES = test/btiotest.c btio/btio.h btio/btio.c
test_btiotest_LDADD = @GLIB_LIBS@ lib/libbluetooth.la

test_uuidtest_SOURCES = test/uuidtest.c
test_uuidtest_LDADD = lib/libbluetooth.la

test_test_textfile_SOURCES = test/test-textfile.c src/textfile.h src/textfile.c

dist_man_MANS += test/rctest.1 test/hciemu.1

EXTRA_DIST += test/bdaddr.8
else
EXTRA_DIST += test/rctest.1 test/hciemu.1 test/bdaddr.8
endif

EXTRA_DIST += test/apitest test/sap-client test/hsplay test/hsmicro \
		test/dbusdef.py test/monitor-bluetooth test/list-devices \
		test/test-discovery test/test-manager test/test-adapter \
		test/test-device test/test-service test/test-serial \
		test/test-telephony test/test-network test/simple-agent \
		test/simple-service test/simple-endpoint test/test-audio \
		test/test-input test/test-attrib test/test-sap-server \
		test/service-record.dtd test/service-did.xml test/service-spp.xml \
		test/service-opp.xml test/service-ftp.xml


if HIDD
bin_PROGRAMS += compat/hidd

compat_hidd_SOURCES = compat/hidd.c compat/hidd.h src/uinput.h \
				compat/sdp.h compat/sdp.c compat/fakehid.c \
						src/textfile.h src/textfile.c
compat_hidd_LDADD = -lm lib/libbluetooth.la

dist_man_MANS += compat/hidd.1
else
EXTRA_DIST += compat/hidd.1
endif

if PAND
bin_PROGRAMS += compat/pand

compat_pand_SOURCES = compat/pand.c compat/pand.h \
				compat/bnep.c compat/sdp.h compat/sdp.c \
						src/textfile.h src/textfile.c
compat_pand_LDADD = lib/libbluetooth.la

dist_man_MANS += compat/pand.1
else
EXTRA_DIST += compat/pand.1
endif

if DUND
bin_PROGRAMS += compat/dund

compat_dund_SOURCES = compat/dund.c compat/dund.h compat/lib.h \
			compat/sdp.h compat/sdp.c compat/dun.c compat/msdun.c \
						src/textfile.h src/textfile.c
compat_dund_LDADD = lib/libbluetooth.la

dist_man_MANS += compat/dund.1
else
EXTRA_DIST += compat/dund.1
endif