1/* 2 * Copyright (C) 2018 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 */ 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_library_static { 22 name: "libpixelusb", 23 vendor: true, 24 export_include_dirs: [ 25 "hidl/include", 26 "include", 27 ], 28 29 srcs: [ 30 "hidl/UsbGadgetUtils.cpp", 31 "UsbOverheatEvent.cpp", 32 "CommonUtils.cpp", 33 "MonitorFfs.cpp", 34 "I2cHelper.cpp", 35 ], 36 37 cflags: [ 38 "-Wall", 39 "-Werror", 40 ], 41 42 shared_libs: [ 43 "libbase", 44 "libbinder", 45 "libcutils", 46 "libhidlbase", 47 "libutils", 48 "libbinder_ndk", 49 "pixelatoms-cpp", 50 "android.hardware.usb.gadget@1.0", 51 "android.hardware.thermal@1.0", 52 "android.hardware.thermal@2.0", 53 "android.hardware.thermal-V1-ndk", 54 ], 55 56 export_shared_lib_headers: [ 57 "pixelatoms-cpp", 58 ], 59 60 static_libs: [ 61 "libthermalutils", 62 ], 63} 64 65cc_library_static { 66 name: "libpixelusb-aidl", 67 vendor: true, 68 export_include_dirs: [ 69 "aidl/include", 70 "include", 71 ], 72 73 srcs: [ 74 "aidl/UsbGadgetAidlUtils.cpp", 75 "UsbOverheatEvent.cpp", 76 "CommonUtils.cpp", 77 "MonitorFfs.cpp", 78 "I2cHelper.cpp", 79 "UsbBusHelper.cpp", 80 ], 81 82 cflags: [ 83 "-Wall", 84 "-Werror", 85 ], 86 87 shared_libs: [ 88 "libbase", 89 "libbinder", 90 "libcutils", 91 "libutils", 92 "pixelatoms-cpp", 93 "android.hardware.usb.gadget-V1-ndk", 94 "android.hardware.thermal@1.0", 95 "android.hardware.thermal@2.0", 96 "android.hardware.thermal-V1-ndk", 97 ], 98 99 export_shared_lib_headers: [ 100 "pixelatoms-cpp", 101 ], 102 103 static_libs: [ 104 "libthermalutils", 105 ], 106} 107 108cc_library_static { 109 name: "libpixelusb-usbdp", 110 vendor: true, 111 112 srcs: [ 113 "UsbDpUtils.cpp", 114 ], 115 116 cflags: [ 117 "-Wall", 118 "-Werror", 119 ], 120 121 shared_libs: [ 122 "libbase", 123 "libcutils", 124 "libutils", 125 "android.hardware.usb-V3-ndk", 126 ], 127} 128 129cc_library_static { 130 name: "libpixelusb-datasession", 131 vendor: true, 132 133 srcs: [ 134 "UsbDataSessionMonitor.cpp", 135 ], 136 137 cflags: [ 138 "-Wall", 139 "-Werror", 140 ], 141 142 shared_libs: [ 143 "libbase", 144 "libcutils", 145 "libutils", 146 "android.hardware.usb-V3-ndk", 147 "android.frameworks.stats-V2-ndk", 148 "server_configurable_flags", 149 ], 150 static_libs: [ 151 "libpixelstats", 152 "android.hardware.usb.flags-aconfig-cc-lib", 153 ], 154} 155 156cc_fuzz { 157 name: "libpixelusb_gadgetutils_fuzzer", 158 vendor: true, 159 160 srcs: [ 161 "UsbGadgetUtils_fuzz.cpp", 162 ], 163 164 shared_libs: [ 165 "android.hardware.usb.gadget@1.0", 166 "libbase", 167 ], 168 169 static_libs: [ 170 "libpixelusb", 171 ], 172 173 fuzz_config: { 174 cc: [ 175 "pixel-usb-triage@google.com", 176 "kyletso@google.com", 177 ], 178 componentid: 175220, 179 }, 180} 181 182cc_aconfig_library { 183 name: "android.hardware.usb.flags-aconfig-cc-lib", 184 vendor: true, 185 aconfig_declarations: "android.hardware.usb.flags-aconfig", 186} 187