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>
#undef CONFIG_LIB_USRWORK
#endif
-#ifdef CONFIG_LWM2M_WAKAAMA
+#ifdef CONFIG_DM
extern void dm_cb_register_init(void);
#endif
}
#endif
-#ifdef CONFIG_LWM2M_WAKAAMA
+#ifdef CONFIG_DM
dm_cb_register_init();
#endif
#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 {
#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}
};
-config DM
- bool "DM"
- default n
- depends on NET
- ---help---
- enable the DM functionality
-if DM
config LWM2M_WAKAAMA
bool "LWM2M_WAKAAMA"
default y
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
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
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)
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))
#
############################################################################
-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
DEPPATH += --dep-path wakaama/core
VPATH += :wakaama/core
-
-endif
#
############################################################################
-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
#
############################################################################
-ifeq ($(CONFIG_DM),y)
-
# Routing table support
CSRCS = bootstrap_info.c
DEPPATH += --dep-path wakaama/examples/bootstrap_server
VPATH += :wakaama/examples/bootstrap_server
-
-endif
#
############################################################################
-ifeq ($(CONFIG_DM),y)
-
CSRCS += lwm2mclient.c
CSRCS += object_access_control.c
CSRCS += object_connectivity_moni.c object_connectivity_stat.c
DEPPATH += --dep-path wakaama/examples/client
VPATH += :wakaama/examples/client
-
-endif
#
############################################################################
-ifeq ($(CONFIG_DM),y)
-
# Routing table support
CSRCS = object_device.c object_security.c object_server.c test_object.c
DEPPATH += --dep-path wakaama/examples/lightclient
VPATH += :wakaama/examples/lightclient
-
-endif
#
############################################################################
-ifeq ($(CONFIG_DM),y)
-
CSRCS += lwm2mserver.c
CFLAGS+=-I$(TOPDIR)/../external/wakaama/core
DEPPATH += --dep-path wakaama/examples/server
VPATH += :wakaama/examples/server
-
-endif
#
############################################################################
-ifeq ($(CONFIG_DM),y)
-
# Routing table support
CSRCS += commandline.c connection.c platform.c memtrace.c
DEPPATH += --dep-path wakaama/examples/shared
VPATH += :wakaama/examples/shared
-
-endif