xref: /aosp_15_r20/external/mesa3d/src/gfxstream/guest/android/Android.bp (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    // See: http://go/android-license-faq
19    default_applicable_licenses: ["external_mesa3d_license"],
20}
21
22cc_library_headers {
23    name: "mesa_gfxstream_guest_android_headers",
24    vendor: true,
25    export_include_dirs: [
26        "include",
27    ],
28}
29
30cc_defaults {
31    name: "mesa_gfxstream_guest_android_defaults",
32    defaults: [
33        "mesa_gfxstream_guest_cc_defaults",
34    ],
35    export_include_dirs: [
36        "include",
37    ],
38    local_include_dirs: [
39        ".",
40        "include",
41    ],
42}
43
44cc_library_static {
45    name: "mesa_gfxstream_guest_android",
46    defaults: [
47        "mesa_gfxstream_guest_android_defaults",
48        "mesa_platform_virtgpu_defaults",
49    ],
50    header_libs: [
51        "mesa_common_headers",
52    ],
53    shared_libs: [
54        "libutils",
55    ],
56    static_libs: [
57        "mesa_util",
58    ],
59    target: {
60        android: {
61            header_libs: [
62                "libnativebase_headers",
63                "libgralloc_cb.ranchu",
64                "minigbm_headers",
65            ],
66            shared_libs: [
67                "libnativewindow",
68            ],
69            srcs: [
70                "ANativeWindowAndroid.cpp",
71                "GfxStreamGralloc.cpp",
72                "GrallocGoldfish.cpp",
73                "GrallocMinigbm.cpp",
74            ],
75        },
76        host: {
77            srcs: [
78                "ANativeWindowEmulated.cpp",
79                "GrallocEmulated.cpp",
80            ],
81        },
82    },
83}
84