plugins: Add initial code for diagnosis plugin
[bluez:vudentzs-clone.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                                         monitor/uuid.h monitor/uuid.c
9 client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \
10                                 -lreadline
11 endif
12
13 if MONITOR
14 bin_PROGRAMS += monitor/btmon
15
16 monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
17                                         monitor/mainloop.h monitor/mainloop.c \
18                                         monitor/display.h monitor/display.c \
19                                         monitor/hcidump.h monitor/hcidump.c \
20                                         monitor/btsnoop.h monitor/btsnoop.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/l2cap.h monitor/l2cap.c \
26                                         monitor/uuid.h monitor/uuid.c \
27                                         monitor/sdp.h monitor/sdp.c \
28                                         monitor/crc.h monitor/crc.c \
29                                         monitor/ll.h monitor/ll.c
30 monitor_btmon_LDADD = lib/libbluetooth-internal.la
31 endif
32
33 if EXPERIMENTAL
34 noinst_PROGRAMS += emulator/btvirt emulator/b1ee \
35                                         tools/mgmt-tester tools/gap-tester \
36                                         tools/l2cap-tester tools/sco-tester
37
38 emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
39                                         monitor/mainloop.h monitor/mainloop.c \
40                                         emulator/server.h emulator/server.c \
41                                         emulator/vhci.h emulator/vhci.c \
42                                         emulator/btdev.h emulator/btdev.c \
43                                         emulator/bthost.h emulator/bthost.c \
44                                         emulator/amp.h emulator/amp.c
45
46 emulator_b1ee_SOURCES = emulator/b1ee.c monitor/mainloop.h monitor/mainloop.c
47
48 tools_mgmt_tester_SOURCES = tools/mgmt-tester.c monitor/bt.h \
49                                 emulator/btdev.h emulator/btdev.c \
50                                 emulator/bthost.h emulator/bthost.c \
51                                 src/shared/util.h src/shared/util.c \
52                                 src/shared/mgmt.h src/shared/mgmt.c \
53                                 src/shared/hciemu.h src/shared/hciemu.c \
54                                 src/shared/tester.h src/shared/tester.c
55 tools_mgmt_tester_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
56
57 tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \
58                                 emulator/btdev.h emulator/btdev.c \
59                                 emulator/bthost.h emulator/bthost.c \
60                                 src/shared/util.h src/shared/util.c \
61                                 src/shared/mgmt.h src/shared/mgmt.c \
62                                 src/shared/hciemu.h src/shared/hciemu.c \
63                                 src/shared/tester.h src/shared/tester.c
64 tools_l2cap_tester_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
65
66 tools_gap_tester_SOURCES = tools/gap-tester.c monitor/bt.h \
67                                 emulator/btdev.h emulator/btdev.c \
68                                 emulator/bthost.h emulator/bthost.c \
69                                 src/shared/hciemu.h src/shared/hciemu.c \
70                                 src/shared/tester.h src/shared/tester.c
71 tools_gap_tester_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
72
73 tools_sco_tester_SOURCES = tools/sco-tester.c monitor/bt.h \
74                                 emulator/btdev.h emulator/btdev.c \
75                                 emulator/bthost.h emulator/bthost.c \
76                                 src/shared/util.h src/shared/util.c \
77                                 src/shared/mgmt.h src/shared/mgmt.c \
78                                 src/shared/hciemu.h src/shared/hciemu.c \
79                                 src/shared/tester.h src/shared/tester.c
80 tools_sco_tester_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
81 endif
82
83 if TOOLS
84 bin_PROGRAMS += tools/hciattach tools/hciconfig tools/hcitool tools/hcidump \
85                         tools/rfcomm tools/rctest tools/l2test tools/l2ping \
86                         tools/sdptool tools/ciptool tools/bccmd
87
88 tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \
89                                                 tools/hciattach_st.c \
90                                                 tools/hciattach_ti.c \
91                                                 tools/hciattach_tialt.c \
92                                                 tools/hciattach_ath3k.c \
93                                                 tools/hciattach_qualcomm.c \
94                                                 tools/hciattach_intel.c
95 tools_hciattach_LDADD = lib/libbluetooth-internal.la
96
97 tools_hciconfig_SOURCES = tools/hciconfig.c tools/csr.h tools/csr.c
98 tools_hciconfig_LDADD = lib/libbluetooth-internal.la
99
100 tools_hcitool_SOURCES = tools/hcitool.c src/oui.h src/oui.c
101 tools_hcitool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ @UDEV_LIBS@
102
103 tools_hcidump_SOURCES = tools/hcidump.c \
104                                 tools/parser/parser.h tools/parser/parser.c \
105                                 tools/parser/lmp.c \
106                                 tools/parser/hci.c \
107                                 tools/parser/l2cap.h tools/parser/l2cap.c \
108                                 tools/parser/amp.c \
109                                 tools/parser/smp.c \
110                                 tools/parser/att.c \
111                                 tools/parser/sdp.h tools/parser/sdp.c \
112                                 tools/parser/rfcomm.h tools/parser/rfcomm.c \
113                                 tools/parser/bnep.c \
114                                 tools/parser/cmtp.c \
115                                 tools/parser/hidp.c \
116                                 tools/parser/hcrp.c \
117                                 tools/parser/avdtp.c \
118                                 tools/parser/avctp.c \
119                                 tools/parser/avrcp.c \
120                                 tools/parser/sap.c \
121                                 tools/parser/obex.c \
122                                 tools/parser/capi.c \
123                                 tools/parser/ppp.c \
124                                 tools/parser/tcpip.c \
125                                 tools/parser/ericsson.c \
126                                 tools/parser/csr.c \
127                                 tools/parser/bpa.c
128 tools_hcidump_LDADD = lib/libbluetooth-internal.la
129
130 tools_rfcomm_LDADD = lib/libbluetooth-internal.la
131
132 tools_rctest_LDADD = lib/libbluetooth-internal.la
133
134 tools_l2test_LDADD = lib/libbluetooth-internal.la
135
136 tools_l2ping_LDADD = lib/libbluetooth-internal.la
137
138 tools_sdptool_SOURCES = tools/sdptool.c src/sdp-xml.h src/sdp-xml.c
139 tools_sdptool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
140
141 tools_ciptool_LDADD = lib/libbluetooth-internal.la
142
143 tools_bccmd_SOURCES = tools/bccmd.c tools/csr.h tools/csr.c \
144                         tools/csr_hci.c tools/csr_usb.c \
145                         tools/csr_h4.c tools/csr_3wire.c \
146                         tools/csr_bcsp.c tools/ubcsp.h tools/ubcsp.c
147 tools_bccmd_LDADD = lib/libbluetooth-internal.la
148
149 dist_man_MANS += tools/hciattach.1 tools/hciconfig.1 \
150                         tools/hcitool.1 tools/hcidump.1 \
151                         tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \
152                         tools/sdptool.1 tools/ciptool.1 tools/bccmd.1
153 else
154 EXTRA_DIST += tools/hciattach.1 tools/hciconfig.1 \
155                         tools/hcitool.1 tools/hcidump.1 \
156                         tools/rfcomm.1 tools/rctest.1 tools/l2ping.1 \
157                         tools/sdptool.1 tools/ciptool.1 tools/bccmd.1
158 endif
159
160 if HID2HCI
161 udevdir = @UDEV_DIR@
162
163 udev_PROGRAMS = tools/hid2hci
164
165 tools_hid2hci_LDADD = @UDEV_LIBS@
166
167 dist_man_MANS += tools/hid2hci.1
168 else
169 EXTRA_DIST += tools/hid2hci.1
170 endif
171
172 if EXPERIMENTAL
173 noinst_PROGRAMS += tools/bdaddr tools/avinfo tools/avtest \
174                         tools/scotest tools/amptest tools/hwdb \
175                         tools/hcieventmask tools/hcisecfilter \
176                         tools/btmgmt tools/btinfo tools/btattach \
177                         tools/btsnoop tools/btiotest tools/cltest \
178                         tools/mpris-player
179
180 tools_bdaddr_SOURCES = tools/bdaddr.c src/oui.h src/oui.c
181 tools_bdaddr_LDADD = lib/libbluetooth-internal.la @UDEV_LIBS@
182
183 tools_avinfo_LDADD = lib/libbluetooth-internal.la
184
185 tools_avtest_LDADD = lib/libbluetooth-internal.la
186
187 tools_scotest_LDADD = lib/libbluetooth-internal.la
188
189 tools_amptest_LDADD = lib/libbluetooth-internal.la
190
191 tools_hwdb_LDADD = lib/libbluetooth-internal.la
192
193 tools_hcieventmask_LDADD = lib/libbluetooth-internal.la
194
195 tools_btmgmt_SOURCES = tools/btmgmt.c src/glib-helper.c src/eir.c \
196                                 src/shared/util.h src/shared/util.c \
197                                 src/shared/mgmt.h src/shared/mgmt.c
198 tools_btmgmt_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
199
200 tools_btinfo_SOURCES = tools/btinfo.c
201
202 tools_btsnoop_SOURCES = tools/btsnoop.c \
203                                 src/shared/pcap.h src/shared/pcap.c \
204                                 src/shared/btsnoop.h src/shared/btsnoop.c
205
206 tools_btiotest_SOURCES = tools/btiotest.c btio/btio.h btio/btio.c
207 tools_btiotest_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
208
209 tools_mpris_player_SOURCES = tools/mpris-player.c
210 tools_mpris_player_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
211
212 tools_cltest_SOURCES = tools/cltest.c monitor/mainloop.h monitor/mainloop.c
213 tools_cltest_LDADD = lib/libbluetooth-internal.la
214
215 EXTRA_DIST += tools/bdaddr.1
216 endif
217
218 if READLINE
219 noinst_PROGRAMS += attrib/gatttool \
220                         tools/obex-client-tool tools/obex-server-tool \
221                         tools/bluetooth-player tools/obexctl
222
223 attrib_gatttool_SOURCES = attrib/gatttool.c attrib/att.c attrib/gatt.c \
224                                 attrib/gattrib.c btio/btio.c \
225                                 attrib/gatttool.h attrib/interactive.c \
226                                 attrib/utils.c src/log.c client/display.c \
227                                 client/display.h
228 attrib_gatttool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@ -lreadline
229
230 tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \
231                                                 tools/obex-client-tool.c
232 tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \
233                                                 @GLIB_LIBS@ -lreadline
234
235 tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
236                                                 tools/obex-server-tool.c
237 tools_obex_server_tool_LDADD = lib/libbluetooth-internal.la @GLIB_LIBS@
238
239 tools_bluetooth_player_SOURCES = tools/bluetooth-player.c \
240                                 client/display.h client/display.c
241 tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
242                                 @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
243
244 tools_obexctl_SOURCES = tools/obexctl.c \
245                                 client/display.h client/display.c
246 tools_obexctl_LDADD = gdbus/libgdbus-internal.la \
247                                 @GLIB_LIBS@ @DBUS_LIBS@ -lreadline
248 endif
249
250 if EXPERIMENTAL
251 noinst_PROGRAMS += profiles/iap/iapd
252
253 profiles_iap_iapd_SOURCES = profiles/iap/main.c
254 profiles_iap_iapd_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
255 endif
256
257 if CUPS
258 cupsdir = $(libdir)/cups/backend
259
260 cups_PROGRAMS = profiles/cups/bluetooth
261
262 profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
263                                         profiles/cups/cups.h \
264                                         profiles/cups/sdp.c \
265                                         profiles/cups/spp.c \
266                                         profiles/cups/hcrp.c
267
268 profiles_cups_bluetooth_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ \
269                                 lib/libbluetooth-internal.la \
270                                 gdbus/libgdbus-internal.la
271 endif
272
273 test_scripts += test/sap_client.py test/bluezutils.py \
274                 test/dbusdef.py test/monitor-bluetooth test/list-devices \
275                 test/test-discovery test/test-manager test/test-adapter \
276                 test/test-device test/simple-agent \
277                 test/simple-service test/simple-endpoint test/test-sap-server \
278                 test/test-proximity test/test-network \
279                 test/test-thermometer test/test-profile test/test-health \
280                 test/test-health-sink test/service-record.dtd \
281                 test/service-did.xml test/service-spp.xml test/service-opp.xml \
282                 test/service-ftp.xml test/simple-player test/test-nap \
283                 test/test-heartrate test/test-alert test/test-hfp \
284                 test/test-cyclingspeed