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: "run_cvd",
22    srcs: [
23        "boot_state_machine.cc",
24        "launch/automotive_proxy.cpp",
25        "launch/bluetooth_connector.cpp",
26        "launch/nfc_connector.cpp",
27        "launch/uwb_connector.cpp",
28        "launch/casimir_control_server.cpp",
29        "launch/console_forwarder.cpp",
30        "launch/control_env_proxy_server.cpp",
31        "launch/gnss_grpc_proxy.cpp",
32        "launch/kernel_log_monitor.cpp",
33        "launch/logcat_receiver.cpp",
34        "launch/log_tee_creator.cpp",
35        "launch/grpc_socket_creator.cpp",
36        "launch/metrics.cpp",
37        "launch/openwrt_control_server.cpp",
38        "launch/echo_server.cpp",
39        "launch/root_canal.cpp",
40        "launch/casimir.cpp",
41        "launch/pica.cpp",
42        "launch/screen_recording_server.cpp",
43        "launch/secure_env.cpp",
44        "launch/snapshot_control_files.cpp",
45        "launch/webrtc_recorder.cpp",
46        "launch/streamer.cpp",
47        "launch/netsim_server.cpp",
48        "launch/vhal_proxy_server.cpp",
49        "main.cc",
50        "reporting.cpp",
51        "server_loop.cpp",
52        "server_loop_impl.cpp",
53        "server_loop_impl_record.cpp",
54        "server_loop_impl_snapshot.cpp",
55        "validate.cpp",
56    ],
57    shared_libs: [
58        "libbase",
59        "libcuttlefish_fs",
60        "libcuttlefish_kernel_log_monitor_utils",
61        "libcuttlefish_run_cvd_proto",
62        "libcuttlefish_utils",
63        "libext2_blkid",
64        "libfruit",
65        "libjsoncpp",
66        "libprotobuf-cpp-full",
67    ],
68    static_libs: [
69        "libbuildversion",
70        "libcuttlefish_command_util",
71        "libcuttlefish_host_config",
72        "libcuttlefish_host_config_adb",
73        "libcuttlefish_host_config_fastboot",
74        "libcuttlefish_metrics",
75        "libcuttlefish_msg_queue",
76        "libcuttlefish_process_monitor",
77        "libcuttlefish_utils",
78        "libcuttlefish_vm_manager",
79        "libgflags",
80    ],
81    required: [
82        "console_forwarder",
83        "kernel_log_monitor",
84        "logcat_receiver",
85        "log_tee",
86        "secure_env",
87        "tcp_connector",
88    ],
89    target: {
90        darwin: {
91            enabled: true,
92        },
93        linux: {
94            required: [
95                "echo_server",
96                "gnss_grpc_proxy",
97            ],
98            srcs: [
99                "launch/mcu.cpp",
100                "launch/modem.cpp",
101                "launch/open_wrt.cpp",
102                "launch/tombstone_receiver.cpp",
103                "launch/vhost_device_vsock.cpp",
104                "launch/wmediumd_server.cpp",
105            ],
106            shared_libs: [
107                "libnl",
108            ],
109        },
110    },
111    defaults: [
112        "cuttlefish_host",
113        "cvd_cc_defaults",
114    ],
115    use_version_lib: true,
116}
117