load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")
load("//cuttlefish/bazel:rules.bzl", "COPTS", "cf_cc_binary", "cf_cc_library", "cf_cc_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cf_cc_library(
    name = "alloc",
    srcs = ["alloc.cc"],
    hdrs = ["alloc.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/host/commands/cvdalloc:interface",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/result",
        "@abseil-cpp//absl/strings",
        "@abseil-cpp//absl/strings:str_format",
    ],
)

cf_cc_binary(
    name = "assemble_cvd",
    srcs = ["assemble_cvd.cc"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:in_sandbox",
        "//cuttlefish/common/libs/utils:tee_logging",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/assemble_cvd:assemble_cvd_flags",
        "//cuttlefish/host/commands/assemble_cvd:clean",
        "//cuttlefish/host/commands/assemble_cvd:create_dynamic_disk_files",
        "//cuttlefish/host/commands/assemble_cvd:display",
        "//cuttlefish/host/commands/assemble_cvd:flag_feature",
        "//cuttlefish/host/commands/assemble_cvd:flags",
        "//cuttlefish/host/commands/assemble_cvd:flags_defaults",
        "//cuttlefish/host/commands/assemble_cvd:instance_image_files",
        "//cuttlefish/host/commands/assemble_cvd:media",
        "//cuttlefish/host/commands/assemble_cvd:required_directories",
        "//cuttlefish/host/commands/assemble_cvd:resolve_instance_files",
        "//cuttlefish/host/commands/assemble_cvd:touchpad",
        "//cuttlefish/host/commands/assemble_cvd/android_build",
        "//cuttlefish/host/commands/assemble_cvd/android_build:android_builds",
        "//cuttlefish/host/commands/assemble_cvd/android_build:identify_build",
        "//cuttlefish/host/commands/assemble_cvd/disk:ap_composite_disk",
        "//cuttlefish/host/commands/assemble_cvd/disk:factory_reset_protected",
        "//cuttlefish/host/commands/assemble_cvd/disk:image_file",
        "//cuttlefish/host/commands/assemble_cvd/disk:metadata_image",
        "//cuttlefish/host/commands/assemble_cvd/disk:misc_image",
        "//cuttlefish/host/commands/assemble_cvd/disk:os_composite_disk",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:initramfs_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:super_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/commands/assemble_cvd/flags:vendor_boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:vm_manager",
        "//cuttlefish/host/libs/command_util",
        "//cuttlefish/host/libs/config:ap_boot_flow",
        "//cuttlefish/host/libs/config:config_flag",
        "//cuttlefish/host/libs/config:custom_actions",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:fetcher_config",
        "//cuttlefish/host/libs/config:fetcher_configs",
        "//cuttlefish/host/libs/config:log_string_to_dir",
        "//cuttlefish/host/libs/config/adb",
        "//cuttlefish/host/libs/config/defaults",
        "//cuttlefish/host/libs/config/fastboot",
        "//cuttlefish/host/libs/feature:inject",
        "//cuttlefish/host/libs/log_names",
        "//cuttlefish/posix:symlink",
        "//cuttlefish/pretty:vector",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@gflags",
    ],
)

cf_cc_library(
    name = "boot_config",
    srcs = ["boot_config.cc"],
    hdrs = ["boot_config.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:size_utils",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/assemble_cvd:bootconfig_args",
        "//cuttlefish/host/libs/avb",
        "//cuttlefish/host/libs/config:ap_boot_flow",
        "//cuttlefish/host/libs/config:boot_flow",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:kernel_args",
        "//cuttlefish/host/libs/config:mkenvimage_slim",
        "//cuttlefish/host/libs/vm_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@gflags",
    ],
)

