1# 2# Copyright 2015 Google, Inc. 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 17static_library("hci") { 18 sources = [ 19 "src/btsnoop.cc", 20 "src/btsnoop_mem.cc", 21 "src/btsnoop_net.cc", 22 "src/buffer_allocator.cc", 23 "src/hci_inject.cc", 24 "src/hci_layer.cc", 25 "src/hci_layer_linux.cc", 26 "src/hci_packet_factory.cc", 27 "src/hci_packet_parser.cc", 28 "src/packet_fragmenter.cc", 29 ] 30 31 include_dirs = [ 32 "include", 33 "//bt/", 34 "//bt/internal_include", 35 "//bt/bta/include", 36 "//bt/btcore/include", 37 "//bt/stack/include", 38 ] 39 40 deps = [ 41 "//bt/common", 42 ] 43 44 configs += [ 45 "//bt:target_defaults", 46 ] 47} 48 49if (use.test) { 50 executable("net_test_hci") { 51 sources = [ 52 "//bt/osi/test/AllocationTestHarness.cc", 53 "//bt/osi/test/AlarmTestHarness.cc", 54 "test/packet_fragmenter_test.cc", 55 ] 56 57 include_dirs = [ 58 "//bt/", 59 "//bt/internal_include", 60 "//bt/btcore/include", 61 "//bt/hci/include", 62 "//bt/osi/test", 63 "//bt/stack/include", 64 ] 65 66 deps = [ 67 "//bt/hci", 68 "//bt/osi", 69 "//bt/btcore", 70 ] 71 72 configs += [ 73 "//bt:target_defaults", 74 "//bt:external_gtest_main", 75 ] 76 77 libs = [ 78 "pthread", 79 "rt", 80 "dl", 81 ] 82 } 83} 84