external: split Kconfig for each module
authorsunghan <sh924.chang@samsung.com>
Fri, 22 Sep 2017 12:21:30 +0000 (21:21 +0900)
committersunghan <sh924.chang@samsung.com>
Fri, 22 Sep 2017 12:21:30 +0000 (21:21 +0900)
Each module had better have an independent Kconfig. Putting all of configs
in one Kconfig makes bad readability and maintenance.
The Kconfig on external gets a functionality calling each Kconfig.

external/Kconfig
external/aws/Kconfig [new file with mode: 0644]
external/iotivity/Kconfig [new file with mode: 0644]
external/libtuv/Kconfig [new file with mode: 0644]
external/wakaama/Kconfig [new file with mode: 0644]

index e80cdca..cc88f0d 100644 (file)
@@ -3,138 +3,9 @@
 # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
 #
 
-config LWM2M_WAKAAMA
-       bool "LWM2M_WAKAAMA"
-       default n
-       depends on LIBC_NETDB
-       ---help---
-               enable LWM2M WAKAAMA external feature
-
-if LWM2M_WAKAAMA
-
-choice
-       prompt "LWM2M WAKAAMA modes"
-       default LWM2M_CLIENT_MODE
-
-config LWM2M_CLIENT_MODE
-       bool "CLIENT_MODE"
-       ---help---
-               enable LWM2M WAKAAMA client mode
-
-config LWM2M_SERVER_MODE
-       bool "SERVER_MODE"
-       ---help---
-               enable LWM2M WAKAAMA server mode
-endchoice
-
-config LWM2M_LITTLE_ENDIAN
-       bool "LITTLE_ENDIAN"
-       default y
-       ---help---
-               LWM2M supports LITTLE_ENDIAN and BIG_ENDIAN mode.
-               according to server configuration, LWM2M client should match it.
-               default value is LITTLE_ENDIAN and if you do not select as LITTLE_ENDIAN,
-               BIG_ENDIAN will be used instead of it
-endif
-
-menuconfig ENABLE_IOTIVITY
-       bool "enable / disable iotivity stack"
-       default n
-       select LIBC_NETDB
-       select TIME_EXTENDED
-       select ARCH_STDARG_H
-       ---help---
-               select to enable the iotivity stack in tinyara
-
-if ENABLE_IOTIVITY
-
-comment "IOTIVITY Config Parameters"
-
-config IOTIVITY_RELEASE_VERSION
-       string "iotivity stack version"
-       default "1.2-rel"
-       ---help---
-               define this to iotivity stack release veriosn in use
-
-config IOTIVITY_ROUTING
-       string "Enable routing, allowed values : 'EP' / 'GW' "
-       default "EP"
-       ---help---
-               define this to enable routing, allowed values : 'EP' / 'GW'
-
-config IOTIVITY_PTHREAD_STACKSIZE
-       int "Default pthread stack size for iotivity threads"
-       default 8192
-       ---help---
-               Default pthread stack size for iotivity threads
-
-config IOTIVITY_QUEING_PTHREAD_STACKSIZE
-       int "Default pthread stack size for the queing thread"
-       default 3072
-       ---help---
-               Default pthread stack size for the queing thread
-
-config IOTIVITY_RETRANSMIT_PTHREAD_STACKSIZE
-       int "Default pthread stack size for the retransmission pthread"
-       default 1024
-       ---help---
-               Default pthread stack size for the retransmission pthread
-
-config IOTIVITY_TCPRECEIVE_PTHREAD_STACKSIZE
-       int "Default pthread stack size for the TCP-receive thread"
-       default 8192
-       ---help---
-               Default pthread stack size for the TCP-receive thread
-
-config IOTIVITY_RECEIVEHANDLER_PTHREAD_STACKSIZE
-       int "Default pthread stack size for the receive-handler thread"
-       default 8192
-       ---help---
-               Default pthread stack size for the receive-handler thread
-
-config ENABLE_IOTIVITY_SECURED
-       bool "enable iotivity security"
-       default n
-       ---help---
-               select to enable the security for iotivity stack in tinyara
-
-config ENABLE_IOTIVITY_CLOUD
-       bool "enable iotivity cloud"
-       default n
-       ---help---
-               select to enable the cloud for iotivity stack in tinyara
-
-config IOTIVITY_RELEASE
-       bool "Set Iotivity to Release mode"
-       default y
-       ---help---
-               select to build IoTivity in Release mode. Code will be optimized.
-
-config IOTIVITY_DEBUG
-        bool "enable iotivity stack logs"
-        default n
-        ---help---
-                select to enable all iotivity stack logs (DEBUG / INFO etc.)
-
-config IOTIVITY_NS_PROVIDER
-        bool "enable iotivity notification service(provider only)"
-        default n
-        ---help---
-                select to enable iotivity Notification Provider Service
-
-endif # ENABLE_IOTIVITY
-
-config LIBTUV
-       bool "libtuv"
-       default n
-       ---help---
-               enable libtuv
-
-config AWS_SDK
-       bool "AWS IoT SDK"
-       default n
-       ---help---
-               enable AWS IoT Device SDK
-
-source "$EXTERNALDIR/json/Kconfig"
+source "$EXTERNALDIR/aws/Kconfig"
 source "$EXTERNALDIR/codecs/Kconfig"
