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