blob: 59acb167cd308ef0071834c42a24f87b41d23237 [file] [log] [blame]
Arman Ugurayf2d64342015-07-08 15:47:39 -07001#
Jakub Pawlowski5b790fe2017-09-18 09:00:20 -07002# Copyright 2015 Google
Arman Ugurayf2d64342015-07-08 15:47:39 -07003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at:
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Arman Uguray065d0f72015-07-16 18:12:13 -070017source_set("service") {
Arman Ugurayf2d64342015-07-08 15:47:39 -070018 sources = [
Jakub Pawlowski292ab252018-10-23 15:57:20 +020019 "a2dp_sink.cc",
20 "a2dp_source.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070021 "adapter.cc",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020022 "avrcp_control.cc",
23 "avrcp_target.cc",
24 "common/bluetooth/a2dp_codec_config.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070025 "common/bluetooth/adapter_state.cc",
26 "common/bluetooth/advertise_data.cc",
27 "common/bluetooth/advertise_settings.cc",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020028 "common/bluetooth/avrcp_int_value.cc",
29 "common/bluetooth/avrcp_media_attr.cc",
30 "common/bluetooth/avrcp_register_notification_response.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070031 "common/bluetooth/characteristic.cc",
32 "common/bluetooth/descriptor.cc",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020033 "common/bluetooth/remote_device_props.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070034 "common/bluetooth/scan_filter.cc",
35 "common/bluetooth/scan_result.cc",
36 "common/bluetooth/scan_settings.cc",
37 "common/bluetooth/service.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070038 "common/bluetooth/util/atomic_string.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070039 "daemon.cc",
40 "gatt_client.cc",
41 "gatt_server.cc",
42 "gatt_server_old.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070043 "hal/bluetooth_gatt_interface.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070044 "hal/bluetooth_interface.cc",
Jakub Pawlowski79c2ff92016-10-31 12:56:12 -070045 "ipc/dbus/bluetooth_adapter.cc",
46 "ipc/dbus/ipc_handler_dbus.cc",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020047 "hal/bluetooth_av_interface.cc",
48 "hal/bluetooth_avrcp_interface.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070049 "hal/fake_bluetooth_gatt_interface.cc",
50 "hal/fake_bluetooth_interface.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070051 "ipc/ipc_handler.cc",
Jack He1f60d2d2016-11-22 12:39:52 -080052 "ipc/ipc_handler_linux.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070053 "ipc/ipc_manager.cc",
54 "ipc/linux_ipc_host.cc",
55 "logging_helpers.cc",
Jakub Pawlowski67d5a252016-07-13 11:55:16 -070056 "low_energy_advertiser.cc",
Jakub Pawlowskic3f6a512016-10-27 11:49:40 -070057 "low_energy_scanner.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070058 "low_energy_client.cc",
59 "settings.cc",
Arman Ugurayf2d64342015-07-08 15:47:39 -070060 ]
61
62 include_dirs = [
63 "//",
Jakub Pawlowski292ab252018-10-23 15:57:20 +020064 "//linux_include",
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070065 "//include",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080066 "//service/common",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080067 "//third_party/modp_b64/modp64",
Arman Ugurayf2d64342015-07-08 15:47:39 -070068 ]
Jakub Pawlowski219d4b62016-02-25 12:16:31 -080069
70 deps = [
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -070071 "//types",
Jakub Pawlowski9e814612018-05-25 09:31:26 -070072 "//osi",
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -070073 "//third_party/libchrome:base",
Jakub Pawlowski219d4b62016-02-25 12:16:31 -080074 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070075}
76
77executable("bluetoothtbd") {
78 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070079 "main.cc",
Arman Uguray065d0f72015-07-16 18:12:13 -070080 ]
81
82 deps = [
83 ":service",
84 "//btcore",
85 "//third_party/libchrome:base",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080086 "//third_party/modp_b64",
Arman Uguray065d0f72015-07-16 18:12:13 -070087 ]
88
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080089 include_dirs = [ "//" ]
Arman Uguray065d0f72015-07-16 18:12:13 -070090
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080091 libs = [
92 "-ldl",
93 "-lpthread",
94 "-lrt",
95 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070096}
97
98executable("service_unittests") {
99 testonly = true
100 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -0700101 "test/fake_hal_util.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -0700102 "test/settings_unittest.cc",
Arman Uguray065d0f72015-07-16 18:12:13 -0700103 ]
104
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -0800105 include_dirs = [ "//" ]
Arman Ugurayf2d64342015-07-08 15:47:39 -0700106
107 deps = [
Arman Uguray065d0f72015-07-16 18:12:13 -0700108 ":service",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -0800109 "//third_party/googletest:gmock_main",
Arman Ugurayf2d64342015-07-08 15:47:39 -0700110 "//third_party/libchrome:base",
111 "//third_party/modp_b64",
112 ]
Arman Ugurayf2d64342015-07-08 15:47:39 -0700113}