1/*
2 * Copyright (C) 2023 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: ["hardware_google_gfxstream_license"],
20}
21
22cc_library_headers {
23    name: "libgfxstream_guest_sync",
24    export_include_dirs: [
25        ".",
26    ],
27}
28
29cc_library_headers {
30    name: "libOpenglSystemCommonHeaders",
31    defaults: [
32        "libgfxstream_guest_cc_defaults",
33    ],
34    export_include_dirs: [
35        ".",
36    ],
37    header_libs: [
38        "libgfxstream_guest_rendercontrol_encoder_headers",
39    ],
40    export_header_lib_headers: [
41        "libgfxstream_guest_rendercontrol_encoder_headers",
42    ],
43}
44
45cc_defaults {
46    name: "libOpenglSystemCommonDefaults",
47    defaults: [
48        "libgfxstream_guest_cc_defaults",
49        "mesa_platform_virtgpu_defaults",
50    ],
51    header_libs: [
52        "libgfxstream_vulkan_headers",
53        "libgfxstream_guest_graphics_headers",
54        "mesa_gfxstream_guest_iostream",
55        "libhardware_headers",
56        "mesa_gfxstream_aemu_headers",
57        "libnativebase_headers",
58    ],
59    export_header_lib_headers: [
60        "libgfxstream_guest_graphics_headers",
61        "mesa_gfxstream_guest_iostream",
62        "libhardware_headers",
63        "libnativebase_headers",
64    ],
65    export_static_lib_headers: [
66        "mesa_gfxstream_guest_android",
67        "mesa_platform_virtgpu",
68    ],
69    shared_libs: [
70        "lib_renderControl_enc",
71        "libbase",
72        "libdrm",
73        "libcutils",
74        "libGLESv1_enc",
75        "libGLESv2_enc",
76        "liblog",
77    ],
78    export_shared_lib_headers: [
79        "lib_renderControl_enc",
80        "libGLESv1_enc",
81        "libGLESv2_enc",
82    ],
83    static_libs: [
84        "mesa_goldfish_address_space",
85        "libringbuffer",
86        "libqemupipe.ranchu",
87    ],
88    cflags: [
89        "-Wno-unused-variable",
90        "-Wno-unused-parameter",
91    ],
92    srcs: [
93        "FormatConversions.cpp",
94        "HostConnection.cpp",
95        "ProcessPipe.cpp",
96        "QemuPipeStream.cpp",
97        "ThreadInfo.cpp",
98        "VirtioGpuPipeStream.cpp",
99    ],
100    export_include_dirs: [
101        ".",
102    ],
103    target: {
104        android: {
105            header_libs: [
106                "gfxstream_opengl_headers",
107            ],
108            export_header_lib_headers: [
109                "gfxstream_opengl_headers",
110            ],
111        },
112    },
113}
114
115cc_library_shared {
116    name: "libOpenglSystemCommon",
117    defaults: [
118        "libOpenglSystemCommonDefaults",
119    ],
120    shared_libs: [
121        "libOpenglCodecCommon",
122    ],
123    static_libs: [
124        "libgfxstream_androidemu_static",
125        "mesa_gfxstream_guest_android",
126        "mesa_util",
127        "mesa_util_c11",
128    ],
129    target: {
130        android: {
131            shared_libs: [
132                "libnativewindow",
133                "libsync",
134            ],
135        },
136    },
137}
138
139cc_library_static {
140    name: "libgfxstream_guest_system_common",
141    defaults: [
142        "libOpenglSystemCommonDefaults",
143    ],
144    static_libs: [
145        "libgfxstream_androidemu_static",
146        "libgfxstream_androidemu_static",
147        "mesa_gfxstream_guest_android",
148        "libOpenglCodecCommon_static",
149    ],
150    target: {
151        android: {
152            shared_libs: [
153                "libnativewindow",
154                "libsync",
155            ],
156        },
157    },
158}
159