Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 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. |
Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 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 | |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 25 | ndk_library { |
Dan Willemsen | 3dcf031 | 2017-04-07 15:48:45 -0700 | [diff] [blame] | 26 | name: "libandroid", |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 27 | symbol_file: "libandroid.map.txt", |
| 28 | first_version: "9", |
Dan Albert | 98e462d | 2017-01-05 16:01:14 -0800 | [diff] [blame] | 29 | unversioned_until: "current", |
Dan Albert | 2a8d9c2 | 2016-09-23 15:55:49 -0700 | [diff] [blame] | 30 | } |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 31 | |
| 32 | cc_defaults { |
| 33 | name: "libandroid_defaults", |
Bart Van Assche | b66923a | 2022-11-21 15:49:17 -0800 | [diff] [blame] | 34 | cpp_std: "gnu++20", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 35 | cflags: [ |
| 36 | "-Wall", |
| 37 | "-Werror", |
Siarhei Vishniakou | cf07528 | 2020-01-15 17:35:58 -0800 | [diff] [blame] | 38 | "-Wextra", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 39 | "-Wunused", |
| 40 | "-Wunreachable-code", |
Matt Buckley | 053a1df | 2024-06-07 02:37:59 +0000 | [diff] [blame] | 41 | "-Wthread-safety", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 42 | ], |
| 43 | } |
| 44 | |
| 45 | cc_library_shared { |
| 46 | name: "libandroid", |
Matt Buckley | 423c1b3 | 2023-06-28 19:13:42 +0000 | [diff] [blame] | 47 | defaults: [ |
| 48 | "libandroid_defaults", |
| 49 | "android.hardware.power-ndk_shared", |
| 50 | ], |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 51 | |
| 52 | srcs: [ |
Chong Zhang | 8af8792 | 2020-11-11 14:46:30 -0800 | [diff] [blame] | 53 | "activity_manager.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 54 | "asset_manager.cpp", |
Chavi Weingarten | d57801e | 2024-03-04 22:49:03 +0000 | [diff] [blame] | 55 | "surface_control_input_receiver.cpp", |
Alec Mouri | cf3ad87 | 2020-04-27 22:36:17 -0700 | [diff] [blame] | 56 | "choreographer.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 57 | "configuration.cpp", |
Sally Qi | 176e379 | 2024-11-04 11:45:23 -0800 | [diff] [blame] | 58 | "display_luts.cpp", |
Matt Gilbride | ae83ac2 | 2024-09-24 22:48:38 +0000 | [diff] [blame] | 59 | "dynamic_instrumentation_manager.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 60 | "hardware_buffer_jni.cpp", |
| 61 | "input.cpp", |
Chavi Weingarten | b94da30 | 2024-02-29 16:33:27 +0000 | [diff] [blame] | 62 | "input_transfer_token.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 63 | "looper.cpp", |
| 64 | "native_activity.cpp", |
| 65 | "native_window_jni.cpp", |
| 66 | "net.c", |
| 67 | "obb.cpp", |
Chong Zhang | 06dbe5b | 2020-11-02 16:02:07 -0800 | [diff] [blame] | 68 | "permission_manager.cpp", |
Bo Liu | 4426772 | 2021-07-16 17:03:20 -0400 | [diff] [blame] | 69 | "performance_hint.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 70 | "sensor.cpp", |
| 71 | "sharedmem.cpp", |
| 72 | "storage_manager.cpp", |
Marissa Wall | f6a73fa | 2018-12-10 10:41:08 -0800 | [diff] [blame] | 73 | "surface_control.cpp", |
Alec Mouri | cf3ad87 | 2020-04-27 22:36:17 -0700 | [diff] [blame] | 74 | "surface_texture.cpp", |
Seigo Nonaka | 50692ca | 2018-08-31 12:27:15 -0700 | [diff] [blame] | 75 | "system_fonts.cpp", |
Xiang Wang | 0ab9e0a | 2024-11-06 15:25:06 -0800 | [diff] [blame] | 76 | "system_health.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 77 | "trace.cpp", |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 78 | "thermal.cpp", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 79 | ], |
| 80 | |
| 81 | shared_libs: [ |
| 82 | "liblog", |
Marissa Wall | 1be5a10 | 2019-01-18 16:14:04 -0800 | [diff] [blame] | 83 | "libhidlbase", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 84 | "libcutils", |
| 85 | "libandroidfw", |
| 86 | "libinput", |
| 87 | "libutils", |
| 88 | "libbinder", |
Matt Buckley | 5897772 | 2024-03-11 23:32:09 +0000 | [diff] [blame] | 89 | "libbinder_ndk", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 90 | "libui", |
| 91 | "libgui", |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 92 | "libharfbuzz_ng", // Only for including hb.h via minikin |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 93 | "libsensor", |
Steven Moreland | 8e6aa66 | 2021-04-05 23:19:26 +0000 | [diff] [blame] | 94 | "libactivitymanager_aidl", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 95 | "libandroid_runtime", |
Seigo Nonaka | 75b841b | 2018-10-30 11:39:49 -0700 | [diff] [blame] | 96 | "libminikin", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 97 | "libnetd_client", |
Stan Iliev | 564ca3e | 2018-09-04 22:00:00 +0000 | [diff] [blame] | 98 | "libhwui", |
Seigo Nonaka | 50692ca | 2018-08-31 12:27:15 -0700 | [diff] [blame] | 99 | "libxml2", |
Stan Iliev | 5af5d30 | 2020-01-13 11:29:18 -0500 | [diff] [blame] | 100 | "libEGL", |
| 101 | "libGLESv2", |
Chris Ye | 48dbcaa | 2020-02-10 13:29:01 -0800 | [diff] [blame] | 102 | "libpowermanager", |
Marissa Wall | 1be5a10 | 2019-01-18 16:14:04 -0800 | [diff] [blame] | 103 | "android.hardware.configstore@1.0", |
| 104 | "android.hardware.configstore-utils", |
Matt Buckley | 709a2dc | 2024-02-28 17:09:04 +0000 | [diff] [blame] | 105 | "android.os.flags-aconfig-cc", |
Matt Gilbride | ae83ac2 | 2024-09-24 22:48:38 +0000 | [diff] [blame] | 106 | "dynamic_instrumentation_manager_aidl-cpp", |
Alec Mouri | cf3ad87 | 2020-04-27 22:36:17 -0700 | [diff] [blame] | 107 | "libnativedisplay", |
Matt Buckley | 5897772 | 2024-03-11 23:32:09 +0000 | [diff] [blame] | 108 | "libfmq", |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 109 | ], |
| 110 | |
| 111 | static_libs: [ |
| 112 | "libstorage", |
| 113 | "libarect", |
| 114 | ], |
| 115 | |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 116 | header_libs: [ |
| 117 | "libhwui_internal_headers", |
| 118 | "libandroid_headers_private", |
| 119 | ], |
Derek Sollenberger | ee538a3 | 2020-02-19 11:51:17 -0500 | [diff] [blame] | 120 | |
Alec Mouri | cf3ad87 | 2020-04-27 22:36:17 -0700 | [diff] [blame] | 121 | whole_static_libs: ["libnativewindow"], |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 122 | |
| 123 | export_static_lib_headers: ["libarect"], |
| 124 | |
| 125 | include_dirs: ["bionic/libc/dns/include"], |
dimitry | 499745f | 2018-11-08 15:07:32 +0100 | [diff] [blame] | 126 | |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 127 | local_include_dirs: ["include_platform"], |
Chong Zhang | 8af8792 | 2020-11-11 14:46:30 -0800 | [diff] [blame] | 128 | |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 129 | export_include_dirs: ["include_platform"], |
Chong Zhang | 8af8792 | 2020-11-11 14:46:30 -0800 | [diff] [blame] | 130 | |
dimitry | 499745f | 2018-11-08 15:07:32 +0100 | [diff] [blame] | 131 | version_script: "libandroid.map.txt", |
Dongwon Kang | b61819e | 2019-01-09 16:01:01 -0800 | [diff] [blame] | 132 | stubs: { |
| 133 | symbol_file: "libandroid.map.txt", |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 134 | versions: [ |
| 135 | "29", |
| 136 | "31", |
| 137 | ], |
Dongwon Kang | b61819e | 2019-01-09 16:01:01 -0800 | [diff] [blame] | 138 | }, |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | // Network library. |
| 142 | cc_library_shared { |
| 143 | name: "libandroid_net", |
| 144 | defaults: ["libandroid_defaults"], |
Colin Cross | 4ff7d4e | 2021-04-22 16:44:24 -0700 | [diff] [blame] | 145 | llndk: { |
| 146 | symbol_file: "libandroid_net.map.txt", |
| 147 | unversioned: true, |
| 148 | override_export_include_dirs: ["include"], |
| 149 | }, |
Colin Cross | 3f8fd40 | 2017-04-20 12:20:20 -0700 | [diff] [blame] | 150 | srcs: ["net.c"], |
| 151 | |
| 152 | shared_libs: ["libnetd_client"], |
| 153 | |
| 154 | include_dirs: ["bionic/libc/dns/include"], |
| 155 | } |
Lorenzo Colitti | d15f0af | 2017-05-17 16:50:17 +0900 | [diff] [blame] | 156 | |
atrost | 8748835 | 2019-10-10 19:27:31 +0100 | [diff] [blame] | 157 | // Aidl library for platform compat. |
| 158 | cc_library_shared { |
| 159 | name: "lib-platform-compat-native-api", |
| 160 | cflags: [ |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 161 | "-Wall", |
| 162 | "-Werror", |
| 163 | "-Wno-missing-field-initializers", |
| 164 | "-Wno-unused-variable", |
| 165 | "-Wunused-parameter", |
| 166 | ], |
atrost | 8748835 | 2019-10-10 19:27:31 +0100 | [diff] [blame] | 167 | shared_libs: [ |
| 168 | "libbinder", |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 169 | "libutils", |
atrost | 8748835 | 2019-10-10 19:27:31 +0100 | [diff] [blame] | 170 | ], |
| 171 | aidl: { |
| 172 | local_include_dirs: ["aidl"], |
| 173 | export_aidl_headers: true, |
| 174 | }, |
| 175 | srcs: [ |
Colin Cross | b16eb69 | 2021-04-22 17:22:26 -0700 | [diff] [blame] | 176 | ":platform-compat-native-aidl", |
atrost | 8748835 | 2019-10-10 19:27:31 +0100 | [diff] [blame] | 177 | ], |
| 178 | export_include_dirs: ["aidl"], |
| 179 | } |
| 180 | |
| 181 | filegroup { |
| 182 | name: "platform-compat-native-aidl", |
| 183 | srcs: [ |
| 184 | "aidl/com/android/internal/compat/IPlatformCompatNative.aidl", |
| 185 | ], |
| 186 | path: "aidl", |
Alec Mouri | 440c5ac | 2019-10-22 10:30:31 -0700 | [diff] [blame] | 187 | } |