# Copyright (c) 2022 Talkweb Co., Ltd. # 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 # # http://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("//kernel/liteos_m/liteos.gni") import("$LITEOSTHIRDPARTY/lwip/lwip.gni") import("$LITEOSTOPDIR/components/net/lwip-2.1/lwip_porting.gni") module_switch = defined(LOSCFG_NET_LWIP) module_name = "lwip" kernel_module(module_name) { sources = LWIP_PORTING_FILES + LWIPNOAPPSFILES - [ "$LWIPDIR/api/sockets.c" ] if (defined(LOSCFG_NIOBE407_USE_308_NETWORK)) { sources += LWIPERFFILES } deps = [ ":tw_ethernet_static" ] } lite_library("tw_ethernet_static") { target_type = "static_library" sources = [ "src/app_ethernet.c", "src/ethernetif.c", "src/stm32f4xx_hal_eth.c", ] } build_ext_component("copy_tw_ethernet_static") { exec_path = rebase_path(".", root_build_dir) command = "cp lib/libtw_ethernet_static.a ../../../../../../out/niobe407/niobe407/libs/libtw_ethernet_static.a" } config("public") { include_dirs = [ "include" ] + LWIP_PORTING_INCLUDE_DIRS + LWIP_INCLUDE_DIRS }