1// Copyright (C) 2016 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 15// The headers module is in frameworks/native/Android.bp. 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 "frameworks_base_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["frameworks_base_license"], 23} 24 25ndk_library { 26 name: "libandroid", 27 symbol_file: "libandroid.map.txt", 28 first_version: "9", 29 unversioned_until: "current", 30} 31 32cc_defaults { 33 name: "libandroid_defaults", 34 cpp_std: "gnu++20", 35 cflags: [ 36 "-Wall", 37 "-Werror", 38 "-Wextra", 39 "-Wunused", 40 "-Wunreachable-code", 41 "-Wthread-safety", 42 ], 43} 44 45cc_library_shared { 46 name: "libandroid", 47 defaults: [ 48 "libandroid_defaults", 49 "android.hardware.power-ndk_shared", 50 ], 51 52 srcs: [ 53 "activity_manager.cpp", 54 "asset_manager.cpp", 55 "surface_control_input_receiver.cpp", 56 "choreographer.cpp", 57 "configuration.cpp", 58 "display_luts.cpp", 59 "dynamic_instrumentation_manager.cpp", 60 "hardware_buffer_jni.cpp", 61 "input.cpp", 62 "input_transfer_token.cpp", 63 "looper.cpp", 64 "native_activity.cpp", 65 "native_window_jni.cpp", 66 "net.c", 67 "obb.cpp", 68 "permission_manager.cpp", 69 "performance_hint.cpp", 70 "sensor.cpp", 71 "sharedmem.cpp", 72 "storage_manager.cpp", 73 "surface_control.cpp", 74 "surface_texture.cpp", 75 "system_fonts.cpp", 76 "system_health.cpp", 77 "trace.cpp", 78 "thermal.cpp", 79 ], 80 81 shared_libs: [ 82 "liblog", 83 "libhidlbase", 84 "libcutils", 85 "libandroidfw", 86 "libinput", 87 "libutils", 88 "libbinder", 89 "libbinder_ndk", 90 "libui", 91 "libgui", 92 "libharfbuzz_ng", // Only for including hb.h via minikin 93 "libsensor", 94 "libactivitymanager_aidl", 95 "libandroid_runtime", 96 "libminikin", 97 "libnetd_client", 98 "libhwui", 99 "libxml2", 100 "libEGL", 101 "libGLESv2", 102 "libpowermanager", 103 "[email protected]", 104 "android.hardware.configstore-utils", 105 "android.os.flags-aconfig-cc", 106 "dynamic_instrumentation_manager_aidl-cpp", 107 "libnativedisplay", 108 "libfmq", 109 ], 110 111 static_libs: [ 112 "libstorage", 113 "libarect", 114 ], 115 116 header_libs: [ 117 "libhwui_internal_headers", 118 "libandroid_headers_private", 119 ], 120 121 whole_static_libs: ["libnativewindow"], 122 123 export_static_lib_headers: ["libarect"], 124 125 include_dirs: ["bionic/libc/dns/include"], 126 127 local_include_dirs: ["include_platform"], 128 129 export_include_dirs: ["include_platform"], 130 131 version_script: "libandroid.map.txt", 132 stubs: { 133 symbol_file: "libandroid.map.txt", 134 versions: [ 135 "29", 136 "31", 137 ], 138 }, 139} 140 141// Network library. 142cc_library_shared { 143 name: "libandroid_net", 144 defaults: ["libandroid_defaults"], 145 llndk: { 146 symbol_file: "libandroid_net.map.txt", 147 unversioned: true, 148 override_export_include_dirs: ["include"], 149 }, 150 srcs: ["net.c"], 151 152 shared_libs: ["libnetd_client"], 153 154 include_dirs: ["bionic/libc/dns/include"], 155} 156 157// Aidl library for platform compat. 158cc_library_shared { 159 name: "lib-platform-compat-native-api", 160 cflags: [ 161 "-Wall", 162 "-Werror", 163 "-Wno-missing-field-initializers", 164 "-Wno-unused-variable", 165 "-Wunused-parameter", 166 ], 167 shared_libs: [ 168 "libbinder", 169 "libutils", 170 ], 171 aidl: { 172 local_include_dirs: ["aidl"], 173 export_aidl_headers: true, 174 }, 175 srcs: [ 176 ":platform-compat-native-aidl", 177 ], 178 export_include_dirs: ["aidl"], 179} 180 181filegroup { 182 name: "platform-compat-native-aidl", 183 srcs: [ 184 "aidl/com/android/internal/compat/IPlatformCompatNative.aidl", 185 ], 186 path: "aidl", 187} 188