| # Copyright 2021 The Pigweed Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| # use this file except in compliance with the License. You may obtain a copy of |
| # the License at |
| # |
| # https:#www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations under |
| # the License. |
| |
| import("//build_overrides/pigweed.gni") |
| import("$dir_pw_build/target_types.gni") |
| import("teensy_library_source_set.gni") |
| |
| pw_source_set("teensy_ethernet") { |
| sources = [ "teensy_ethernet.cc" ] |
| include_dirs = [ "//applications/tls_example/backends" ] |
| deps = [ |
| ":native_ethernet", |
| "$dir_pw_log", |
| ] |
| } |
| |
| teensy_library_source_set("fnet") { |
| library_name = "FNET" |
| public_configs = [ ":warnings_to_suppress" ] |
| } |
| |
| teensy_library_source_set("native_ethernet") { |
| library_name = "NativeEthernet" |
| public_deps = [ ":fnet" ] |
| } |
| |
| # Many of the warnings are in the header files, which affects the target |
| # that depends on it. Thus we introduce this public config. |
| config("warnings_to_suppress") { |
| cflags = [ |
| "-Wno-error=old-style-declaration", |
| "-Wno-error=unused-parameter", |
| "-Wno-error=undef", |
| "-Wno-error=implicit-fallthrough=", |
| "-Wno-error=sign-compare", |
| "-Wno-error=non-virtual-dtor", |
| "-Wno-error=cast-qual", |
| ] |
| } |