1// 2// Copyright 2017 The Android Open Source Project 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 16package { 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "system_bt_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["system_bt_license"], 23} 24 25cc_binary { 26 name: "android.hardware.bluetooth@1.1-service.btlinux", 27 defaults: ["fluoride_common_options"], 28 proprietary: true, 29 relative_install_path: "hw", 30 srcs: [ 31 "bluetooth_hci.cc", 32 "h4_protocol.cc", 33 "hci_packetizer.cc", 34 "service.cc", 35 ], 36 header_libs: ["libbluetooth_headers"], 37 shared_libs: [ 38 "android.hardware.bluetooth@1.0", 39 "android.hardware.bluetooth@1.1", 40 "libbase", 41 "libcutils", 42 "libhidlbase", 43 "liblog", 44 "libutils", 45 ], 46 static_libs: [ 47 "async_fd_watcher", 48 ], 49 conlyflags: [ 50 "-std=c99", 51 ], 52 init_rc: ["android.hardware.bluetooth@1.1-service.btlinux.rc"], 53} 54 55cc_library_static { 56 name: "async_fd_watcher", 57 defaults: ["fluoride_common_options"], 58 proprietary: true, 59 srcs: [ 60 "async_fd_watcher.cc", 61 ], 62 shared_libs: [ 63 "liblog", 64 ], 65 export_include_dirs: [ 66 ".", 67 ], 68} 69 70cc_test_host { 71 name: "bluetooth-btlinux-hci-test", 72 srcs: [ 73 "async_fd_watcher.cc", 74 "h4_protocol.cc", 75 "h4_protocol_unittest.cc", 76 "hci_packetizer.cc", 77 ], 78 cflags: [ 79 "-DNO_THREAD_PRIORITY", 80 "-Wall", 81 "-Werror", 82 ], 83 shared_libs: [ 84 "libbase", 85 "libhidlbase", 86 "liblog", 87 "libutils", 88 ], 89 static_libs: [ 90 "libgmock", 91 ], 92 sanitize: { 93 address: true, 94 cfi: true, 95 }, 96 test_suites: ["general-tests"], 97} 98