blob: ae5fccdf947fa183877ffc71eb4c717c2d637ce7 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config.gni")
import("//build/package.gni")
declare_args() {
# Whether the component loader should automatically update packages.
auto_update_packages = true
}
source_set("lib") {
sources = [
"app.cc",
"app.h",
"config.cc",
"config.h",
"package_updating_loader.cc",
"package_updating_loader.h",
]
public_deps = [
"//garnet/lib/loader",
"//garnet/public/lib/fsl",
"//garnet/public/lib/json",
"//garnet/public/lib/svc/cpp",
"//sdk/fidl/fuchsia.pkg",
"//sdk/lib/fidl/cpp",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//src/lib/pkg_url",
"//third_party/rapidjson",
]
if (auto_update_packages) {
public_configs = [ ":update_packages_config" ]
}
}
executable("bin") {
output_name = "sysmgr"
sources = [
"main.cc",
]
deps = [
":lib",
"//src/lib/fxl",
"//zircon/public/lib/async-default",
"//zircon/public/lib/async-loop-cpp",
]
}
fuchsia_component("sysmgr_component") {
manifest = rebase_path("meta/sysmgr.cmx")
deps = [
":bin",
]
binary = "sysmgr"
}
package("sysmgr") {
components = [ ":sysmgr_component" ]
}
template("cfg") {
config_data(target_name) {
for_pkg = "sysmgr"
sources = [
rebase_path("config/${invoker.name}"),
]
}
}
cfg("network_config") {
name = "network.config"
}
cfg("services_config") {
name = "services.config"
}
cfg("router_config") {
name = "router.config"
}
config("update_packages_config") {
defines = [ "AUTO_UPDATE_PACKAGES" ]
}