1// Copyright (C) 2023 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_library_static {
21    name: "libberberis_program_runner",
22    defaults: ["berberis_defaults"],
23    host_supported: true,
24    srcs: ["program_runner.cc"],
25    export_include_dirs: ["include"],
26    header_libs: [
27        "libberberis_base_headers",
28        "libberberis_guest_loader_headers",
29        "libberberis_guest_state_headers",
30        "libberberis_runtime_headers",
31    ],
32}
33
34cc_defaults {
35    name: "berberis_program_runner_defaults",
36    defaults: ["berberis_defaults_64"],
37    host_supported: true,
38    static_libs: [
39        "libberberis_base",
40        "libberberis_program_runner",
41    ],
42    shared_libs: [
43        "libbase",
44        "libberberis_riscv64",
45        "liblog",
46    ],
47}
48
49cc_binary {
50    name: "berberis_program_runner_binfmt_misc_riscv64",
51    defaults: ["berberis_program_runner_defaults"],
52    srcs: ["main_binfmt_misc.cc"],
53}
54
55cc_binary {
56    name: "berberis_program_runner_riscv64",
57    defaults: ["berberis_program_runner_defaults"],
58    srcs: ["main.cc"],
59}
60