| # Copyright 2019 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/dist/resource.gni") |
| import("//build/drivers.gni") |
| |
| import("//src/connectivity/weave/weavestack/weavestack_package_v2.gni") |
| |
| template("weavestack_lib") { |
| source_set(target_name) { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "fidl/bootstrap_impl.cc", |
| "fidl/bootstrap_impl.h", |
| "fidl/stack_impl.cc", |
| "fidl/stack_impl.h", |
| "fidl/stack_provider_impl.cc", |
| "fidl/stack_provider_impl.h", |
| "fidl/stack_utils.cc", |
| "fidl/stack_utils.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.lowpan:fuchsia.lowpan_hlcpp", |
| "//sdk/fidl/fuchsia.lowpan.device:fuchsia.lowpan.device_hlcpp", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp", |
| "//sdk/fidl/fuchsia.weave:fuchsia.weave_hlcpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/connectivity/weave/lib/core", |
| "//src/lib/files", |
| "//src/lib/fsl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| if (invoker.is_shared) { |
| public_deps += [ "//src/connectivity/weave/adaptation:adaptation.shared" ] |
| } else { |
| public_deps += |
| [ "//src/connectivity/weave/adaptation:adaptation.sources" ] |
| } |
| } |
| } |
| |
| weavestack_lib("lib.static") { |
| is_shared = false |
| } |
| |
| weavestack_lib("lib.shared") { |
| is_shared = true |
| } |
| |
| executable("bin") { |
| output_name = "weavestack" |
| sources = [ "main.cc" ] |
| deps = [ ":lib.shared" ] |
| } |
| |
| resource("default_environment_schema") { |
| sources = [ |
| "data/default_environment_schema.json", |
| "data/device_info_schema.json", |
| ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| # The default weavestack package contains no applets. |
| weavestack_package_v2("weavestack") { |
| component_shard_file = |
| "//src/connectivity/weave/meta/weavestack.core_shard.cml" |
| } |
| |
| config_data("config") { |
| for_pkg = "weavestack" |
| sources = [ |
| "config/default_environment.json", |
| "config/device_info.json", |
| ] |
| } |