2022-09-26 07:22:20 -04:00
|
|
|
set(srcs_lwip
|
|
|
|
"lwip/esp_netif_lwip.c"
|
2022-10-27 13:07:07 -04:00
|
|
|
"lwip/esp_netif_sntp.c"
|
2022-09-26 07:22:20 -04:00
|
|
|
"lwip/esp_netif_lwip_defaults.c"
|
|
|
|
"lwip/netif/wlanif.c"
|
|
|
|
"lwip/netif/ethernetif.c"
|
|
|
|
"lwip/netif/esp_pbuf_ref.c")
|
|
|
|
|
|
|
|
|
2021-06-22 22:20:08 -04:00
|
|
|
set(srcs
|
|
|
|
"esp_netif_handlers.c"
|
|
|
|
"esp_netif_objects.c"
|
2022-09-26 07:22:20 -04:00
|
|
|
"esp_netif_defaults.c")
|
2021-06-22 22:20:08 -04:00
|
|
|
|
|
|
|
set(include_dirs "include")
|
2022-09-26 07:22:20 -04:00
|
|
|
set(priv_include_dirs "private_include")
|
2021-06-22 22:20:08 -04:00
|
|
|
|
|
|
|
if(CONFIG_PPP_SUPPORT)
|
2023-09-19 10:01:49 -04:00
|
|
|
list(APPEND srcs_lwip lwip/esp_netif_lwip_ppp.c lwip/netif/ppp.c)
|
2021-06-22 22:20:08 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2022-05-02 09:47:05 -04:00
|
|
|
if(CONFIG_ESP_NETIF_L2_TAP)
|
2022-09-26 07:22:20 -04:00
|
|
|
list(APPEND srcs vfs_l2tap/esp_vfs_l2tap.c)
|
2022-05-02 09:47:05 -04:00
|
|
|
endif()
|
|
|
|
|
2022-05-06 10:09:24 -04:00
|
|
|
if(CONFIG_ESP_NETIF_BRIDGE_EN)
|
2022-09-26 07:22:20 -04:00
|
|
|
list(APPEND srcs_lwip lwip/esp_netif_br_glue.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ESP_NETIF_LOOPBACK)
|
|
|
|
list(APPEND srcs loopback/esp_netif_loopback.c)
|
|
|
|
elseif(CONFIG_ESP_NETIF_TCPIP_LWIP)
|
|
|
|
list(APPEND srcs ${srcs_lwip})
|
|
|
|
list(APPEND priv_include_dirs lwip)
|
2022-05-06 10:09:24 -04:00
|
|
|
endif()
|
|
|
|
|
2021-06-22 22:20:08 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
2022-05-11 10:01:48 -04:00
|
|
|
REQUIRES esp_event
|
2022-09-26 07:22:20 -04:00
|
|
|
PRIV_REQUIRES esp_netif_stack
|
2022-05-11 10:01:48 -04:00
|
|
|
LDFRAGMENTS linker.lf)
|
2022-05-02 09:47:05 -04:00
|
|
|
|
2022-05-06 10:09:24 -04:00
|
|
|
if(CONFIG_ESP_NETIF_L2_TAP OR CONFIG_ESP_NETIF_BRIDGE_EN)
|
2023-05-24 09:56:24 -04:00
|
|
|
set(optional_requires "")
|
|
|
|
if(CONFIG_ESP_NETIF_L2_TAP)
|
|
|
|
list(APPEND optional_requires "vfs")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_ESP_NETIF_BRIDGE_EN)
|
|
|
|
list(APPEND optional_requires "esp_wifi")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND optional_requires "esp_eth")
|
|
|
|
idf_component_optional_requires(PRIVATE "${optional_requires}")
|
2022-05-02 09:47:05 -04:00
|
|
|
endif()
|
2022-01-31 13:45:31 -05:00
|
|
|
|
2022-09-26 07:22:20 -04:00
|
|
|
|
2022-10-27 13:07:07 -04:00
|
|
|
target_compile_definitions(${COMPONENT_LIB} PRIVATE ESP_NETIF_COMPONENT_BUILD)
|