1 # 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 17 source_set("service") { 18 sources = [ 19 "adapter.cpp", 20 "daemon.cpp", 21 "gatt_client.cpp", 22 "gatt_server.cpp", 23 "gatt_server_old.cpp", 24 "logging_helpers.cpp", 25 "low_energy_client.cpp", 26 "settings.cpp", 27 "common/bluetooth/advertise_data.cpp", 28 "common/bluetooth/adapter_state.cpp", 29 "common/bluetooth/uuid.cpp", 30 "common/bluetooth/scan_filter.cpp", 31 "common/bluetooth/scan_result.cpp", 32 "common/bluetooth/scan_settings.cpp", 33 "common/bluetooth/gatt_identifier.cpp", 34 "common/bluetooth/advertise_settings.cpp", 35 "common/bluetooth/util/atomic_string.cpp", 36 "common/bluetooth/util/address_helper.cpp", 37 "hal/bluetooth_interface.cpp", 38 "hal/bluetooth_gatt_interface.cpp", 39 "hal/fake_bluetooth_gatt_interface.cpp", 40 "hal/fake_bluetooth_interface.cpp", 41 "hal/gatt_helpers.cpp", 42 "ipc/ipc_handler.cpp", 43 "ipc/linux_ipc_host.cpp", 44 "ipc/ipc_manager.cpp", 45 "ipc/ipc_handler_linux.cpp", 46 ] 47 48 include_dirs = [ 49 "//", 50 "//service/common", 51 "//third_party/modp_b64/modp64", 52 libhw_include_path, 53 ] 54 55 deps = [ 56 "//third_party/libchrome:base" 57 ] 58 } 59 60 executable("bluetoothtbd") { 61 sources = [ 62 "main.cpp", 63 ] 64 65 deps = [ 66 ":service", 67 "//btcore", 68 "//third_party/libchrome:base", 69 "//third_party/modp_b64", 70 ] 71 72 include_dirs = [ "//" ] 73 74 libs = [ 75 "-ldl", 76 "-lpthread", 77 "-lrt", 78 ] 79 } 80 81 executable("service_unittests") { 82 testonly = true 83 sources = [ 84 "test/fake_hal_util.cpp", 85 "test/ipc_linux_unittest.cpp", 86 "test/settings_unittest.cpp", 87 "test/uuid_unittest.cpp", 88 ] 89 90 include_dirs = [ "//" ] 91 92 deps = [ 93 ":service", 94 "//third_party/googletest:gmock_main", 95 "//third_party/libchrome:base", 96 "//third_party/modp_b64", 97 ] 98 } 99