From 025ea0c2d6a4e799e8ea32d4bd1d16c27f504986 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Tue, 11 Jul 2017 10:46:09 +0900 Subject: [PATCH] external/wakaama: clean up the wakaama build tree This commit seperates dependency between lwm2m core library and device management application(DM app). 1. Do not build external wakaama examples without device management configuration. Now that under wakaama/examples/ source codes are only for DM framework. 2. Now that user can build only wakaama core library. Signed-off-by: Junyeon LEE Signed-off-by: EunBong Song --- apps/system/utils/netcmd.c | 16 ---------------- external/Kconfig | 7 ------- external/Makefile | 19 ++++++++++--------- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/apps/system/utils/netcmd.c b/apps/system/utils/netcmd.c index e5825d8..6986ced 100644 --- a/apps/system/utils/netcmd.c +++ b/apps/system/utils/netcmd.c @@ -79,14 +79,6 @@ #ifdef CONFIG_SYSTEM_NETDB extern int netdb_main(int argc, char *argv[]); #endif -#ifdef CONFIG_EXTERNAL_WAKAAMA_EXAMPLE -#ifdef CONFIG_LWM2M_CLIENT_MODE -extern int lwm2m_client_main(int argc, char *argv[]); -#endif -#ifdef CONFIG_LWM2M_SERVER_MODE -extern int lwm2m_server_main(int argc, char *argv[]); -#endif -#endif #if defined(CONFIG_NETUTILS_TFTPC) struct tftpc_args_s { @@ -587,14 +579,6 @@ const static tash_cmdlist_t net_appcmds[] = { #ifdef CONFIG_SYSTEM_NETDB {"netdb", netdb_main, TASH_EXECMD_SYNC}, #endif -#ifdef CONFIG_EXTERNAL_WAKAAMA_EXAMPLE -#ifdef CONFIG_LWM2M_CLIENT_MODE - {"lwm2mclient", lwm2m_client_main, TASH_EXECMD_SYNC}, -#endif -#ifdef CONFIG_LWM2M_SERVER_MODE - {"lwm2mserver", lwm2m_server_main, TASH_EXECMD_SYNC}, -#endif -#endif {NULL, NULL, 0} }; diff --git a/external/Kconfig b/external/Kconfig index 8e836fa..f7cd6f7 100644 --- a/external/Kconfig +++ b/external/Kconfig @@ -22,13 +22,6 @@ config LWM2M_SERVER_MODE enable LWM2M WAKAAMA server mode endchoice -config EXTERNAL_WAKAAMA_EXAMPLE - bool "EXTERNAL_WAKAAMA_EXAMPLE" - depends on LWM2M_CLIENT_MODE || LWM2M_SERVER_MODE - default n - ---help--- - enable LWM2M WAKAAMA server or client example - config LWM2M_LITTLE_ENDIAN bool "LITTLE_ENDIAN" default y diff --git a/external/Makefile b/external/Makefile index df3f416..1bfca81 100644 --- a/external/Makefile +++ b/external/Makefile @@ -44,20 +44,21 @@ ASRCS = CSRCS = VPATH = . - -ifneq ($(CONFIG_DM)$(CONFIG_EXTERNAL_WAKAAMA_EXAMPLE),) +ifeq ($(CONFIG_LWM2M_WAKAAMA),y) include wakaama/core/Make.defs -include wakaama/core/er-coap-13/Make.defs -include wakaama/examples/shared/Make.defs +include wakaama/core/er-coap-13/Make.defs +endif + +ifeq ($(CONFIG_DM),y) ifeq ($(CONFIG_LWM2M_CLIENT_MODE),y) -include wakaama/examples/client/Make.defs + include wakaama/examples/shared/Make.defs + include wakaama/examples/client/Make.defs endif ifeq ($(CONFIG_LWM2M_SERVER_MODE),y) -include wakaama/examples/server/Make.defs -endif -ifeq ($(CONFIG_DM),y) -CFLAGS+=-I$(TOPDIR)/../framework/include/dm + include wakaama/examples/shared/Make.defs + include wakaama/examples/server/Make.defs endif + CFLAGS+=-I$(TOPDIR)/../framework/include/dm endif ifeq ($(CONFIG_ENABLE_IOTIVITY),y) -- 2.7.4