• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Hunan OpenValley Digital Industry Development Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//kernel/liteos_m/liteos.gni")
15import("$LITEOSTHIRDPARTY/lwip/lwip.gni")
16import("//device/soc/${LOSCFG_SOC_COMPANY}/esp32/components/esp_lwip/lwip_porting.gni")
17
18module_switch = defined(LOSCFG_NET_LWIP_SACK)
19module_name = "lwip"
20kernel_module(module_name) {
21  cflags_c = [
22    "-std=gnu99",
23    "-O2",
24    "-Wno-frame-address",
25    "-ffunction-sections",
26    "-fdata-sections",
27    "-fstrict-volatile-bitfields",
28    "-mlongcalls",
29    "-nostdlib",
30    "-Wall",
31    "-Werror=all",
32    "-Wno-error=unused-function",
33    "-Wno-error=unused-but-set-variable",
34    "-Wno-error=unused-variable",
35    "-Wno-error=deprecated-declarations",
36    "-Wextra",
37    "-Wno-unused-parameter",
38    "-Wno-sign-compare",
39    "-Wno-old-style-declaration",
40    "-Wno-address",
41    "-MMD",
42    "-MP",
43    "-Wno-type-limits",
44  ]
45
46  cflags = []
47  cflags_cc = []
48  defines = [
49    "ESP_PLATFORM",
50    "NDEBUG",
51    "_GNU_SOURCE",
52    "UNITY_INCLUDE_CONFIG_H",
53    "HAVE_CONFIG_H",
54  ]
55
56  include_dirs = ESP_LWIP_INCLUDE_DIRS
57  sources = LWIPNOAPPSFILES - [ "$LWIPDIR/api/sockets.c" , "$LWIPDIR/core/pbuf.c" ] + LWIP_PORTING_FILES
58  deps = [
59    "//third_party/mbedtls:mbedtls_static",
60  ]
61}
62config("public") {
63  CUR_PORTING_DIR=get_path_info(".", "abspath")
64  include_dirs = [
65    "${CUR_PORTING_DIR}/include",
66    "${CUR_PORTING_DIR}/include/lwip",
67  ] + LWIP_PORTING_INCLUDE_DIRS + LWIP_INCLUDE_DIRS
68  defines = [
69    "LWIP_CONFIG_NUM_SOCKETS=128",
70    "FD_SETSIZE=1024",
71  ]
72
73}
74