From b520fade03481d349682975a79504d5e03731c60 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 29 Nov 2017 14:06:28 +0100 Subject: [PATCH] sys/net/nanocoap: use submodules --- Makefile.dep | 8 ++++++-- makefiles/pseudomodules.inc.mk | 1 + sys/net/application_layer/nanocoap/Makefile | 1 + .../nanocoap/{nanocoap_sock.c => sock.c} | 0 4 files changed, 8 insertions(+), 2 deletions(-) rename sys/net/application_layer/nanocoap/{nanocoap_sock.c => sock.c} (100%) diff --git a/Makefile.dep b/Makefile.dep index d71c668d6ba19..55197c2794668 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -721,14 +721,18 @@ ifneq (,$(filter l2filter_%,$(USEMODULE))) endif ifneq (,$(filter gcoap,$(USEMODULE))) -USEMODULE += nanocoap -USEMODULE += gnrc_sock_udp + USEMODULE += nanocoap + USEMODULE += gnrc_sock_udp endif ifneq (,$(filter luid,$(USEMODULE))) FEATURES_OPTIONAL += periph_cpuid endif +ifneq (,$(filter nanocoap_%,$(USEMODULE))) + USEMODULE += nanocoap +endif + # always select gpio (until explicit dependencies are sorted out) FEATURES_OPTIONAL += periph_gpio diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index 9bf81c929c5ac..1b499d119230a 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -46,6 +46,7 @@ PSEUDOMODULES += lwip_tcp PSEUDOMODULES += lwip_udp PSEUDOMODULES += lwip_udplite PSEUDOMODULES += mpu_stack_guard +PSEUDOMODULES += nanocoap_% PSEUDOMODULES += netdev_default PSEUDOMODULES += netif PSEUDOMODULES += netstats diff --git a/sys/net/application_layer/nanocoap/Makefile b/sys/net/application_layer/nanocoap/Makefile index 48422e909a47d..00260ac087b61 100644 --- a/sys/net/application_layer/nanocoap/Makefile +++ b/sys/net/application_layer/nanocoap/Makefile @@ -1 +1,2 @@ +SUBMODULES := 1 include $(RIOTBASE)/Makefile.base diff --git a/sys/net/application_layer/nanocoap/nanocoap_sock.c b/sys/net/application_layer/nanocoap/sock.c similarity index 100% rename from sys/net/application_layer/nanocoap/nanocoap_sock.c rename to sys/net/application_layer/nanocoap/sock.c