| # 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/fuchsia/rules.gni") |
| import("//build/driver_package.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| driver_package("serial-ppp") { |
| testonly = false |
| |
| deps = [ ":serial-ppp_driver" ] |
| |
| drivers = [ |
| { |
| name = "serial-ppp.so" |
| }, |
| ] |
| } |
| |
| source_set("driver") { |
| sources = [ |
| "serial-ppp.cc", |
| "serial-ppp.h", |
| ] |
| |
| include_dirs = [ "//src/connectivity/ppp" ] |
| |
| public_deps = [ |
| "//sdk/banjo/ddk.protocol.network.device", |
| "//sdk/banjo/ddk.protocol.serial", |
| "//sdk/fidl/fuchsia.hardware.network:fuchsia.hardware.network_llcpp", |
| "//src/connectivity/ppp/lib/common", |
| "//src/connectivity/ppp/lib/hdlc:frame", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//src/lib/vmo_store", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fidl-llcpp", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| ] |
| } |
| |
| test("driver-test") { |
| sources = [ "serial-ppp-test.cc" ] |
| |
| include_dirs = [ "//src/connectivity/ppp" ] |
| |
| deps = [ |
| ":driver", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("serial-ppp-driver-test") { |
| executable_path = "test/driver-test" |
| deps = [ ":driver-test" ] |
| } |
| |
| driver_module("serial-ppp_driver") { |
| output_name = "serial-ppp" |
| testonly = false |
| |
| include_dirs = [ "//src/connectivity/ppp" ] |
| |
| deps = [ ":driver" ] |
| |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":serial-ppp-driver-test" ] |
| } |