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    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21cc_library_headers {
22    name: "libberberis_native_activity_headers",
23    defaults: ["berberis_defaults"],
24    host_supported: true,
25    export_include_dirs: ["include"],
26}
27
28// filegroups ensure valid file paths for modules depending on
29// libberberis_native_activity_defaults.
30filegroup {
31    name: "_libberberis_native_activity_srcs",
32    srcs: ["native_activity_wrapper.cc"],
33}
34
35// Shared source files for compiling guest-specific static libs.
36// See libberberis_native_activity_riscv64 below.
37cc_defaults {
38    name: "libberberis_native_activity_defaults",
39    host_supported: true,
40    header_libs: [
41        "jni_headers",
42        "libberberis_base_headers",
43        "libberberis_guest_abi_headers",
44        "libberberis_guest_state_headers",
45        "libberberis_runtime_primitives_headers",
46        "libberberis_native_activity_headers",
47    ],
48    export_header_lib_headers: [
49        "libberberis_guest_state_headers",
50        "libberberis_native_activity_headers",
51        "libberberis_runtime_primitives_headers",
52    ],
53    target: {
54        android: {
55            srcs: [":_libberberis_native_activity_srcs"],
56            header_libs: ["libberberis_jni_headers"],
57            shared_libs: ["libandroid"],
58        },
59    },
60}
61
62cc_library_static {
63    name: "libberberis_native_activity_riscv64",
64    defaults: [
65        "berberis_defaults_64",
66        "libberberis_native_activity_defaults",
67    ],
68    header_libs: [
69        "libberberis_guest_abi_riscv64_headers",
70    ],
71}
72