external/wakaama: clean up the wakaama build tree
authorEunBong Song <eunb.song@samsung.com>
Tue, 11 Jul 2017 01:46:09 +0000 (10:46 +0900)
committerEunBong Song <eunb.song@samsung.com>
Tue, 11 Jul 2017 11:10:29 +0000 (20:10 +0900)
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 <junyeon2.lee@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
apps/system/utils/netcmd.c
external/Kconfig
external/Makefile

index e5825d8..6986ced 100644 (file)
 #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}
 };
 
index 8e836fa..f7cd6f7 100644 (file)
@@ -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
index df3f416..1bfca81 100644 (file)
@@ -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)