blob: 752ebdf3d0e3a66972a080034686e5216fb49eee [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",
Spandan Das76d971d2022-09-08 21:20:07 +000030 export_header_libs: [
31 "libandroid_headers",
32 ],
Dan Albert2a8d9c22016-09-23 15:55:49 -070033}
Colin Cross3f8fd402017-04-20 12:20:20 -070034
35cc_defaults {
36 name: "libandroid_defaults",
Bart Van Asscheb66923a2022-11-21 15:49:17 -080037 cpp_std: "gnu++20",
Colin Cross3f8fd402017-04-20 12:20:20 -070038 cflags: [
39 "-Wall",
40 "-Werror",
Siarhei Vishniakoucf075282020-01-15 17:35:58 -080041 "-Wextra",
Colin Cross3f8fd402017-04-20 12:20:20 -070042 "-Wunused",
43 "-Wunreachable-code",
44 ],
45}
46
47cc_library_shared {
48 name: "libandroid",
Matt Buckley423c1b32023-06-28 19:13:42 +000049 defaults: [
50 "libandroid_defaults",
51 "android.hardware.power-ndk_shared",
52 ],
Colin Cross3f8fd402017-04-20 12:20:20 -070053
54 srcs: [
Chong Zhang8af87922020-11-11 14:46:30 -080055 "activity_manager.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070056 "asset_manager.cpp",
Alec Mouricf3ad872020-04-27 22:36:17 -070057 "choreographer.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070058 "configuration.cpp",
59 "hardware_buffer_jni.cpp",
60 "input.cpp",
61 "looper.cpp",
62 "native_activity.cpp",
63 "native_window_jni.cpp",
64 "net.c",
65 "obb.cpp",
Chong Zhang06dbe5b2020-11-02 16:02:07 -080066 "permission_manager.cpp",
Bo Liu44267722021-07-16 17:03:20 -040067 "performance_hint.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070068 "sensor.cpp",
69 "sharedmem.cpp",
70 "storage_manager.cpp",
Marissa Wallf6a73fa2018-12-10 10:41:08 -080071 "surface_control.cpp",
Alec Mouricf3ad872020-04-27 22:36:17 -070072 "surface_texture.cpp",
Seigo Nonaka50692ca2018-08-31 12:27:15 -070073 "system_fonts.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070074 "trace.cpp",
Colin Crossb16eb692021-04-22 17:22:26 -070075 "thermal.cpp",
Colin Cross3f8fd402017-04-20 12:20:20 -070076 ],
77
78 shared_libs: [
79 "liblog",
Marissa Wall1be5a102019-01-18 16:14:04 -080080 "libhidlbase",
Colin Cross3f8fd402017-04-20 12:20:20 -070081 "libcutils",
82 "libandroidfw",
83 "libinput",
84 "libutils",
85 "libbinder",
86 "libui",
87 "libgui",
Colin Crossb16eb692021-04-22 17:22:26 -070088 "libharfbuzz_ng", // Only for including hb.h via minikin
Colin Cross3f8fd402017-04-20 12:20:20 -070089 "libsensor",
Steven Moreland8e6aa662021-04-05 23:19:26 +000090 "libactivitymanager_aidl",
Colin Cross3f8fd402017-04-20 12:20:20 -070091 "libandroid_runtime",
Seigo Nonaka75b841b2018-10-30 11:39:49 -070092 "libminikin",
Colin Cross3f8fd402017-04-20 12:20:20 -070093 "libnetd_client",
Stan Iliev564ca3e2018-09-04 22:00:00 +000094 "libhwui",
Seigo Nonaka50692ca2018-08-31 12:27:15 -070095 "libxml2",
Stan Iliev5af5d302020-01-13 11:29:18 -050096 "libEGL",
97 "libGLESv2",
Chris Ye48dbcaa2020-02-10 13:29:01 -080098 "libpowermanager",
Marissa Wall1be5a102019-01-18 16:14:04 -080099 "android.hardware.configstore@1.0",
100 "android.hardware.configstore-utils",
Matt Buckley709a2dc2024-02-28 17:09:04 +0000101 "android.os.flags-aconfig-cc",
Alec Mouricf3ad872020-04-27 22:36:17 -0700102 "libnativedisplay",
Colin Cross3f8fd402017-04-20 12:20:20 -0700103 ],
104
105 static_libs: [
106 "libstorage",
107 "libarect",
108 ],
109
Colin Crossb16eb692021-04-22 17:22:26 -0700110 header_libs: [
111 "libhwui_internal_headers",
112 "libandroid_headers_private",
113 ],
Derek Sollenbergeree538a32020-02-19 11:51:17 -0500114
Alec Mouricf3ad872020-04-27 22:36:17 -0700115 whole_static_libs: ["libnativewindow"],
Colin Cross3f8fd402017-04-20 12:20:20 -0700116
117 export_static_lib_headers: ["libarect"],
118
119 include_dirs: ["bionic/libc/dns/include"],
dimitry499745f2018-11-08 15:07:32 +0100120
Colin Crossb16eb692021-04-22 17:22:26 -0700121 local_include_dirs: ["include_platform"],
Chong Zhang8af87922020-11-11 14:46:30 -0800122
Colin Crossb16eb692021-04-22 17:22:26 -0700123 export_include_dirs: ["include_platform"],
Chong Zhang8af87922020-11-11 14:46:30 -0800124
dimitry499745f2018-11-08 15:07:32 +0100125 version_script: "libandroid.map.txt",
Dongwon Kangb61819e2019-01-09 16:01:01 -0800126 stubs: {
127 symbol_file: "libandroid.map.txt",
Colin Crossb16eb692021-04-22 17:22:26 -0700128 versions: [
129 "29",
130 "31",
131 ],
Dongwon Kangb61819e2019-01-09 16:01:01 -0800132 },
Colin Cross3f8fd402017-04-20 12:20:20 -0700133}
134
135// Network library.
136cc_library_shared {
137 name: "libandroid_net",
138 defaults: ["libandroid_defaults"],
Colin Cross4ff7d4e2021-04-22 16:44:24 -0700139 llndk: {
140 symbol_file: "libandroid_net.map.txt",
141 unversioned: true,
142 override_export_include_dirs: ["include"],
143 },
Colin Cross3f8fd402017-04-20 12:20:20 -0700144 srcs: ["net.c"],
145
146 shared_libs: ["libnetd_client"],
147
148 include_dirs: ["bionic/libc/dns/include"],
149}
Lorenzo Colittid15f0af2017-05-17 16:50:17 +0900150
atrost87488352019-10-10 19:27:31 +0100151// Aidl library for platform compat.
152cc_library_shared {
153 name: "lib-platform-compat-native-api",
154 cflags: [
Colin Crossb16eb692021-04-22 17:22:26 -0700155 "-Wall",
156 "-Werror",
157 "-Wno-missing-field-initializers",
158 "-Wno-unused-variable",
159 "-Wunused-parameter",
160 ],
atrost87488352019-10-10 19:27:31 +0100161 shared_libs: [
162 "libbinder",
Colin Crossb16eb692021-04-22 17:22:26 -0700163 "libutils",
atrost87488352019-10-10 19:27:31 +0100164 ],
165 aidl: {
166 local_include_dirs: ["aidl"],
167 export_aidl_headers: true,
168 },
169 srcs: [
Colin Crossb16eb692021-04-22 17:22:26 -0700170 ":platform-compat-native-aidl",
atrost87488352019-10-10 19:27:31 +0100171 ],
172 export_include_dirs: ["aidl"],
173}
174
175filegroup {
176 name: "platform-compat-native-aidl",
177 srcs: [
178 "aidl/com/android/internal/compat/IPlatformCompatNative.aidl",
179 ],
180 path: "aidl",
Alec Mouri440c5ac2019-10-22 10:30:31 -0700181}