Home | History | Annotate | Download | only in service
      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.cc",
     20     "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/atomic_string.cc",
     30     "common/bluetooth/uuid.cc",
     31     "daemon.cc",
     32     "gatt_client.cc",
     33     "gatt_server.cc",
     34     "gatt_server_old.cc",
     35     "hal/bluetooth_gatt_interface.cc",
     36     "hal/bluetooth_interface.cc",
     37     "ipc/dbus/bluetooth_adapter.cc",
     38     "ipc/dbus/ipc_handler_dbus.cc",
     39     "hal/fake_bluetooth_gatt_interface.cc",
     40     "hal/fake_bluetooth_interface.cc",
     41     "ipc/ipc_handler.cc",
     42     "ipc/ipc_handler_linux.cc",
     43     "ipc/ipc_manager.cc",
     44     "ipc/linux_ipc_host.cc",
     45     "logging_helpers.cc",
     46     "low_energy_advertiser.cc",
     47     "low_energy_scanner.cc",
     48     "low_energy_client.cc",
     49     "settings.cc",
     50   ]
     51 
     52   include_dirs = [
     53     "//",
     54     "//service/common",
     55     "//third_party/modp_b64/modp64",
     56     "//third_party/libhardware/include",
     57   ]
     58 
     59   deps = [
     60     "//types",
     61     "//third_party/libchrome:base",
     62   ]
     63 }
     64 
     65 executable("bluetoothtbd") {
     66   sources = [
     67     "main.cc",
     68   ]
     69 
     70   deps = [
     71     ":service",
     72     "//btcore",
     73     "//third_party/libchrome:base",
     74     "//third_party/modp_b64",
     75   ]
     76 
     77   include_dirs = [ "//" ]
     78 
     79   libs = [
     80     "-ldl",
     81     "-lpthread",
     82     "-lrt",
     83   ]
     84 }
     85 
     86 executable("service_unittests") {
     87   testonly = true
     88   sources = [
     89     "test/fake_hal_util.cc",
     90     "test/settings_unittest.cc",
     91     "test/uuid_unittest.cc",
     92   ]
     93 
     94   include_dirs = [ "//" ]
     95 
     96   deps = [
     97     ":service",
     98     "//third_party/googletest:gmock_main",
     99     "//third_party/libchrome:base",
    100     "//third_party/modp_b64",
    101   ]
    102 }
    103