1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/lwip/Makefile.dep
Marian Buschsieweke cefbc394ca
pkg/lwip: automatically pull in lwip_netdev
Pull in lwip_netdev for netdev integration automatically if there is
any netdev to integrate, otherwise don't pull in the module.

As a result, applications no longer need to select that module by hand.
2024-04-30 08:41:07 +02:00

114 lines
2.5 KiB
Makefile

# lwIP's memory management doesn't seem to work on non 32-bit platforms at the
# moment.
FEATURES_REQUIRED_ANY += arch_32bit|arch_64bit
DEFAULT_MODULE += auto_init_lwip
USEMODULE += event
ifneq (,$(filter sock_async,$(USEMODULE)))
USEMODULE += lwip_sock_async
endif
ifneq (,$(filter sock_ip,$(USEMODULE)))
USEMODULE += lwip_sock_ip
endif
ifneq (,$(filter sock_tcp,$(USEMODULE)))
USEMODULE += lwip_sock_tcp
endif
ifneq (,$(filter sock_udp,$(USEMODULE)))
USEMODULE += lwip_sock_udp
endif
ifneq (,$(filter stm32_eth,$(USEMODULE)))
ifneq (,$(filter lwip_dhcp_auto,$(USEMODULE)))
USEMODULE += stm32_eth_link_up
endif
endif
ifneq (,$(filter lwip_ipv6_autoconfig lwip_ipv6_mld,$(USEMODULE)))
USEMODULE += lwip_ipv6
endif
ifneq (,$(filter lwip_ipv4,$(USEMODULE)))
USEMODULE += ipv4
endif
ifneq (,$(filter lwip_ipv6,$(USEMODULE)))
USEMODULE += ipv6
USEMODULE += random
endif
ifneq (,$(filter lwip_udplite,$(USEMODULE)))
USEMODULE += lwip_udp
endif
ifneq (,$(filter lwip_sock_%,$(USEMODULE)))
USEMODULE += lwip_sock
CFLAGS += -DLWIP_SO_RCVTIMEO
endif
ifneq (,$(filter lwip_sock_ip,$(USEMODULE)))
USEMODULE += lwip_raw
endif
ifneq (,$(filter lwip_sock_tcp,$(USEMODULE)))
USEMODULE += lwip_tcp
endif
ifneq (,$(filter lwip_sock_udp,$(USEMODULE)))
USEMODULE += lwip_udp
endif
ifneq (,$(filter lwip_sixlowpan,$(USEMODULE)))
USEMODULE += lwip_ipv6_autoconfig
USEMODULE += l2util
endif
ifneq (,$(filter lwip_%,$(USEMODULE)))
USEPKG += lwip
USEMODULE += core_mbox
USEMODULE += lwip_api
USEMODULE += lwip_contrib
USEMODULE += lwip_core
USEMODULE += lwip_netif
USEMODULE += lwip_netif_init_devs
USEMODULE += netdev
ifeq (,$(filter lwip_ipv4 lwip_ipv6,$(USEMODULE)))
USEMODULE += lwip_ipv4
endif
ifeq (,$(filter lwip_tcp lwip_udp lwip_udplite,$(USEMODULE)))
USEMODULE += lwip_raw
endif
ifneq (,$(filter netdev_eth,$(USEMODULE)))
USEMODULE += lwip_ethernet
endif
endif
ifneq (,$(filter lwip_ppp,$(USEMODULE)))
USEMODULE += lwip_polarssl
endif
ifneq (,$(filter lwip_contrib,$(USEMODULE)))
USEMODULE += sema
USEMODULE += ztimer_msec
ifneq (,$(filter bhp,$(USEMODULE)))
USEMODULE += bhp_event
endif
endif
ifneq (,$(filter lwip_netif,$(USEMODULE)))
USEMODULE += netif
endif
ifneq (,$(filter lwip_dhcp_auto,$(USEMODULE)))
USEMODULE += lwip_dhcp
endif
# if an actual netdev is used, we need lwip_netdev to integrate it
ifneq (,$(filter lwip_ethernet lwip_sixlowpan,$(USEMODULE)))
USEMODULE += lwip_netdev
endif
ifneq (,$(filter netif,$(USEMODULE)))
USEMODULE += fmt
endif