# Copyright (c) 2022 Hunan OpenValley Digital Industry Development 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("//device/soc/${LOSCFG_SOC_COMPANY}/esp32/components/esp_lwip/lwip_porting.gni") module_switch = defined(LOSCFG_NET_LWIP_SACK) module_name = "lwip" kernel_module(module_name) { cflags_c = [ "-std=gnu99", "-O2", "-Wno-frame-address", "-ffunction-sections", "-fdata-sections", "-fstrict-volatile-bitfields", "-mlongcalls", "-nostdlib", "-Wall", "-Werror=all", "-Wno-error=unused-function", "-Wno-error=unused-but-set-variable", "-Wno-error=unused-variable", "-Wno-error=deprecated-declarations", "-Wextra", "-Wno-unused-parameter", "-Wno-sign-compare", "-Wno-old-style-declaration", "-Wno-address", "-MMD", "-MP", "-Wno-type-limits", ] cflags = [] cflags_cc = [] defines = [ "ESP_PLATFORM", "NDEBUG", "_GNU_SOURCE", "UNITY_INCLUDE_CONFIG_H", "HAVE_CONFIG_H", ] include_dirs = ESP_LWIP_INCLUDE_DIRS sources = LWIPNOAPPSFILES - [ "$LWIPDIR/api/sockets.c" , "$LWIPDIR/core/pbuf.c" ] + LWIP_PORTING_FILES deps = [ "//third_party/mbedtls:mbedtls_static", ] } config("public") { CUR_PORTING_DIR=get_path_info(".", "abspath") include_dirs = [ "${CUR_PORTING_DIR}/include", "${CUR_PORTING_DIR}/include/lwip", ] + LWIP_PORTING_INCLUDE_DIRS + LWIP_INCLUDE_DIRS defines = [ "LWIP_CONFIG_NUM_SOCKETS=128", "FD_SETSIZE=1024", ] }