blob: da29c49f9d7b575d1d06a2d2619874281a3b371b [file] [log] [blame]
Dan Albert2a8d9c22016-09-23 15:55:49 -07001// 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.
Bob Badour8a6a2bc2021-02-12 17:07:05 -080016package {
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
Dan Albert2a8d9c22016-09-23 15:55:49 -070025ndk_library {
Dan Willemsen3dcf0312017-04-07 15:48:45 -070026 name: "libandroid",
Dan Albert2a8d9c22016-09-23 15:55:49 -070027 symbol_file: "libandroid.map.txt",
28 first_version: "9",
Dan Albert98e462d2017-01-05 16:01:14 -080029 unversioned_until: "current",
Dan Albert2a8d9c22016-09-23 15:55:49 -070030}
Colin Cross3f8fd402017-04-20 12:20:20 -070031
32cc_defaults {
33 name: "libandroid_defaults",
Bart Van Asscheb66923a2022-11-21 15:49:17 -080034 cpp_std: "gnu++20",
Colin Cross3f8fd402017-04-20 12:20:20 -070035 cflags: [
36 "-Wall",
37 "-Werror",
Siarhei Vishniakoucf075282020-01-15 17:35:58 -080038 "-Wextra",
Colin Cross3f8fd402017-04-20 12:20:20 -070039 "-Wunused",
40 "-Wunreachable-code",
Matt Buckley053a1df2024-06-07 02:37:59 +000041 "-Wthread-safety",
Colin Cross3f8fd402017-04-20 12:20:20 -070042 ],
43}
44
45cc_library_shared {
46 name: "libandroid",
Matt Buckley423c1b32023-06-28 19:13:42 +000047 defaults: [
48 "libandroid_defaults",
49 "android.hardware.power-ndk_shared",
50 ],
Colin Cross3f8fd402017-04-20 12:20:20 -070051
52 srcs: [
Chong Zhang8af87922020-11-11 14:46:30 -080053 "activity_manager.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070054 "asset_manager.cpp",
Chavi Weingartend57801e2024-03-04 22:49:03 +000055 "surface_control_input_receiver.cpp",
Alec Mouricf3ad872020-04-27 22:36:17 -070056 "choreographer.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070057 "configuration.cpp",
Matt Gilbrideae83ac22024-09-24 22:48:38 +000058 "dynamic_instrumentation_manager.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070059 "hardware_buffer_jni.cpp",
60 "input.cpp",
Chavi Weingartenb94da302024-02-29 16:33:27 +000061 "input_transfer_token.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070062 "looper.cpp",
63 "native_activity.cpp",
64 "native_window_jni.cpp",
65 "net.c",
66 "obb.cpp",
Chong Zhang06dbe5b2020-11-02 16:02:07 -080067 "permission_manager.cpp",
Bo Liu44267722021-07-16 17:03:20 -040068 "performance_hint.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070069 "sensor.cpp",
70 "sharedmem.cpp",
71 "storage_manager.cpp",
Marissa Wallf6a73fa2018-12-10 10:41:08 -080072 "surface_control.cpp",
Alec Mouricf3ad872020-04-27 22:36:17 -070073 "surface_texture.cpp",
Seigo Nonaka50692ca2018-08-31 12:27:15 -070074 "system_fonts.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070075 "trace.cpp",
Colin Crossb16eb692021-04-22 17:22:26 -070076 "thermal.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070077 ],
78
79 shared_libs: [
80 "liblog",
Marissa Wall1be5a102019-01-18 16:14:04 -080081 "libhidlbase",
Colin Cross3f8fd402017-04-20 12:20:20 -070082 "libcutils",
83 "libandroidfw",
84 "libinput",
85 "libutils",
86 "libbinder",
Matt Buckley58977722024-03-11 23:32:09 +000087 "libbinder_ndk",
Colin Cross3f8fd402017-04-20 12:20:20 -070088 "libui",
89 "libgui",
Colin Crossb16eb692021-04-22 17:22:26 -070090 "libharfbuzz_ng", // Only for including hb.h via minikin
Colin Cross3f8fd402017-04-20 12:20:20 -070091 "libsensor",
Steven Moreland8e6aa662021-04-05 23:19:26 +000092 "libactivitymanager_aidl",
Colin Cross3f8fd402017-04-20 12:20:20 -070093 "libandroid_runtime",
Seigo Nonaka75b841b2018-10-30 11:39:49 -070094 "libminikin",
Colin Cross3f8fd402017-04-20 12:20:20 -070095 "libnetd_client",
Stan Iliev564ca3e2018-09-04 22:00:00 +000096 "libhwui",
Seigo Nonaka50692ca2018-08-31 12:27:15 -070097 "libxml2",
Stan Iliev5af5d302020-01-13 11:29:18 -050098 "libEGL",
99 "libGLESv2",
Chris Ye48dbcaa2020-02-10 13:29:01 -0800100 "libpowermanager",
Marissa Wall1be5a102019-01-18 16:14:04 -0800101 "android.hardware.configstore@1.0",
102 "android.hardware.configstore-utils",
Matt Buckley709a2dc2024-02-28 17:09:04 +0000103 "android.os.flags-aconfig-cc",
Matt Gilbrideae83ac22024-09-24 22:48:38 +0000104 "dynamic_instrumentation_manager_aidl-cpp",
Alec Mouricf3ad872020-04-27 22:36:17 -0700105 "libnativedisplay",
Matt Buckley58977722024-03-11 23:32:09 +0000106 "libfmq",
Colin Cross3f8fd402017-04-20 12:20:20 -0700107 ],
108
109 static_libs: [
110 "libstorage",
111 "libarect",
112 ],
113
Colin Crossb16eb692021-04-22 17:22:26 -0700114 header_libs: [
115 "libhwui_internal_headers",
116 "libandroid_headers_private",
117 ],
Derek Sollenbergeree538a32020-02-19 11:51:17 -0500118
Alec Mouricf3ad872020-04-27 22:36:17 -0700119 whole_static_libs: ["libnativewindow"],
Colin Cross3f8fd402017-04-20 12:20:20 -0700120
121 export_static_lib_headers: ["libarect"],
122
123 include_dirs: ["bionic/libc/dns/include"],
dimitry499745f2018-11-08 15:07:32 +0100124
Colin Crossb16eb692021-04-22 17:22:26 -0700125 local_include_dirs: ["include_platform"],
Chong Zhang8af87922020-11-11 14:46:30 -0800126
Colin Crossb16eb692021-04-22 17:22:26 -0700127 export_include_dirs: ["include_platform"],
Chong Zhang8af87922020-11-11 14:46:30 -0800128
dimitry499745f2018-11-08 15:07:32 +0100129 version_script: "libandroid.map.txt",
Dongwon Kangb61819e2019-01-09 16:01:01 -0800130 stubs: {
131 symbol_file: "libandroid.map.txt",
Colin Crossb16eb692021-04-22 17:22:26 -0700132 versions: [
133 "29",
134 "31",
135 ],
Dongwon Kangb61819e2019-01-09 16:01:01 -0800136 },
Colin Cross3f8fd402017-04-20 12:20:20 -0700137}
138
139// Network library.
140cc_library_shared {
141 name: "libandroid_net",
142 defaults: ["libandroid_defaults"],
Colin Cross4ff7d4e2021-04-22 16:44:24 -0700143 llndk: {
144 symbol_file: "libandroid_net.map.txt",
145 unversioned: true,
146 override_export_include_dirs: ["include"],
147 },
Colin Cross3f8fd402017-04-20 12:20:20 -0700148 srcs: ["net.c"],
149
150 shared_libs: ["libnetd_client"],
151
152 include_dirs: ["bionic/libc/dns/include"],
153}
Lorenzo Colittid15f0af2017-05-17 16:50:17 +0900154
atrost87488352019-10-10 19:27:31 +0100155// Aidl library for platform compat.
156cc_library_shared {
157 name: "lib-platform-compat-native-api",
158 cflags: [
Colin Crossb16eb692021-04-22 17:22:26 -0700159 "-Wall",
160 "-Werror",
161 "-Wno-missing-field-initializers",
162 "-Wno-unused-variable",
163 "-Wunused-parameter",
164 ],
atrost87488352019-10-10 19:27:31 +0100165 shared_libs: [
166 "libbinder",
Colin Crossb16eb692021-04-22 17:22:26 -0700167 "libutils",
atrost87488352019-10-10 19:27:31 +0100168 ],
169 aidl: {
170 local_include_dirs: ["aidl"],
171 export_aidl_headers: true,
172 },
173 srcs: [
Colin Crossb16eb692021-04-22 17:22:26 -0700174 ":platform-compat-native-aidl",
atrost87488352019-10-10 19:27:31 +0100175 ],
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",
Alec Mouri440c5ac2019-10-22 10:30:31 -0700185}