libc: clear Kconfig and CMakeLists dependencies [1/6]

PD#SWPL-92088

Problem:
clear Kconfig and CMakeLists dependencies

Solution:
clear Kconfig and CMakeLists dependencies

Verify:
N/A

Change-Id: I9136a31e5dd7f245cde58571b29790b97fbcd77d
Signed-off-by: xiaohu.huang <xiaohu.huang@amlogic.com>
diff --git a/Kconfig b/Kconfig
index d879f5d..bf70dfb 100644
--- a/Kconfig
+++ b/Kconfig
@@ -2,8 +2,20 @@
 
 # SPDX-License-Identifier: MIT
 
-menu "libc selection"
-rsource "aml/Kconfig"
-rsource "newlib/Kconfig"
-rsource "qlibc/Kconfig"
-endmenu
+menuconfig LIBC
+	bool "Generic_C_lib"
+	select LIBC_AML if RISCV
+	select LIBC_STD if ARM64 || ARM
+	select QLIBC if ARM64
+	help
+	  Select generic C library
+
+if LIBC
+if RISCV
+	rsource "aml/Kconfig"
+endif
+if ARM || ARM64
+	rsource "newlib/Kconfig"
+	rsource "qlibc/Kconfig"
+endif
+endif
\ No newline at end of file