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: ["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        "android.hardware.configstore@1.0",
97        "android.hardware.configstore-utils",
98        "android.hardware.power-V4-ndk",
99        "libnativedisplay",
100    ],
101
102    static_libs: [
103        "libstorage",
104        "libarect",
105    ],
106
107    header_libs: [
108        "libhwui_internal_headers",
109        "libandroid_headers_private",
110    ],
111
112    whole_static_libs: ["libnativewindow"],
113
114    export_static_lib_headers: ["libarect"],
115
116    include_dirs: ["bionic/libc/dns/include"],
117
118    local_include_dirs: ["include_platform"],
119
120    export_include_dirs: ["include_platform"],
121
122    version_script: "libandroid.map.txt",
123    stubs: {
124        symbol_file: "libandroid.map.txt",
125        versions: [
126            "29",
127            "31",
128        ],
129    },
130}
131
132// Network library.
133cc_library_shared {
134    name: "libandroid_net",
135    defaults: ["libandroid_defaults"],
136    llndk: {
137        symbol_file: "libandroid_net.map.txt",
138        unversioned: true,
139        override_export_include_dirs: ["include"],
140    },
141    srcs: ["net.c"],
142
143    shared_libs: ["libnetd_client"],
144
145    include_dirs: ["bionic/libc/dns/include"],
146}
147
148// Aidl library for platform compat.
149cc_library_shared {
150    name: "lib-platform-compat-native-api",
151    cflags: [
152        "-Wall",
153        "-Werror",
154        "-Wno-missing-field-initializers",
155        "-Wno-unused-variable",
156        "-Wunused-parameter",
157    ],
158    shared_libs: [
159        "libbinder",
160        "libutils",
161    ],
162    aidl: {
163        local_include_dirs: ["aidl"],
164        export_aidl_headers: true,
165    },
166    srcs: [
167        ":platform-compat-native-aidl",
168    ],
169    export_include_dirs: ["aidl"],
170}
171
172filegroup {
173    name: "platform-compat-native-aidl",
174    srcs: [
175        "aidl/com/android/internal/compat/IPlatformCompatNative.aidl",
176    ],
177    path: "aidl",
178}
179