+source "$EXTERNALDIR/iotivity/Kconfig"
+source "$EXTERNALDIR/json/Kconfig"
+source "$EXTERNALDIR/libtuv/Kconfig"
+source "$EXTERNALDIR/wakaama/Kconfig"
diff --git a/external/aws/Kconfig b/external/aws/Kconfig
new file mode 100644 (file)
index 0000000..3417ca0
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# For a description of the syntax of this configuration file,
+# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
+#
+
+config AWS_SDK
+       bool "AWS IoT SDK"
+       default n
+       ---help---
+               enable AWS IoT Device SDK
+
diff --git a/external/iotivity/Kconfig b/external/iotivity/Kconfig
new file mode 100644 (file)
index 0000000..adcf35a
--- /dev/null
@@ -0,0 +1,91 @@
+#
+# For a description of the syntax of this configuration file,
+# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
+#
+
+menuconfig ENABLE_IOTIVITY
+       bool "enable / disable iotivity stack"
+       default n
+       select LIBC_NETDB
+       select TIME_EXTENDED
+       select ARCH_STDARG_H
+       ---help---
+               select to enable the iotivity stack in tinyara
+
+if ENABLE_IOTIVITY
+
+comment "IOTIVITY Config Parameters"
+
+config IOTIVITY_RELEASE_VERSION
+       string "iotivity stack version"
+       default "1.2-rel"
+       ---help---
+               define this to iotivity stack release veriosn in use
+
+config IOTIVITY_ROUTING
+       string "Enable routing, allowed values : 'EP' / 'GW' "
+       default "EP"
+       ---help---
+               define this to enable routing, allowed values : 'EP' / 'GW'
+
+config IOTIVITY_PTHREAD_STACKSIZE
+       int "Default pthread stack size for iotivity threads"
+       default 8192
+       ---help---
+               Default pthread stack size for iotivity threads
+
+config IOTIVITY_QUEING_PTHREAD_STACKSIZE
+       int "Default pthread stack size for the queing thread"
+       default 3072
+       ---help---
+               Default pthread stack size for the queing thread
+
+config IOTIVITY_RETRANSMIT_PTHREAD_STACKSIZE
+       int "Default pthread stack size for the retransmission pthread"
+       default 1024
+       ---help---
+               Default pthread stack size for the retransmission pthread
+
+config IOTIVITY_TCPRECEIVE_PTHREAD_STACKSIZE
+       int "Default pthread stack size for the TCP-receive thread"
+       default 8192
+       ---help---
+               Default pthread stack size for the TCP-receive thread
+
+config IOTIVITY_RECEIVEHANDLER_PTHREAD_STACKSIZE
+       int "Default pthread stack size for the receive-handler thread"
+       default 8192
+       ---help---
+               Default pthread stack size for the receive-handler thread
+
+config ENABLE_IOTIVITY_SECURED
+       bool "enable iotivity security"
+       default n
+       ---help---
+               select to enable the security for iotivity stack in tinyara
+
+config ENABLE_IOTIVITY_CLOUD
+       bool "enable iotivity cloud"
+       default n
+       ---help---
+               select to enable the cloud for iotivity stack in tinyara
+
+config IOTIVITY_RELEASE
+       bool "Set Iotivity to Release mode"
+       default y
+       ---help---
+               select to build IoTivity in Release mode. Code will be optimized.
+
+config IOTIVITY_DEBUG
+        bool "enable iotivity stack logs"
+        default n
+        ---help---
+                select to enable all iotivity stack logs (DEBUG / INFO etc.)
+
+config IOTIVITY_NS_PROVIDER
+        bool "enable iotivity notification service(provider only)"
+        default n
+        ---help---
+                select to enable iotivity Notification Provider Service
+
+endif # ENABLE_IOTIVITY
diff --git a/external/libtuv/Kconfig b/external/libtuv/Kconfig
new file mode 100644 (file)
index 0000000..0779794
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# For a description of the syntax of this configuration file,
+# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
+#
+
+config LIBTUV
+       bool "libtuv"
+       default n
+       ---help---
+               enable libtuv
+
diff --git a/external/wakaama/Kconfig b/external/wakaama/Kconfig
new file mode 100644 (file)
index 0000000..54509e7
--- /dev/null
@@ -0,0 +1,38 @@
+#
+# For a description of the syntax of this configuration file,
+# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
+#
+
+config LWM2M_WAKAAMA
+       bool "LWM2M_WAKAAMA"
+       default n
+       depends on LIBC_NETDB
+       ---help---
+               enable LWM2M WAKAAMA external feature
+
+if LWM2M_WAKAAMA
+
+choice
+       prompt "LWM2M WAKAAMA modes"
+       default LWM2M_CLIENT_MODE
+
+config LWM2M_CLIENT_MODE
+       bool "CLIENT_MODE"
+       ---help---
+               enable LWM2M WAKAAMA client mode
+
+config LWM2M_SERVER_MODE
+       bool "SERVER_MODE"
+       ---help---
+               enable LWM2M WAKAAMA server mode
+endchoice
+
+config LWM2M_LITTLE_ENDIAN
+       bool "LITTLE_ENDIAN"
+       default y
+       ---help---
+               LWM2M supports LITTLE_ENDIAN and BIG_ENDIAN mode.
+               according to server configuration, LWM2M client should match it.
+               default value is LITTLE_ENDIAN and if you do not select as LITTLE_ENDIAN,
+               BIG_ENDIAN will be used instead of it
+endif