Upgrade bluez5_37 :Merge the code from private
[platform/upstream/bluez.git] / Makefile.tools
1
2 if CLIENT
3 bin_PROGRAMS += client/bluetoothctl
4
5 client_bluetoothctl_SOURCES = client/main.c \
6                                         client/display.h client/display.c \
7                                         client/agent.h client/agent.c \
8                                         client/gatt.h client/gatt.c \
9                                         monitor/uuid.h monitor/uuid.c
10 client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \
11                                 -lreadline
12 endif
13
14 if MONITOR
15 bin_PROGRAMS += monitor/btmon
16
17 monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
18                                 monitor/display.h monitor/display.c \
19                                 monitor/hcidump.h monitor/hcidump.c \
20                                 monitor/ellisys.h monitor/ellisys.c \
21                                 monitor/control.h monitor/control.c \
22                                 monitor/packet.h monitor/packet.c \
23                                 monitor/vendor.h monitor/vendor.c \
24                                 monitor/lmp.h monitor/lmp.c \
25                                 monitor/crc.h monitor/crc.c \
26                                 monitor/ll.h monitor/ll.c \
27                                 monitor/l2cap.h monitor/l2cap.c \
28                                 monitor/sdp.h monitor/sdp.c \
29                                 monitor/avctp.h monitor/avctp.c \
30                                 monitor/avdtp.h monitor/avdtp.c \
31                                 monitor/a2dp.h monitor/a2dp.c \
32                                 monitor/rfcomm.h monitor/rfcomm.c \
33                                 monitor/bnep.h monitor/bnep.c \
34                                 monitor/uuid.h monitor/uuid.c \
35                                 monitor/hwdb.h monitor/hwdb.c \
36                                 monitor/keys.h monitor/keys.c \
37                                 monitor/analyze.h monitor/analyze.c \
38                                 monitor/intel.h monitor/intel.c \
39                                 monitor/broadcom.h monitor/broadcom.c
40 monitor_btmon_LDADD = lib/libbluetooth-internal.la \
41                                 src/libshared-mainloop.la @UDEV_LIBS@
42 endif
43
44 if EXPERIMENTAL
45 noinst_PROGRAMS += emulator/btvirt emulator/b1ee emulator/hfp \
46                                         peripheral/btsensor tools/3dsp \
47                                         tools/mgmt-tester tools/gap-tester \
48                                         tools/l2cap-tester tools/sco-tester \
49                                         tools/smp-tester tools/hci-tester \
50                                         tools/rfcomm-tester tools/bnep-tester \
51                                         tools/userchan-tester
52
53 emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
54                                 emulator/serial.h emulator/serial.c \
55                                 emulator/server.h emulator/server.c \
56                                 emulator/vhci.h emulator/vhci.c \
57                                 emulator/btdev.h emulator/btdev.c \
58                                 emulator/bthost.h emulator/bthost.c \
59                                 emulator/smp.c \
60                                 emulator/phy.h emulator/phy.c \
61                                 emulator/amp.h emulator/amp.c \
62                                 emulator/le.h emulator/le.c
63 emulator_btvirt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la
64
65 emulator_b1ee_SOURCES = emulator/b1ee.c
66 emulator_b1ee_LDADD = src/libshared-mainloop.la
67
68 emulator_hfp_SOURCES = emulator/hfp.c
69 emulator_hfp_LDADD = src/libshared-mainloop.la
70
71 peripheral_btsensor_SOURCES = peripheral/main.c \
72                                 peripheral/efivars.h peripheral/efivars.c \
73                                 peripheral/attach.h peripheral/attach.c \
74                                 peripheral/log.h peripheral/log.c \
75                                 peripheral/gap.h peripheral/gap.c \
76                                 peripheral/gatt.h peripheral/gatt.c
77 peripheral_btsensor_LDADD = src/libshared-mainloop.la \
78                                 lib/libbluetooth-internal.la
79
80 tools_3dsp_SOURCES = tools/3dsp.c monitor/bt.h
81 tools_3dsp_LDADD = src/libshared-mainloop.la
82
83 tools_mgmt_tester_SOURCES = tools/mgmt-tester.c monitor/bt.h \
84                                 emulator/hciemu.h emulator/hciemu.c \
85                                 emulator/btdev.h emulator/btdev.c \
86                                 emulator/bthost.h emulator/bthost.c \
87                                 emulator/smp.c
88 tools_mgmt_tester_LDADD = lib/libbluetooth-internal.la \
89                                 src/libshared-glib.la @GLIB_LIBS@
90
91 tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \
92                                 emulator/hciemu.h emulator/hciemu.c \
93                                 emulator/btdev.h emulator/btdev.c \
94                                 emulator/bthost.h emulator/bthost.c \
95                                 emulator/smp.c
96 tools_l2cap_tester_LDADD = lib/libbluetooth-internal.la \
97                                 src/libshared-glib.la @GLIB_LIBS@
98
99 tools_rfcomm_tester_SOURCES = tools/rfcomm-tester.c monitor/bt.h \
100                                 emulator/hciemu.h emulator/hciemu.c \
101                                 emulator/btdev.h emulator/btdev.c \
102                                 emulator/bthost.h emulator/bthost.c \
103                                 emulator/smp.c
104 tools_rfcomm_tester_LDADD = lib/libbluetooth-internal.la \
105                                 src/libshared-glib.la @GLIB_LIBS@
106
107 tools_bnep_tester_SOURCES = tools/bnep-tester.c monitor/bt.h \
108                                 emulator/hciemu.h emulator/hciemu.c \
109                                 emulator/btdev.h emulator/btdev.c \
110                                 emulator/bthost.h emulator/bthost.c \
111                                 emulator/smp.c
112 tools_bnep_tester_LDADD = lib/libbluetooth-internal.la \
113                                 src/libshared-glib.la @GLIB_LIBS@
114
115 tools_smp_tester_SOURCES = tools/smp-tester.c monitor/bt.h \
116                                 emulator/hciemu.h emulator/hciemu.c \
117                                 emulator/btdev.h emulator/btdev.c \
118                                 emulator/bthost.h emulator/bthost.c \
119                                 emulator/smp.c
120 tools_smp_tester_LDADD = lib/libbluetooth-internal.la \
121                                 src/libshared-glib.la @GLIB_LIBS@
122
123 tools_gap_tester_SOURCES = tools/gap-tester.c monitor/bt.h \
124                                 emulator/hciemu.h emulator/hciemu.c \
125                                 emulator/btdev.h emulator/btdev.c \
126                                 emulator/bthost.h emulator/bthost.c \
127                                 emulator/smp.c
128 tools_gap_tester_LDADD =  lib/libbluetooth-internal.la \
129                                 gdbus/libgdbus-internal.la \
130                                 src/libshared-glib.la \
131                                 @GLIB_LIBS@ @DBUS_LIBS@
132
133 tools_sco_tester_SOURCES = tools/sco-tester.c monitor/bt.h \
134                                 emulator/hciemu.h emulator/hciemu.c \
135                                 emulator/btdev.h emulator/btdev.c \
136                                 emulator/bthost.h emulator/bthost.c \
137                                 emulator/smp.c
138 tools_sco_tester_LDADD = lib/libbluetooth-internal.la \
139                                 src/libshared-glib.la @GLIB_LIBS@
140
141 tools_hci_tester_SOURCES = tools/hci-tester.c monitor/bt.h
142 tools_hci_tester_LDADD = src/libshared-glib.la @GLIB_LIBS@
143
144 tools_userchan_tester_SOURCES = tools/userchan-tester.c monitor/bt.h \
145                                 emulator/hciemu.h emulator/hciemu.c \
146                                 emulator/btdev.h emulator/btdev.c \
147                                 emulator/bthost.h emulator/bthost.c \
148                                 emulator/smp.c
149 tools_userchan_tester_LDADD = lib/libbluetooth-internal.la \
150                                 src/libshared-glib.la @GLIB_LIBS@
151 endif
152
153 if TOOLS
154 bin_PROGRAMS += tools/hciattach tools/hciconfig tools/hcitool tools/hcidump \
155                         tools/rfcomm tools/rctest tools/l2test tools/l2ping \
156                         tools/sdptool tools/ciptool tools/bccmd \
157                         tools/bluemoon tools/hex2hcd tools/mpris-proxy
158
159 tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
160                                                 tools/hciattach_st.c \
161                                                 tools/hciattach_ti.c \
162                                                 tools/hciattach_tialt.c \
163                                                 tools/hciattach_ath3k.c \
164                                                 tools/hciattach_qualcomm.c \
165                                                 tools/hciattach_intel.c \
166                                                 tools/hciattach_sprd.c \
167                                                 tools/pskey_get.c \
168                                                 tools/hciattach_bcm43xx.c
169 tools_hciattach_LDADD = lib/libbluetooth-internal.la
170
171 tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c
172 tools_hciconfig_LDADD = lib/libbluetooth-internal.la
173
174 tools_hcitool_SOURCES = tools/hcitool.c src/oui.h src/oui.c
175 tools_hcitool_LDADD = lib/libbluetooth-internal.la @UDEV_LIBS@
176
177 tools_hcidump_SOURCES = tools/hcidump.c \
178                                 tools/parser/parser.h tools/parser/parser.c \
179                                 tools/parser/lmp.c \
180                                 tools/parser/hci.c \
181                                 tools/parser/l2cap.h tools/parser/l2cap.c \
182                                 tools/parser/amp.c \
183                                 tools/parser/smp.c \
184                                 tools/parser/att.c \
185                                 tools/parser/sdp.h tools/parser/sdp.c \
186                                 tools/parser/rfcomm.h tools/parser/rfcomm.c \
187                                 tools/parser/bnep.c \
188                                 tools/parser/cmtp.c \
189                                 tools/parser/hidp.c \
190                                 tools/parser/hcrp.c \
191                                 tools/parser/avdtp.c \
192                                 tools/parser/avctp.c \
193                                 tools/parser/avrcp.c \
194                                 tools/parser/sap.c \
195                                 tools/parser/obex.c \
196                                 tools/parser/capi.c \
197                                 tools/parser/ppp.c \
198                                 tools/parser/tcpip.c \
199                                 tools/parser/ericsson.c \
200                                 tools/parser/csr.c \
201                                 tools/parser/bpa.c
202 tools_hcidump_LDADD = lib/libbluetooth-internal.la
203
204 tools_rfcomm_LDADD = lib/libbluetooth-internal.la
205
206 tools_rctest_LDADD = lib/libbluetooth-internal.la
207
208 tools_l2test_LDADD = lib/libbluetooth-internal.la
209
210 tools_l2ping_LDADD = lib/libbluetooth-internal.la
211
212 tools_sdptool_SOURCES = tools/sdptool.c src/sdp-xml.h src/sdp-xml.c
213 tools_sdptool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
214
215 tools_ciptool_LDADD = lib/libbluetooth-internal.la
216
217 tools_bccmd_SOURCES = tools/bccmd.c tools/csr.h tools/csr.c \
218                         tools/csr_hci.c tools/csr_usb.c \
219                         tools/csr_h4.c tools/csr_3wire.c \
220                         tools/csr_bcsp.c tools/ubcsp.h tools/ubcsp.c
221 tools_bccmd_LDADD = lib/libbluetooth-internal.la
222
223 tools_bluemoon_SOURCES = tools/bluemoon.c monitor/bt.h
224 tools_bluemoon_LDADD = src/libshared-mainloop.la
225
226 tools_hex2hcd_SOURCES = tools/hex2hcd.c
227
228 tools_mpris_proxy_SOURCES = tools/mpris-proxy.c
229 tools_mpris_proxy_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
230
231 dist_man_MANS += tools/hciattach.1 tools/hciconfig.1 \
232                         tools/hcitool.1 tools/hcidump.1 \
233                         tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \
234                         tools/sdptool.1 tools/ciptool.1 tools/bccmd.1
235 else
236 EXTRA_DIST += tools/hciattach.1 tools/hciconfig.1 \
237                         tools/hcitool.1 tools/hcidump.1 \
238                         tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \
239                         tools/sdptool.1 tools/ciptool.1 tools/bccmd.1
240 endif
241
242 if HID2HCI
243 udevdir = @UDEV_DIR@
244
245 udev_PROGRAMS = tools/hid2hci
246
247 tools_hid2hci_LDADD = @UDEV_LIBS@
248
249 dist_man_MANS += tools/hid2hci.1
250 else
251 EXTRA_DIST += tools/hid2hci.1
252 endif
253
254 if EXPERIMENTAL
255 bin_PROGRAMS += tools/btattach
256 bin_PROGRAMS += tools/btsnoop
257
258 noinst_PROGRAMS += tools/bdaddr tools/avinfo tools/avtest \
259                         tools/scotest tools/amptest tools/hwdb \
260                         tools/hcieventmask tools/hcisecfilter \
261                         tools/btinfo \
262                         tools/btproxy \
263                         tools/btiotest tools/bneptest tools/mcaptest \
264                         tools/cltest tools/oobtest tools/seq2bseq \
265                         tools/nokfw tools/create-image \
266                         tools/eddystone tools/ibeacon \
267                         tools/btgatt-client tools/btgatt-server \
268                         tools/test-runner tools/check-selftest
269
270 tools_bdaddr_SOURCES = tools/bdaddr.c src/oui.h src/oui.c
271 tools_bdaddr_LDADD = lib/libbluetooth-internal.la @UDEV_LIBS@
272
273 tools_avinfo_LDADD = lib/libbluetooth-internal.la
274
275 tools_avtest_LDADD = lib/libbluetooth-internal.la
276
277 tools_scotest_LDADD = lib/libbluetooth-internal.la
278
279 tools_amptest_LDADD = lib/libbluetooth-internal.la
280
281 tools_hwdb_LDADD = lib/libbluetooth-internal.la
282
283 tools_hcieventmask_LDADD = lib/libbluetooth-internal.la
284
285 tools_btinfo_SOURCES = tools/btinfo.c monitor/bt.h
286 tools_btinfo_LDADD = src/libshared-mainloop.la
287
288 tools_btattach_SOURCES = tools/btattach.c monitor/bt.h
289 tools_btattach_LDADD = src/libshared-mainloop.la
290
291 tools_btsnoop_SOURCES = tools/btsnoop.c
292 tools_btsnoop_LDADD = src/libshared-mainloop.la
293
294 tools_btproxy_SOURCES = tools/btproxy.c monitor/bt.h
295 tools_btproxy_LDADD = src/libshared-mainloop.la
296
297 tools_btiotest_SOURCES = tools/btiotest.c btio/btio.h btio/btio.c
298 tools_btiotest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
299
300 tools_mcaptest_SOURCES = tools/mcaptest.c \
301                                 btio/btio.h btio/btio.c \
302                                 src/log.c src/log.h \
303                                 profiles/health/mcap.h profiles/health/mcap.c
304 tools_mcaptest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ -lrt
305
306 tools_bneptest_SOURCES = tools/bneptest.c \
307                                 btio/btio.h btio/btio.c \
308                                 src/log.h src/log.c \
309                                 profiles/network/bnep.h profiles/network/bnep.c
310 tools_bneptest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
311
312 tools_cltest_SOURCES = tools/cltest.c
313 tools_cltest_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la
314
315 tools_oobtest_SOURCES = tools/oobtest.c
316 tools_oobtest_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la
317
318 tools_seq2bseq_SOURCES = tools/seq2bseq.c
319
320 tools_nokfw_SOURCES = tools/nokfw.c
321
322 tools_create_image_SOURCES = tools/create-image.c
323
324 tools_eddystone_SOURCES = tools/eddystone.c monitor/bt.h
325 tools_eddystone_LDADD = src/libshared-mainloop.la
326
327 tools_ibeacon_SOURCES = tools/ibeacon.c monitor/bt.h
328 tools_ibeacon_LDADD = src/libshared-mainloop.la
329
330 tools_btgatt_client_SOURCES = tools/btgatt-client.c src/uuid-helper.c
331 tools_btgatt_client_LDADD = src/libshared-mainloop.la \
332                                                 lib/libbluetooth-internal.la
333
334 tools_btgatt_server_SOURCES = tools/btgatt-server.c src/uuid-helper.c
335 tools_btgatt_server_LDADD = src/libshared-mainloop.la \
336                                                 lib/libbluetooth-internal.la
337
338 dist_man_MANS += tools/btattach.1
339
340 EXTRA_DIST += tools/bdaddr.1
341 else
342 EXTRA_DIST += tools/btattach.1
343 endif
344
345 if READLINE
346 noinst_PROGRAMS += attrib/gatttool tools/btmgmt \
347                         tools/obex-client-tool tools/obex-server-tool \
348                         tools/bluetooth-player tools/obexctl
349
350 attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
351                                 attrib/gattrib.c btio/btio.c \
352                                 attrib/gatttool.h attrib/interactive.c \
353                                 attrib/utils.c src/log.c client/display.c \
354                                 client/display.h
355 attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
356                         src/libshared-glib.la @GLIB_LIBS@ -lreadline
357
358 tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \
359                                                 tools/obex-client-tool.c
360 tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
361                                                 @GLIB_LIBS@ -lreadline
362
363 tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
364                                                 tools/obex-server-tool.c
365 tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
366
367 tools_bluetooth_player_SOURCES = tools/bluetooth-player.c \
368                                 client/display.h client/display.c
369 tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
370                                 @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
371
372 tools_obexctl_SOURCES = tools/obexctl.c \
373                                 client/display.h client/display.c
374 tools_obexctl_LDADD = gdbus/libgdbus-internal.la \
375                                 @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
376
377 tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c
378 tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \
379                                 -lreadline
380 endif
381
382 if EXPERIMENTAL
383 noinst_PROGRAMS += tools/gatt-service
384
385 tools_gatt_service_SOURCES = tools/gatt-service.c
386 tools_gatt_service_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ gdbus/libgdbus-internal.la
387
388 noinst_PROGRAMS += profiles/iap/iapd
389
390 profiles_iap_iapd_SOURCES = profiles/iap/main.c
391 profiles_iap_iapd_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
392 endif
393
394 if CUPS
395 cupsdir = $(libdir)/cups/backend
396
397 cups_PROGRAMS = profiles/cups/bluetooth
398
399 profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
400                                         profiles/cups/cups.h \
401                                         profiles/cups/sdp.c \
402                                         profiles/cups/spp.c \
403                                         profiles/cups/hcrp.c
404
405 profiles_cups_bluetooth_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ \
406                                 lib/libbluetooth-internal.la \
407                                 gdbus/libgdbus-internal.la
408 endif
409
410 test_scripts += test/sap_client.py test/bluezutils.py \
411                 test/dbusdef.py test/monitor-bluetooth test/list-devices \
412                 test/test-discovery test/test-manager test/test-adapter \
413                 test/test-device test/simple-agent \
414                 test/simple-endpoint test/test-sap-server \
415                 test/test-proximity test/test-network \
416                 test/test-thermometer test/test-profile test/test-health \
417                 test/test-health-sink test/service-record.dtd \
418                 test/service-did.xml test/service-spp.xml test/service-opp.xml \
419                 test/service-ftp.xml test/simple-player test/test-nap \
420                 test/test-heartrate test/test-alert test/test-hfp \
421                 test/test-cyclingspeed test/opp-client test/ftp-client \
422                 test/pbap-client test/map-client test/example-advertisement \
423                 test/example-gatt-server test/example-gatt-client \
424                 test/test-gatt-profile