1//
2// Copyright (C) 2019 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
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_binary_host {
21    name: "assemble_cvd",
22    srcs: [
23        "alloc.cc",
24        "assemble_cvd.cc",
25        "bootconfig_args.cpp",
26        "boot_config.cc",
27        "boot_image_utils.cc",
28        "clean.cc",
29        "disk/factory_reset_protected.cc",
30        "disk/gem5_image_unpacker.cpp",
31        "disk/generate_persistent_bootconfig.cpp",
32        "disk/generate_persistent_vbmeta.cpp",
33        "disk/initialize_instance_composite_disk.cc",
34        "disk/kernel_ramdisk_repacker.cpp",
35        "disk_builder.cpp",
36        "disk_flags.cc",
37        "display.cpp",
38        "flags.cc",
39        "flag_feature.cpp",
40        "graphics_flags.cc",
41        "kernel_module_parser.cc",
42        "misc_info.cc",
43        "network_flags.cpp",
44        "super_image_mixer.cc",
45        "touchpad.cpp",
46        "vendor_dlkm_utils.cc",
47    ],
48    header_libs: [
49        "bootimg_headers",
50    ],
51    shared_libs: [
52        "libbase",
53        "libcuttlefish_allocd_utils",
54        "libcuttlefish_command_util",
55        "libcuttlefish_fs",
56        "libcuttlefish_utils",
57        "libext2_blkid",
58        "libfruit",
59        "libjsoncpp",
60        "libprotobuf-cpp-full",
61        "libz",
62        "libziparchive",
63    ],
64    static_libs: [
65        "libcdisk_spec",
66        "libcuttlefish_avb",
67        "libcuttlefish_host_config_adb",
68        "libcuttlefish_host_config_fastboot",
69        "libcuttlefish_host_config",
70        "libcuttlefish_launch_cvd_proto",
71        "libcuttlefish_vm_manager",
72        "libext2_uuid",
73        "libgflags",
74        "libgfxstream_graphics_detector_proto",
75        "libimage_aggregator",
76        "libsparse",
77    ],
78    required: [
79        "avbtool",
80        "bootloader_qemu_aarch64",
81        "bootloader_qemu_x86_64",
82        "bootloader_crosvm_aarch64",
83        "bootloader_crosvm_x86_64",
84        "cvd_avb_pubkey_rsa2048",
85        "cvd_avb_pubkey_rsa4096",
86        "cvd_avb_testkey_rsa2048",
87        "cvd_avb_testkey_rsa4096",
88        "cvd_config_phone.json",
89        "extract-ikconfig",
90        "mkenvimage_slim",
91        "lz4",
92        "simg2img",
93        "unpack_bootimg",
94    ],
95    target: {
96        darwin: {
97            enabled: true,
98        },
99        linux: {
100            shared_libs: [
101                "libnl",
102            ],
103            required: [
104                "mkuserimg_mke2fs",
105            ],
106        },
107    },
108    defaults: ["cuttlefish_host"],
109}
110