blob: 2fb94b52974b9ed125488fe068e244c473e52bb5 [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 Pawlowskie6d12022016-05-12 11:16:46 -070019 "adapter.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070020 "common/bluetooth/adapter_state.cc",
21 "common/bluetooth/advertise_data.cc",
22 "common/bluetooth/advertise_settings.cc",
23 "common/bluetooth/characteristic.cc",
24 "common/bluetooth/descriptor.cc",
25 "common/bluetooth/scan_filter.cc",
26 "common/bluetooth/scan_result.cc",
27 "common/bluetooth/scan_settings.cc",
28 "common/bluetooth/service.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070029 "common/bluetooth/util/atomic_string.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070030 "daemon.cc",
31 "gatt_client.cc",
32 "gatt_server.cc",
33 "gatt_server_old.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070034 "hal/bluetooth_gatt_interface.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070035 "hal/bluetooth_interface.cc",
Jakub Pawlowski79c2ff92016-10-31 12:56:12 -070036 "ipc/dbus/bluetooth_adapter.cc",
37 "ipc/dbus/ipc_handler_dbus.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070038 "hal/fake_bluetooth_gatt_interface.cc",
39 "hal/fake_bluetooth_interface.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070040 "ipc/ipc_handler.cc",
Jack He1f60d2d2016-11-22 12:39:52 -080041 "ipc/ipc_handler_linux.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070042 "ipc/ipc_manager.cc",
43 "ipc/linux_ipc_host.cc",
44 "logging_helpers.cc",
Jakub Pawlowski67d5a252016-07-13 11:55:16 -070045 "low_energy_advertiser.cc",
Jakub Pawlowskic3f6a512016-10-27 11:49:40 -070046 "low_energy_scanner.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070047 "low_energy_client.cc",
48 "settings.cc",
Arman Ugurayf2d64342015-07-08 15:47:39 -070049 ]
50
51 include_dirs = [
52 "//",
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070053 "//include",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080054 "//service/common",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080055 "//third_party/modp_b64/modp64",
Arman Ugurayf2d64342015-07-08 15:47:39 -070056 ]
Jakub Pawlowski219d4b62016-02-25 12:16:31 -080057
58 deps = [
Jakub Pawlowskid3988fd2017-07-14 21:08:47 -070059 "//types",
60 "//third_party/libchrome:base",
Jakub Pawlowski219d4b62016-02-25 12:16:31 -080061 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070062}
63
64executable("bluetoothtbd") {
65 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070066 "main.cc",
Arman Uguray065d0f72015-07-16 18:12:13 -070067 ]
68
69 deps = [
70 ":service",
71 "//btcore",
72 "//third_party/libchrome:base",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080073 "//third_party/modp_b64",
Arman Uguray065d0f72015-07-16 18:12:13 -070074 ]
75
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080076 include_dirs = [ "//" ]
Arman Uguray065d0f72015-07-16 18:12:13 -070077
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080078 libs = [
79 "-ldl",
80 "-lpthread",
81 "-lrt",
82 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070083}
84
85executable("service_unittests") {
86 testonly = true
87 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070088 "test/fake_hal_util.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070089 "test/settings_unittest.cc",
Arman Uguray065d0f72015-07-16 18:12:13 -070090 ]
91
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080092 include_dirs = [ "//" ]
Arman Ugurayf2d64342015-07-08 15:47:39 -070093
94 deps = [
Arman Uguray065d0f72015-07-16 18:12:13 -070095 ":service",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080096 "//third_party/googletest:gmock_main",
Arman Ugurayf2d64342015-07-08 15:47:39 -070097 "//third_party/libchrome:base",
98 "//third_party/modp_b64",
99 ]
Arman Ugurayf2d64342015-07-08 15:47:39 -0700100}