| 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. |
| 16 |
package { |
| 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 |
|
| 25 |
ndk_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 |
|
| 35 |
cc_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 |
|
| 47 |
cc_library_shared { |
| 48 |
name: "libandroid", |
| 49 |
defaults: ["libandroid_defaults"], |
| 50 |
|
| 51 |
srcs: [ |
| 52 |
"activity_manager.cpp", |
| 53 |
"asset_manager.cpp", |
| 54 |
"choreographer.cpp", |
| 55 |
"configuration.cpp", |
| 56 |
"hardware_buffer_jni.cpp", |
| 57 |
"input.cpp", |
| 58 |
"looper.cpp", |
| 59 |
"native_activity.cpp", |
| 60 |
"native_window_jni.cpp", |
| 61 |
"net.c", |
| 62 |
"obb.cpp", |
| 63 |
"permission_manager.cpp", |
| 64 |
"performance_hint.cpp", |
| 65 |
"sensor.cpp", |
| 66 |
"sharedmem.cpp", |
| 67 |
"storage_manager.cpp", |
| 68 |
"surface_control.cpp", |
| 69 |
"surface_texture.cpp", |
| 70 |
"system_fonts.cpp", |
| 71 |
"trace.cpp", |
| 72 |
"thermal.cpp", |
| 73 |
], |
| 74 |
|
| 75 |
shared_libs: [ |
| 76 |
"liblog", |
| 77 |
"libhidlbase", |
| 78 |
"libcutils", |
| 79 |
"libandroidfw", |
| 80 |
"libinput", |
| 81 |
"libutils", |
| 82 |
"libbinder", |
| 83 |
"libui", |
| 84 |
"libgui", |
| 85 |
"libharfbuzz_ng", // Only for including hb.h via minikin |
| 86 |
"libsensor", |
| 87 |
"libactivitymanager_aidl", |
| 88 |
"libandroid_runtime", |
| 89 |
"libminikin", |
| 90 |
"libnetd_client", |
| 91 |
"libhwui", |
| 92 |
"libxml2", |
| 93 |
"libEGL", |
| 94 |
"libGLESv2", |
| 95 |
"libpowermanager", |
| 96 |
"[email protected]", |
| 97 |
"android.hardware.configstore-utils", |
| 98 |
"libnativedisplay", |
| 99 |
], |
| 100 |
|
| 101 |
static_libs: [ |
| 102 |
"libstorage", |
| 103 |
"libarect", |
| 104 |
], |
| 105 |
|
| 106 |
header_libs: [ |
| 107 |
"libhwui_internal_headers", |
| 108 |
"libandroid_headers_private", |
| 109 |
], |
| 110 |
|
| 111 |
whole_static_libs: ["libnativewindow"], |
| 112 |
|
| 113 |
export_static_lib_headers: ["libarect"], |
| 114 |
|
| 115 |
include_dirs: ["bionic/libc/dns/include"], |
| 116 |
|
| 117 |
local_include_dirs: ["include_platform"], |
| 118 |
|
| 119 |
export_include_dirs: ["include_platform"], |
| 120 |
|
| 121 |
version_script: "libandroid.map.txt", |
| 122 |
stubs: { |
| 123 |
symbol_file: "libandroid.map.txt", |
| 124 |
versions: [ |
| 125 |
"29", |
| 126 |
"31", |
| 127 |
], |
| 128 |
}, |
| 129 |
} |
| 130 |
|
| 131 |
// Network library. |
| 132 |
cc_library_shared { |
| 133 |
name: "libandroid_net", |
| 134 |
defaults: ["libandroid_defaults"], |
| 135 |
llndk: { |
| 136 |
symbol_file: "libandroid_net.map.txt", |
| 137 |
unversioned: true, |
| 138 |
override_export_include_dirs: ["include"], |
| 139 |
}, |
| 140 |
srcs: ["net.c"], |
| 141 |
|
| 142 |
shared_libs: ["libnetd_client"], |
| 143 |
|
| 144 |
include_dirs: ["bionic/libc/dns/include"], |
| 145 |
} |
| 146 |
|
| 147 |
// Aidl library for platform compat. |
| 148 |
cc_library_shared { |
| 149 |
name: "lib-platform-compat-native-api", |
| 150 |
cflags: [ |
| 151 |
"-Wall", |
| 152 |
"-Werror", |
| 153 |
"-Wno-missing-field-initializers", |
| 154 |
"-Wno-unused-variable", |
| 155 |
"-Wunused-parameter", |
| 156 |
], |
| 157 |
shared_libs: [ |
| 158 |
"libbinder", |
| 159 |
"libutils", |
| 160 |
], |
| 161 |
aidl: { |
| 162 |
local_include_dirs: ["aidl"], |
| 163 |
export_aidl_headers: true, |
| 164 |
}, |
| 165 |
srcs: [ |
| 166 |
":platform-compat-native-aidl", |
| 167 |
], |
| 168 |
export_include_dirs: ["aidl"], |
| 169 |
} |
| 170 |
|
| 171 |
filegroup { |
| 172 |
name: "platform-compat-native-aidl", |
| 173 |
srcs: [ |
| 174 |
"aidl/com/android/internal/compat/IPlatformCompatNative.aidl", |
| 175 |
], |
| 176 |
path: "aidl", |
| 177 |
} |