cf_cc_library(
    name = "boot_image_utils",
    srcs = ["boot_image_utils.cc"],
    hdrs = ["boot_image_utils.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/assemble_cvd/boot_image",
        "//cuttlefish/host/commands/assemble_cvd/boot_image:boot_image_builder",
        "//cuttlefish/host/commands/assemble_cvd/boot_image:vendor_boot_image",
        "//cuttlefish/host/commands/assemble_cvd/boot_image:vendor_boot_image_builder",
        "//cuttlefish/host/commands/assemble_cvd/disk:generate_persistent_bootconfig",
        "//cuttlefish/host/libs/avb",
        "//cuttlefish/host/libs/avb:parser",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/host/libs/config:known_paths",
        "//cuttlefish/io",
        "//cuttlefish/io:chroot",
        "//cuttlefish/io:concat",
        "//cuttlefish/io:copy",
        "//cuttlefish/io:in_memory",
        "//cuttlefish/io:length",
        "//cuttlefish/io:lz4_legacy",
        "//cuttlefish/io:native_filesystem",
        "//cuttlefish/io:shared_fd",
        "//cuttlefish/io:string",
        "//cuttlefish/io:write_exact",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/log:check",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "bootconfig_args",
    srcs = ["bootconfig_args.cpp"],
    hdrs = ["bootconfig_args.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:json",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/vm_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "clean",
    srcs = ["clean.cc"],
    hdrs = ["clean.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:in_sandbox",
        "//cuttlefish/common/libs/utils:proc_file_utils",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/posix:strerror",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "create_dynamic_disk_files",
    srcs = ["create_dynamic_disk_files.cc"],
    hdrs = ["create_dynamic_disk_files.h"],
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/host/commands/assemble_cvd:assemble_cvd_flags",
        "//cuttlefish/host/commands/assemble_cvd:boot_config",
        "//cuttlefish/host/commands/assemble_cvd:boot_image_utils",
        "//cuttlefish/host/commands/assemble_cvd:disk_builder",
        "//cuttlefish/host/commands/assemble_cvd:flags_defaults",
        "//cuttlefish/host/commands/assemble_cvd:instance_image_files",
        "//cuttlefish/host/commands/assemble_cvd:super_image_mixer",
        "//cuttlefish/host/commands/assemble_cvd/android_build:android_builds",
        "//cuttlefish/host/commands/assemble_cvd/disk:access_kregistry",
        "//cuttlefish/host/commands/assemble_cvd/disk:ap_composite_disk",
        "//cuttlefish/host/commands/assemble_cvd/disk:bootloader_present",
        "//cuttlefish/host/commands/assemble_cvd/disk:chromeos_state",
        "//cuttlefish/host/commands/assemble_cvd/disk:factory_reset_protected",
        "//cuttlefish/host/commands/assemble_cvd/disk:gem5_image_unpacker",
        "//cuttlefish/host/commands/assemble_cvd/disk:generate_persistent_bootconfig",
        "//cuttlefish/host/commands/assemble_cvd/disk:generate_persistent_vbmeta",
        "//cuttlefish/host/commands/assemble_cvd/disk:hwcomposer_pmem",
        "//cuttlefish/host/commands/assemble_cvd/disk:image_file",
        "//cuttlefish/host/commands/assemble_cvd/disk:initialize_instance_composite_disk",
        "//cuttlefish/host/commands/assemble_cvd/disk:kernel_ramdisk_repacker",
        "//cuttlefish/host/commands/assemble_cvd/disk:os_composite_disk",
        "//cuttlefish/host/commands/assemble_cvd/disk:pflash",
        "//cuttlefish/host/commands/assemble_cvd/disk:pstore",
        "//cuttlefish/host/commands/assemble_cvd/disk:sd_card",
        "//cuttlefish/host/commands/assemble_cvd/disk:vbmeta_enforce_minimum_size",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:initramfs_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/libs/config:ap_boot_flow",
        "//cuttlefish/host/libs/config:build_archive",
        "//cuttlefish/host/libs/config:config_instance_derived",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:data_image",
        "//cuttlefish/host/libs/config:fetcher_config",
        "//cuttlefish/host/libs/config:fetcher_configs",
        "//cuttlefish/host/libs/config:file_source",
        "//cuttlefish/host/libs/config:instance_nums",
        "//cuttlefish/host/libs/feature:inject",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@gflags",
    ],
)

cf_cc_library(
    name = "disk_builder",
    srcs = ["disk_builder.cpp"],
    hdrs = ["disk_builder.h"],
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/host/libs/config:vmm_mode",
        "//cuttlefish/host/libs/image_aggregator",
        "//cuttlefish/host/libs/image_aggregator:qcow2",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
    ],
)

cf_cc_library(
    name = "disk_image_flags_vectorization",
    srcs = ["disk_image_flags_vectorization.cc"],
    hdrs = ["disk_image_flags_vectorization.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/host/commands/assemble_cvd:assemble_cvd_flags",
        "//cuttlefish/host/commands/assemble_cvd:super_image_mixer",
        "//cuttlefish/host/commands/assemble_cvd/flags:android_efi_loader",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:bootloader",
        "//cuttlefish/host/commands/assemble_cvd/flags:initramfs_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:super_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/commands/assemble_cvd/flags:vendor_boot_image",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:fetcher_configs",
        "//cuttlefish/host/libs/config:instance_nums",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "display",
    srcs = ["display.cpp"],
    hdrs = ["display.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/libs/config:config_flag",
        "//cuttlefish/host/libs/config:config_fragment",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:display",
        "//cuttlefish/host/libs/feature",
        "//cuttlefish/result",
        "@abseil-cpp//absl/log",
        "@fruit",
    ],
)

cf_cc_library(
    name = "flag_feature",
    srcs = ["flag_feature.cpp"],
    hdrs = ["flag_feature.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/host/libs/config:config_flag",
        "//cuttlefish/host/libs/feature",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fruit",
        "@gflags",
    ],
)

cf_cc_library(
    name = "flags",
    srcs = ["flags.cc"],
    hdrs = ["flags.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:base64",
        "//cuttlefish/common/libs/utils:container",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:host_info",
        "//cuttlefish/common/libs/utils:network",
        "//cuttlefish/host/commands/assemble_cvd:alloc",
        "//cuttlefish/host/commands/assemble_cvd:assemble_cvd_flags",
        "//cuttlefish/host/commands/assemble_cvd:disk_image_flags_vectorization",
        "//cuttlefish/host/commands/assemble_cvd:display",
        "//cuttlefish/host/commands/assemble_cvd:flags_defaults",
        "//cuttlefish/host/commands/assemble_cvd:graphics_flags",
        "//cuttlefish/host/commands/assemble_cvd:guest_config",
        "//cuttlefish/host/commands/assemble_cvd:media",
        "//cuttlefish/host/commands/assemble_cvd:network_flags",
        "//cuttlefish/host/commands/assemble_cvd:touchpad",
        "//cuttlefish/host/commands/assemble_cvd/flags:android_efi_loader",
        "//cuttlefish/host/commands/assemble_cvd/flags:blank_data_image_mb",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:bootloader",
        "//cuttlefish/host/commands/assemble_cvd/flags:cpus",
        "//cuttlefish/host/commands/assemble_cvd/flags:daemon",
        "//cuttlefish/host/commands/assemble_cvd/flags:data_policy",
        "//cuttlefish/host/commands/assemble_cvd/flags:display_proto",
        "//cuttlefish/host/commands/assemble_cvd/flags:extra_kernel_cmdline",
        "//cuttlefish/host/commands/assemble_cvd/flags:gpu_mode",
        "//cuttlefish/host/commands/assemble_cvd/flags:guest_enforce_security",
        "//cuttlefish/host/commands/assemble_cvd/flags:initramfs_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:mcu_config_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:memory_mb",
        "//cuttlefish/host/commands/assemble_cvd/flags:parser",
        "//cuttlefish/host/commands/assemble_cvd/flags:restart_subprocesses",
        "//cuttlefish/host/commands/assemble_cvd/flags:super_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/commands/assemble_cvd/flags:use_cvdalloc",
        "//cuttlefish/host/commands/assemble_cvd/flags:vendor_boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:vm_manager",
        "//cuttlefish/host/commands/cvdalloc:interface",
        "//cuttlefish/host/libs/config:ap_boot_flow",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:display",
        "//cuttlefish/host/libs/config:external_network_mode",
        "//cuttlefish/host/libs/config:fetcher_configs",
        "//cuttlefish/host/libs/config:gpu_mode",
        "//cuttlefish/host/libs/config:host_tools_version",
        "//cuttlefish/host/libs/config:instance_nums",
        "//cuttlefish/host/libs/config:secure_hals",
        "//cuttlefish/host/libs/config:vmm_mode",
        "//cuttlefish/host/libs/config/defaults",
        "//cuttlefish/host/libs/vhal_proxy_server",
        "//cuttlefish/host/libs/vm_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
        "@fruit",
        "@gflags",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "flags_defaults",
    hdrs = [
        "flags_defaults.h",
    ],
    copts = COPTS + ["-Werror=sign-compare"],
    deps = [
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/host/libs/config:gpu_mode",
    ],
)

cf_cc_library(
    name = "guest_config",
    srcs = ["guest_config.cc"],
    hdrs = ["guest_config.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/key_equals_value",
        "//cuttlefish/common/libs/utils:device_type",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:host_info",
        "//cuttlefish/common/libs/utils:in_sandbox",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/host/commands/assemble_cvd:boot_image_utils",
        "//cuttlefish/host/commands/assemble_cvd:guest_config_cc_proto",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/host/libs/config:display",
        "//cuttlefish/host/libs/config:gpu_mode",
        "//cuttlefish/pretty",
        "//cuttlefish/pretty:optional",
        "//cuttlefish/pretty:string",
        "//cuttlefish/pretty:struct",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fmt",
        "@protobuf",
        "@protobuf//src/google/protobuf/io",
    ],
)

cf_cc_library(
    name = "graphics_flags",
    srcs = ["graphics_flags.cc"],
    hdrs = ["graphics_flags.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:host_info",
        "//cuttlefish/common/libs/utils:semver",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/host/commands/assemble_cvd:guest_config",
        "//cuttlefish/host/graphics_detector:graphics_detector_cc_proto",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:gpu_mode",
        "//cuttlefish/host/libs/config:guest_hwui_renderer",
        "//cuttlefish/host/libs/config:guest_renderer_preload",
        "//cuttlefish/host/libs/config:vmm_mode",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
        "@protobuf",
    ],
)

cf_cc_library(
    name = "kernel_module_parser",
    srcs = ["kernel_module_parser.cc"],
    hdrs = ["kernel_module_parser.h"],
    deps = [
        "//cuttlefish/io",
        "//cuttlefish/io:string",
        "//cuttlefish/result:expect",
        "//cuttlefish/result:result_type",
    ],
)

cf_cc_test(
    name = "kernel_module_parser_test",
    srcs = ["kernel_module_parser_test.cc"],
    deps = [
        "//cuttlefish/host/commands/assemble_cvd:kernel_module_parser",
        "//cuttlefish/io",
        "//cuttlefish/io:in_memory",
        "//cuttlefish/result:result_matchers",
    ],
)

proto_library(
    name = "launch_cvd_proto",
    srcs = ["proto/launch_cvd.proto"],
)

cc_proto_library(
    name = "launch_cvd_cc_proto",
    deps = [":launch_cvd_proto"],
)

proto_library(
    name = "guest_config_proto",
    srcs = ["proto/guest_config.proto"],
)

cc_proto_library(
    name = "guest_config_cc_proto",
    deps = [":guest_config_proto"],
)

cf_cc_library(
    name = "instance_image_files",
    srcs = ["instance_image_files.cc"],
    hdrs = ["instance_image_files.h"],
    deps = [
        "//cuttlefish/host/commands/assemble_cvd/disk:efi_loader",
        "//cuttlefish/host/commands/assemble_cvd/disk:image_file",
        "//cuttlefish/host/commands/assemble_cvd/disk:kernel_ramdisk_repacker",
        "//cuttlefish/host/commands/assemble_cvd/disk:metadata_image",
        "//cuttlefish/host/commands/assemble_cvd/disk:misc_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/libs/config:cuttlefish_config",
    ],
)

cf_cc_library(
    name = "misc_info",
    srcs = ["misc_info.cc"],
    hdrs = ["misc_info.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/host/libs/avb",
        "//cuttlefish/host/libs/config:known_paths",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "network_flags",
    srcs = ["network_flags.cpp"],
    hdrs = ["network_flags.h"],
    deps = [
        "//cuttlefish/host/commands/cvdalloc:interface",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@abseil-cpp//absl/strings:str_format",
    ],
)

cf_cc_library(
    name = "required_directories",
    srcs = ["required_directories.cc"],
    hdrs = ["required_directories.h"],
    deps = [
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
    ],
)

cf_cc_library(
    name = "resolve_instance_files",
    srcs = ["resolve_instance_files.cc"],
    hdrs = ["resolve_instance_files.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/host/commands/assemble_cvd:assemble_cvd_flags",
        "//cuttlefish/host/commands/assemble_cvd/flags:boot_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:initramfs_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:kernel_path",
        "//cuttlefish/host/commands/assemble_cvd/flags:super_image",
        "//cuttlefish/host/commands/assemble_cvd/flags:system_image_dir",
        "//cuttlefish/host/commands/assemble_cvd/flags:vendor_boot_image",
        "//cuttlefish/host/libs/config:instance_nums",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@gflags",
    ],
)

cf_cc_library(
    name = "super_image_mixer",
    srcs = ["super_image_mixer.cc"],
    hdrs = ["super_image_mixer.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/key_equals_value",
        "//cuttlefish/common/libs/utils:archive",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/assemble_cvd:misc_info",
        "//cuttlefish/host/libs/avb",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:fetcher_config",
        "//cuttlefish/host/libs/config:file_source",
        "//cuttlefish/host/libs/config:known_paths",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "touchpad",
    srcs = ["touchpad.cpp"],
    hdrs = ["touchpad.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/libs/config:config_flag",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:touchpad",
        "//cuttlefish/host/libs/feature",
        "//cuttlefish/result",
        "@abseil-cpp//absl/strings",
        "@fruit",
    ],
)

cf_cc_library(
    name = "vendor_dlkm_utils",
    srcs = ["vendor_dlkm_utils.cc"],
    hdrs = ["vendor_dlkm_utils.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:disk_usage",
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/assemble_cvd:boot_image_utils",
        "//cuttlefish/host/commands/assemble_cvd:kernel_module_parser",
        "//cuttlefish/host/libs/avb",
        "//cuttlefish/host/libs/config:config_utils",
        "//cuttlefish/host/libs/config:known_paths",
        "//cuttlefish/io:shared_fd",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "assemble_cvd_flags",
    srcs = [
        "assemble_cvd_flags.cpp",
    ],
    hdrs = [
        "assemble_cvd_flags.h",
    ],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/host/commands/assemble_cvd:flags_defaults",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:display",
        "@fmt",
        "@gflags",
    ],
    # required for the gflags `DEFINE`s when included in other targets
    alwayslink = 1,
)

cf_cc_library(
    name = "media",
    srcs = ["media.cpp"],
    hdrs = ["media.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/libs/config:config_flag",
        "//cuttlefish/host/libs/config:config_fragment",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/config:media",
        "//cuttlefish/host/libs/feature",
        "//cuttlefish/result",
        "@abseil-cpp//absl/log",
        "@fruit",
    ],
)
