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") { 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" lib_extension = ".a"
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { } else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
lib_extension = ".so" lib_extension = ".so"
} }
deps = [ deps = [
"samgr",
"communication/broadcast", "communication/broadcast",
"samgr",
] ]
head_files = [ head_files = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast", "//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
] ]
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
deps += [ deps += [ "samgr_server:server" ]
"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") { generate_notice_file("samgr_notice_file") {
module_name = "samgr" module_name = "samgr"
module_source_dir_list = [ module_source_dir_list = [ "//third_party/bounds_checking_function" ]
"//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") { static_library("broadcast") {
sources = [ sources = [
"source/broadcast_service.c", "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") { static_library("samgr") {
sources = [ sources = [
"source/samgr_lite.c",
"registry/service_registry.c", "registry/service_registry.c",
"source/samgr_lite.c",
] ]
public_configs = [ ":samgr_public" ] public_configs = [ ":samgr_public" ]
@ -41,20 +41,18 @@ if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
public_deps = [ public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter", "//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") { if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
shared_library("samgr") { shared_library("samgr") {
sources = [ sources = [ "source/samgr_lite.c" ]
"source/samgr_lite.c",
]
cflags = [ cflags = [
"-fPIC", "-fPIC",
"-Wall" "-Wall",
] ]
public_configs = [ ":samgr_public" ] public_configs = [ ":samgr_public" ]
@ -65,9 +63,9 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
] ]
public_deps = [ public_deps = [
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source", "//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
"//foundation/distributedschedule/services/samgr_lite/samgr_client:client", "//foundation/distributedschedule/services/samgr_lite/samgr_client:client",
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
] ]
public_configs += [ ":external_settings_shared" ] 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") { static_library("samgr_adapter") {
sources = [ sources = [
"cmsis/memory_adapter.c", "cmsis/memory_adapter.c",
@ -56,9 +56,7 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
"-fPIC", "-fPIC",
"-Wall", "-Wall",
] ]
public_deps = [ public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
"//third_party/bounds_checking_function:libsec_shared",
]
defines = [ "_GNU_SOURCE" ] defines = [ "_GNU_SOURCE" ]
if (ohos_kernel_type == "linux") { if (ohos_kernel_type == "linux") {
defines += [ "SAMGR_LINUX_ADAPTER" ] 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") { static_library("samgr_source") {
sources = [ sources = [
"common.c", "common.c",
"iunknown.c",
"feature.c", "feature.c",
"service.c", "iunknown.c",
"message.c", "message.c",
"service.c",
"task_manager.c", "task_manager.c",
] ]
public_configs = [ ":samgr_source_public" ] public_configs = [ ":samgr_source_public" ]
cflags = [ "-Wall" ] cflags = [ "-Wall" ]
public_deps = [ public_deps = [ "//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter" ]
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter"
]
include_dirs = [ include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite", "//base/hiviewdfx/interfaces/kits/hilog_lite",
@ -50,23 +48,23 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
source_set("samgr_source") { source_set("samgr_source") {
sources = [ sources = [
"common.c", "common.c",
"iunknown.c",
"feature.c", "feature.c",
"service.c", "iunknown.c",
"message.c", "message.c",
"service.c",
"task_manager.c", "task_manager.c",
] ]
cflags = [ cflags = [
"-fPIC", "-fPIC",
"-Wall" "-Wall",
] ]
public_configs = [ ":samgr_source_public" ] public_configs = [ ":samgr_source_public" ]
public_deps = [ public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//base/hiviewdfx/frameworks/hilog_lite/featured:hilog_shared", "//base/hiviewdfx/frameworks/hilog_lite/featured:hilog_shared",
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
] ]
include_dirs = [ include_dirs = [