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 export_header_libs: [ 31 "libandroid_headers", 32 ], 33} 34 35cc_defaults { 36 name: "libandroid_defaults", 37 cpp_std: "gnu++20", 38 cflags: [ 39 "-Wall", 40 "-Werror", 41 "-Wextra", 42 "-Wunused", 43 "-Wunreachable-code", 44 ], 45} 46 47cc_library_shared { 48 name: "libandroid", 49 defaults: [ 50 "libandroid_defaults", 51 "android.hardware.power-ndk_shared", 52 ], 53 54 srcs: [ 55 "activity_manager.cpp", 56 "asset_manager.cpp", 57 "surface_control_input_receiver.cpp", 58 "choreographer.cpp", 59 "configuration.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 "trace.cpp", 77 "thermal.cpp", 78 ], 79 80 shared_libs: [ 81 "liblog", 82 "libhidlbase", 83 "libcutils", 84 "libandroidfw", 85 "libinput", 86 "libutils", 87 "libbinder", 88 "libbinder_ndk", 89 "libui", 90 "libgui", 91 "libharfbuzz_ng", // Only for including hb.h via minikin 92 "libsensor", 93 "libactivitymanager_aidl", 94 "libandroid_runtime", 95 "libminikin", 96 "libnetd_client", 97 "libhwui", 98 "libxml2", 99 "libEGL", 100 "libGLESv2", 101 "libpowermanager", 102 "android.hardware.configstore@1.0", 103 "android.hardware.configstore-utils", 104 "android.os.flags-aconfig-cc", 105 "libnativedisplay", 106 "libfmq", 107 ], 108 109 static_libs: [ 110 "libstorage", 111 "libarect", 112 ], 113 114 header_libs: [ 115 "libhwui_internal_headers", 116 "libandroid_headers_private", 117 ], 118 119 whole_static_libs: ["libnativewindow"], 120 121 export_static_lib_headers: ["libarect"], 122 123 include_dirs: ["bionic/libc/dns/include"], 124 125 local_include_dirs: ["include_platform"], 126 127 export_include_dirs: ["include_platform"], 128 129 version_script: "libandroid.map.txt", 130 stubs: { 131 symbol_file: "libandroid.map.txt", 132 versions: [ 133 "29", 134 "31", 135 ], 136 }, 137} 138 139// Network library. 140cc_library_shared { 141 name: "libandroid_net", 142 defaults: ["libandroid_defaults"], 143 llndk: { 144 symbol_file: "libandroid_net.map.txt", 145 unversioned: true, 146 override_export_include_dirs: ["include"], 147 }, 148 srcs: ["net.c"], 149 150 shared_libs: ["libnetd_client"], 151 152 include_dirs: ["bionic/libc/dns/include"], 153} 154 155// Aidl library for platform compat. 156cc_library_shared { 157 name: "lib-platform-compat-native-api", 158 cflags: [ 159 "-Wall", 160 "-Werror", 161 "-Wno-missing-field-initializers", 162 "-Wno-unused-variable", 163 "-Wunused-parameter", 164 ], 165 shared_libs: [ 166 "libbinder", 167 "libutils", 168 ], 169 aidl: { 170 local_include_dirs: ["aidl"], 171 export_aidl_headers: true, 172 }, 173 srcs: [ 174 ":platform-compat-native-aidl", 175 ], 176 export_include_dirs: ["aidl"], 177} 178 179filegroup { 180 name: "platform-compat-native-aidl", 181 srcs: [ 182 "aidl/com/android/internal/compat/IPlatformCompatNative.aidl", 183 ], 184 path: "aidl", 185} 186