| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//common-mk/generate-dbus-adaptors.gni") |
| import("//common-mk/pkg_config.gni") |
| |
| # "all" is the root target built by platform2 build system. |
| group("all") { |
| deps = [ |
| ":install_dbus_config", |
| ":install_dbus_service", |
| ":install_upstart_config", |
| ":lvmd", |
| ":lvmd_client", |
| ":lvmd_dbus_adaptors", |
| ] |
| } |
| |
| pkg_config("target_defaults") { |
| # NOSORT |
| pkg_deps = [ |
| "libchrome", |
| "libbrillo", |
| |
| # system_api depends on protobuf (or protobuf-lite). It must appear |
| # before protobuf here or the linker flags won't be in the right |
| # order. |
| "system_api", |
| "protobuf-lite", |
| ] |
| } |
| |
| pkg_config("lvmd_client_config") { |
| pkg_deps = [ "liblvmd-client" ] |
| } |
| |
| generate_dbus_adaptors("lvmd_dbus_adaptors") { |
| dbus_service_config = "dbus/dbus-service-config.json" |
| dbus_adaptors_out_dir = "include/lvmd/dbus_adaptors" |
| sources = [ "dbus/org.chromium.Lvmd.xml" ] |
| } |
| |
| executable("lvmd") { |
| sources = [ |
| "lvmd.cc", |
| "main.cc", |
| ] |
| configs += [ ":target_defaults" ] |
| install_path = "sbin" |
| } |
| |
| install_config("install_dbus_config") { |
| sources = [ "dbus/org.chromium.Lvmd.conf" ] |
| install_path = "/etc/dbus-1/system.d" |
| } |
| |
| install_config("install_dbus_service") { |
| sources = [ "dbus/org.chromium.Lvmd.service" ] |
| install_path = "/usr/share/dbus-1/system-services" |
| } |
| |
| install_config("install_upstart_config") { |
| sources = [ "init/lvmd.conf" ] |
| install_path = "/etc/init" |
| } |
| |
| executable("lvmd_client") { |
| sources = [ "lvmd_client.cc" ] |
| configs += [ |
| ":target_defaults", |
| ":lvmd_client_config", |
| ] |
| install_path = "sbin" |
| } |