Description:add Change kernel type from liteos_riscv to liteos_m

Reviewed-by:liubeibei
Change-Id: Ib690ae4bf2a3db4f6104879ec29867eaa6b4cbd0
This commit is contained in:
p00452466 2020-12-05 01:33:31 +08:00
parent 8c50e3a5b6
commit 3ebb6151cc
5 changed files with 124 additions and 132 deletions

View File

@ -28,30 +28,28 @@ lite_component("samgr") {
}
ndk_lib("samgr_lite_ndk") {
if(ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
lib_extension = ".a"
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
lib_extension = ".so"
}
deps = [
"samgr",
"communication/broadcast",
"samgr",
]
head_files = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
]
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
deps += [
"samgr_server:server",
deps += [ "samgr_server:server" ]
head_files += [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
]
head_files += ["//foundation/distributedschedule/interfaces/kits/samgr_lite/registry"]
}
}
generate_notice_file("samgr_notice_file") {
module_name = "samgr"
module_source_dir_list = [
"//third_party/bounds_checking_function"
]
module_source_dir_list = [ "//third_party/bounds_checking_function" ]
}

View File

@ -20,7 +20,7 @@ config("broadcast_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("broadcast") {
sources = [
"source/broadcast_service.c",

View File

@ -24,11 +24,11 @@ config("samgr_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("samgr") {
sources = [
"source/samgr_lite.c",
"registry/service_registry.c",
"source/samgr_lite.c",
]
public_configs = [ ":samgr_public" ]
@ -41,20 +41,18 @@ if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source"
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
shared_library("samgr") {
sources = [
"source/samgr_lite.c",
]
sources = [ "source/samgr_lite.c" ]
cflags = [
"-fPIC",
"-Wall"
"-Wall",
]
public_configs = [ ":samgr_public" ]
@ -65,9 +63,9 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
]
public_deps = [
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
"//foundation/distributedschedule/services/samgr_lite/samgr_client:client",
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
]
public_configs += [ ":external_settings_shared" ]

View File

@ -19,7 +19,7 @@ config("samgr_adapter_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("samgr_adapter") {
sources = [
"cmsis/memory_adapter.c",
@ -56,9 +56,7 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
"-fPIC",
"-Wall",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_shared",
]
public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
defines = [ "_GNU_SOURCE" ]
if (ohos_kernel_type == "linux") {
defines += [ "SAMGR_LINUX_ADAPTER" ]

View File

@ -21,23 +21,21 @@ config("samgr_source_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("samgr_source") {
sources = [
"common.c",
"iunknown.c",
"feature.c",
"service.c",
"iunknown.c",
"message.c",
"service.c",
"task_manager.c",
]
public_configs = [ ":samgr_source_public" ]
cflags = [ "-Wall" ]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter"
]
public_deps = [ "//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter" ]
include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite",
@ -50,23 +48,23 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
source_set("samgr_source") {
sources = [
"common.c",
"iunknown.c",
"feature.c",
"service.c",
"iunknown.c",
"message.c",
"service.c",
"task_manager.c",
]
cflags = [
"-fPIC",
"-Wall"
"-Wall",
]
public_configs = [ ":samgr_source_public" ]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//base/hiviewdfx/frameworks/hilog_lite/featured:hilog_shared",
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
]
include_dirs = [