From 8386ec9fac745a74334833f4ad13cfd2e7ef6139 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Mon, 31 Aug 2020 15:16:45 +0200 Subject: [PATCH] sock: make sock implementation dependency of sock API + stack This is the logical continuation of [#12931] for _all_ `sock` implementations. [#12931]: https://github.com/RIOT-OS/RIOT/pull/12931 --- Makefile.dep | 6 ++++++ pkg/lwip/Makefile.dep | 13 +++++++++++-- pkg/tinydtls/Makefile.dep | 4 ++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Makefile.dep b/Makefile.dep index 27baca8daf..ab10c78330 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -645,6 +645,12 @@ ifneq (,$(filter gnrc,$(USEMODULE))) USEMODULE += gnrc_netif USEMODULE += gnrc_netif_hdr USEMODULE += gnrc_pktbuf + ifneq (,$(filter sock_async, $(USEMODULE))) + USEMODULE += gnrc_sock_async + endif + ifneq (,$(filter sock_ip, $(USEMODULE))) + USEMODULE += gnrc_sock_ip + endif ifneq (,$(filter sock_udp, $(USEMODULE))) USEMODULE += gnrc_sock_udp endif diff --git a/pkg/lwip/Makefile.dep b/pkg/lwip/Makefile.dep index 0525342e32..55c1098471 100644 --- a/pkg/lwip/Makefile.dep +++ b/pkg/lwip/Makefile.dep @@ -4,6 +4,15 @@ FEATURES_REQUIRED += arch_32bit DEFAULT_MODULE += auto_init_lwip -ifneq (,$(filter lwip_sock_async,$(USEMODULE))) - USEMODULE += sock_async +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 diff --git a/pkg/tinydtls/Makefile.dep b/pkg/tinydtls/Makefile.dep index 151dc2636e..c567f46953 100644 --- a/pkg/tinydtls/Makefile.dep +++ b/pkg/tinydtls/Makefile.dep @@ -8,3 +8,7 @@ USEMODULE += tinydtls_ecc # TinyDTLS only has support for 32-bit architectures ATM FEATURES_REQUIRED += arch_32bit + +ifneq (,$(filter sock_dtls,$(USEMODULE))) + USEMODULE += tinydtls_sock_dtls +endif