1// Copyright (C) 2010 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["frameworks_native_libs_ui_license"], 17} 18 19// Added automatically by a large-scale-change 20// See: http://go/android-license-faq 21license { 22 name: "frameworks_native_libs_ui_license", 23 visibility: [":__subpackages__"], 24 license_kinds: [ 25 "SPDX-license-identifier-Apache-2.0", 26 ], 27 license_text: [ 28 "NOTICE", 29 ], 30} 31 32cc_defaults { 33 name: "libui-defaults", 34 clang: true, 35 cflags: [ 36 "-Wall", 37 "-Werror", 38 ], 39 cppflags: [ 40 "-Wextra", 41 ], 42 43 sanitize: { 44 integer_overflow: true, 45 misc_undefined: ["bounds"], 46 }, 47 48} 49 50cc_library_static { 51 name: "libui-types", 52 vendor_available: true, 53 host_supported: true, 54 target: { 55 windows: { 56 enabled: true, 57 } 58 }, 59 60 defaults: [ 61 "libui-defaults", 62 ], 63 64 apex_available: [ 65 "//apex_available:anyapex", 66 "//apex_available:platform", 67 ], 68 min_sdk_version: "apex_inherit", 69 70 shared_libs: [ 71 "libbase", 72 "libutils", 73 ], 74 75 static_libs: [ 76 "libarect", 77 "libmath", 78 ], 79 80 srcs: [ 81 "ColorSpace.cpp", 82 "Rect.cpp", 83 "Region.cpp", 84 "Transform.cpp", 85 ], 86 87 export_include_dirs: [ 88 "include", 89 "include_private", 90 "include_types", 91 ], 92 93 export_static_lib_headers: [ 94 "libarect", 95 "libmath", 96 ], 97 98} 99 100cc_library_shared { 101 name: "libui", 102 vendor_available: true, 103 vndk: { 104 enabled: true, 105 }, 106 double_loadable: true, 107 108 clang: true, 109 cflags: [ 110 "-Wall", 111 "-Werror", 112 ], 113 cppflags: [ 114 "-Wextra", 115 ], 116 117 sanitize: { 118 integer_overflow: true, 119 misc_undefined: ["bounds"], 120 }, 121 122 srcs: [ 123 "DebugUtils.cpp", 124 "DeviceProductInfo.cpp", 125 "DisplayMode.cpp", 126 "DynamicDisplayInfo.cpp", 127 "Fence.cpp", 128 "FenceTime.cpp", 129 "FrameStats.cpp", 130 "Gralloc.cpp", 131 "Gralloc2.cpp", 132 "Gralloc3.cpp", 133 "Gralloc4.cpp", 134 "GraphicBuffer.cpp", 135 "GraphicBufferAllocator.cpp", 136 "GraphicBufferMapper.cpp", 137 "HdrCapabilities.cpp", 138 "PixelFormat.cpp", 139 "PublicFormat.cpp", 140 "Size.cpp", 141 "StaticDisplayInfo.cpp", 142 ], 143 144 include_dirs: [ 145 "frameworks/native/include", 146 ], 147 export_include_dirs: [ 148 "include", 149 "include_private", 150 ], 151 152 defaults: [ 153 "libui-defaults", 154 // Uncomment the following line to enable VALIDATE_REGIONS traces 155 //defaults: ["libui-validate-regions-defaults"], 156 ], 157 158 shared_libs: [ 159 "android.hardware.graphics.allocator@2.0", 160 "android.hardware.graphics.allocator@3.0", 161 "android.hardware.graphics.allocator@4.0", 162 "android.hardware.graphics.common-V2-ndk_platform", 163 "android.hardware.graphics.common@1.2", 164 "android.hardware.graphics.mapper@2.0", 165 "android.hardware.graphics.mapper@2.1", 166 "android.hardware.graphics.mapper@3.0", 167 "android.hardware.graphics.mapper@4.0", 168 "libbase", 169 "libcutils", 170 "libgralloctypes", 171 "libhidlbase", 172 "libsync", 173 "libutils", 174 "liblog", 175 ], 176 177 export_shared_lib_headers: [ 178 "android.hardware.graphics.common@1.2", 179 "android.hardware.graphics.common-V2-ndk_platform", 180 "android.hardware.graphics.mapper@4.0", 181 "libgralloctypes", 182 ], 183 184 static_libs: [ 185 "libarect", 186 "libgrallocusage", 187 "libmath", 188 ], 189 190 whole_static_libs: [ 191 "libui-types", 192 ], 193 194 // bufferhub is not used when building libgui for vendors 195 target: { 196 vendor: { 197 cflags: ["-DLIBUI_IN_VNDK"], 198 exclude_srcs: [ 199 ], 200 exclude_header_libs: [ 201 ], 202 exclude_shared_libs: [ 203 ], 204 }, 205 }, 206 207 header_libs: [ 208 "libbase_headers", 209 "libnativebase_headers", 210 "libnativewindow_headers", 211 "libhardware_headers", 212 "libui_headers", 213 ], 214 215 export_static_lib_headers: [ 216 "libarect", 217 "libmath", 218 ], 219 220 export_header_lib_headers: [ 221 "libbase_headers", 222 "libnativebase_headers", 223 "libnativewindow_headers", 224 "libhardware_headers", 225 "libui_headers", 226 ], 227 min_sdk_version: "29", 228} 229 230cc_library_headers { 231 name: "libui_headers", 232 export_include_dirs: ["include"], 233 vendor_available: true, 234 target: { 235 vendor: { 236 cflags: ["-DLIBUI_IN_VNDK"], 237 override_export_include_dirs: ["include_vndk"], 238 }, 239 }, 240 header_libs: [ 241 "libnativewindow_headers", 242 "libmath_headers", 243 ], 244 export_header_lib_headers: [ 245 "libnativewindow_headers", 246 "libmath_headers", 247 ], 248 min_sdk_version: "29", 249} 250 251// defaults to enable VALIDATE_REGIONS traces 252cc_defaults { 253 name: "libui-validate-regions-defaults", 254 shared_libs: ["libutilscallstack"], 255 cflags: ["-DVALIDATE_REGIONS"], 256} 257 258subdirs = [ 259 "tests", 260 "tools", 261] 262 263filegroup { 264 name: "libui_host_common", 265 srcs: [ 266 "Rect.cpp", 267 "Region.cpp", 268 "PixelFormat.cpp", 269 "Transform.cpp" 270 ], 271} 272