blob: e156c729240d57d69fbbf4bdc7e802ec5a8a22a2 [file] [log] [blame]
Arman Ugurayf2d64342015-07-08 15:47:39 -07001#
2# Copyright (C) 2015 Google
3#
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",
29 "common/bluetooth/util/address_helper.cc",
30 "common/bluetooth/util/atomic_string.cc",
31 "common/bluetooth/uuid.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070032 "daemon.cc",
33 "gatt_client.cc",
34 "gatt_server.cc",
35 "gatt_server_old.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070036 "hal/bluetooth_gatt_interface.cc",
Jakub Pawlowski5f7514d2016-08-25 13:14:26 -070037 "hal/bluetooth_interface.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 Pawlowskid7a05a02016-02-22 18:04:24 -080053 "//service/common",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080054 "//third_party/modp_b64/modp64",
Jakub Pawlowskid5500192016-10-19 18:35:18 -070055 "//third_party/libhardware/include",
Arman Ugurayf2d64342015-07-08 15:47:39 -070056 ]
Jakub Pawlowski219d4b62016-02-25 12:16:31 -080057
58 deps = [
59 "//third_party/libchrome:base"
60 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070061}
62
63executable("bluetoothtbd") {
64 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070065 "main.cc",
Arman Uguray065d0f72015-07-16 18:12:13 -070066 ]
67
68 deps = [
69 ":service",
70 "//btcore",
71 "//third_party/libchrome:base",
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080072 "//third_party/modp_b64",
Arman Uguray065d0f72015-07-16 18:12:13 -070073 ]
74
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080075 include_dirs = [ "//" ]
Arman Uguray065d0f72015-07-16 18:12:13 -070076
Jakub Pawlowskid7a05a02016-02-22 18:04:24 -080077 libs = [
78 "-ldl",
79 "-lpthread",
80 "-lrt",
81 ]
Arman Uguray065d0f72015-07-16 18:12:13 -070082}
83
84executable("service_unittests") {
85 testonly = true
86 sources = [
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070087 "test/fake_hal_util.cc",
Jakub Pawlowskie6d12022016-05-12 11:16:46 -070088 "test/settings_unittest.cc",
89 "test/uuid_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}