external/wakaama : modify dependency for wakaama app. and DM
authorSeongeun Choi <seongeun.choi@samsung.com>
Mon, 22 May 2017 01:10:53 +0000 (10:10 +0900)
committerEunBong Song <eunb.song@samsung.com>
Tue, 11 Jul 2017 01:26:56 +0000 (10:26 +0900)
Currently, for building wakama, DM should be enabled.
This commit separates wakama and DM fraomework.

Change-Id: I68bf11cdfd903f9e4941e9a5da3be35cefc653f5
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
apps/system/init/init.c
apps/system/utils/netcmd.c
external/Kconfig
external/Makefile
external/wakaama/core/Make.defs
external/wakaama/core/er-coap-13/Make.defs
external/wakaama/examples/bootstrap_server/Make.defs
external/wakaama/examples/client/Make.defs
external/wakaama/examples/lightclient/Make.defs
external/wakaama/examples/server/Make.defs
external/wakaama/examples/shared/Make.defs

index 5d5e360..cc4c540 100644 (file)
@@ -49,7 +49,7 @@
 #undef CONFIG_LIB_USRWORK
 #endif
 
-#ifdef CONFIG_LWM2M_WAKAAMA
+#ifdef CONFIG_DM
 extern void dm_cb_register_init(void);
 #endif
 
@@ -116,7 +116,7 @@ int preapp_start(int argc, char *argv[])
        }
 #endif
 
-#ifdef CONFIG_LWM2M_WAKAAMA
+#ifdef CONFIG_DM
        dm_cb_register_init();
 #endif
 
index 0d3be96..244fc37 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 {
@@ -585,12 +587,14 @@ 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 78c72c3..d8e9e3c 100644 (file)
@@ -1,11 +1,4 @@
 
-config DM
-       bool "DM"
-       default n
-       depends on NET
-       ---help---
-               enable the DM functionality
-if DM
 config LWM2M_WAKAAMA
        bool "LWM2M_WAKAAMA"
        default y
@@ -13,21 +6,29 @@ config LWM2M_WAKAAMA
                enable LWM2M WAKAAMA external feature
 
 if LWM2M_WAKAAMA
+
 choice
-       prompt "LWM2M WAKAAMA example"
+       prompt "LWM2M WAKAAMA modes"
        default LWM2M_CLIENT_MODE
 
 config LWM2M_CLIENT_MODE
        bool "CLIENT_MODE"
        ---help---
-               enable LWM2M WAKAAMA client example
+               enable LWM2M WAKAAMA client mode
 
 config LWM2M_SERVER_MODE
        bool "SERVER_MODE"
        ---help---
-               enable LWM2M WAKAAMA server example
+               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
@@ -45,6 +46,15 @@ config LWM2M_SECURITY
                This definition is for enabling COAP over TLS and DTLS.
 endif
 
+config DM
+    bool "DM"
+    default n
+    depends on NET
+       select LWM2M_WAKAAMA
+    ---help---
+        enable the DM functionality
+
+if DM
 menuconfig DM_WIFI
        bool "Set Up Wifi Info For DM Demo"
        default y
index addacd5..c61a9cc 100644 (file)
@@ -45,18 +45,19 @@ CSRCS =
 VPATH = .
 
 
-ifeq ($(CONFIG_DM),y)
-ifeq ($(CONFIG_LWM2M_WAKAAMA),y)
+ifneq ($(CONFIG_DM)$(CONFIG_EXTERNAL_WAKAAMA_EXAMPLE),)
 include wakaama/core/Make.defs
 include wakaama/core/er-coap-13/Make.defs
 include wakaama/examples/shared/Make.defs
-endif
 ifeq ($(CONFIG_LWM2M_CLIENT_MODE),y)
 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
+endif
 endif
 
 ifeq ($(CONFIG_ENABLE_IOTIVITY),y)
@@ -70,10 +71,6 @@ include libtuv/source/unix/Make.defs
 include libtuv/source/Make.defs
 endif
 
-ifeq ($(CONFIG_DM),y)
-CFLAGS+=-I$(TOPDIR)/../framework/include/dm
-endif
-
 AOBJS = $(ASRCS:.S=$(OBJEXT))
 COBJS = $(CSRCS:.c=$(OBJEXT))
 
index 515dea7..bf7f1bc 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 # Routing table support
 CSRCS += block1.c
 CSRCS += management.c objects.c observe.c data.c discover.c packet.c registration.c transaction.c utils.c list.c liblwm2m.c json.c bootstrap.c
@@ -64,5 +62,3 @@ CFLAGS+=-I$(TOPDIR)/../external/wakaama/core
 
 DEPPATH += --dep-path wakaama/core
 VPATH += :wakaama/core
-
-endif
index d2e517a..53f500a 100644 (file)
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 # Routing table support
 
 CSRCS += er-coap-13.c
 
 DEPPATH += --dep-path wakaama/core/er-coap-13
 VPATH += :wakaama/core/er-coap-13
-
-endif
index e26c3c3..4acbf0b 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 # Routing table support
 
 CSRCS = bootstrap_info.c
@@ -42,5 +40,3 @@ MAINSRC = bootstrap_server.c
 
 DEPPATH += --dep-path wakaama/examples/bootstrap_server
 VPATH += :wakaama/examples/bootstrap_server
-
-endif
index 0152399..d0a58fb 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 CSRCS += lwm2mclient.c
 CSRCS += object_access_control.c
 CSRCS += object_connectivity_moni.c object_connectivity_stat.c
@@ -61,5 +59,3 @@ endif
 
 DEPPATH += --dep-path wakaama/examples/client
 VPATH += :wakaama/examples/client
-
-endif
index d2701c9..557bda5 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 # Routing table support
 
 CSRCS = object_device.c object_security.c object_server.c test_object.c
@@ -43,5 +41,3 @@ MAINSRC = lightclient.c
 
 DEPPATH += --dep-path wakaama/examples/lightclient
 VPATH += :wakaama/examples/lightclient
-
-endif
index 5e1d0bb..7da97bb 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 CSRCS += lwm2mserver.c
 
 CFLAGS+=-I$(TOPDIR)/../external/wakaama/core
@@ -48,5 +46,3 @@ endif
 
 DEPPATH += --dep-path wakaama/examples/server
 VPATH += :wakaama/examples/server
-
-endif
index 80d1943..bf7424d 100644 (file)
@@ -33,8 +33,6 @@
 #
 ############################################################################
 
-ifeq ($(CONFIG_DM),y)
-
 # Routing table support
 
 CSRCS += commandline.c connection.c platform.c memtrace.c
@@ -42,5 +40,3 @@ CFLAGS+=-I$(TOPDIR)/../external/wakaama/core
 
 DEPPATH += --dep-path wakaama/examples/shared
 VPATH += :wakaama/examples/shared
-
-endif