feat(build): support Kconfig

Kconfig usages are the same with liteos_a

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I9aacbb69da88d5427cced89d1a49cb1041afa998
This commit is contained in:
Caoruihong
2021-10-25 20:01:37 +08:00
parent f3631fa266
commit 7e673430dc
48 changed files with 2020 additions and 549 deletions

View File

@@ -27,9 +27,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_m/config.gni")
import("//kernel/liteos_m/liteos.gni")
static_library("shell") {
module_switch = defined(LOSCFG_SHELL)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"src/base/shcmd.c",
"src/base/shcmdparse.c",
@@ -42,21 +44,11 @@ static_library("shell") {
"src/cmds/task_shellcmd.c",
"src/cmds/vfs_shellcmd.c",
]
include_dirs = [
"../../kernel/arch/include",
"../../kernel/include",
"../../utils",
"./include",
]
configs += [ "$LITEOSTOPDIR:los_config" ]
if (enable_ohos_kernel_liteos_m_lwip) {
if (defined(LOSCFG_NET_LWIP_SACK)) {
defines = [ "LWIP_SHELLCMD_ENABLE" ]
}
deps = [
"//kernel/liteos_m/kal/posix",
"//third_party/bounds_checking_function:libsec_static",
]
}
config("public") {
include_dirs = [ "include" ]
}