!5 liteos-m refactoring

Merge pull request !5 from likailong/liteos_m-refactoring
This commit is contained in:
openharmony_ci 2020-11-16 14:52:06 +08:00 committed by Gitee
commit aeaf02da95
2 changed files with 78 additions and 83 deletions

View File

@ -12,50 +12,48 @@
# limitations under the License.
config("broadcast_public") {
include_dirs = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter",
"//utils/native/lite/include",
]
include_dirs = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter",
"//utils/native/lite/include",
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
static_library("broadcast") {
sources = [
"source/pub_sub_implement.c",
"source/pub_sub_feature.c",
"source/broadcast_service.c",
]
public_configs = [":broadcast_public"]
cflags = [ "-Wall" ]
include_dirs = [
"//kernel/liteos_m/components/cmsis",
]
}
static_library("broadcast") {
sources = [
"source/broadcast_service.c",
"source/pub_sub_feature.c",
"source/pub_sub_implement.c",
]
public_configs = [ ":broadcast_public" ]
cflags = [ "-Wall" ]
include_dirs = [ "//kernel/liteos_m/kal" ]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
shared_library("broadcast") {
sources = [
"source/pub_sub_implement.c",
"source/pub_sub_feature.c",
"source/broadcast_service.c",
]
public_configs = [":broadcast_public"]
configs -= [ "//build/lite/config:language_c" ]
cflags_c = [
"-std=c11",
"-Wall"
]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
"//kernel/liteos_a/kernel/common",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_shared",
"//foundation/distributedschedule/services/samgr_lite/samgr:samgr",
]
}
shared_library("broadcast") {
sources = [
"source/broadcast_service.c",
"source/pub_sub_feature.c",
"source/pub_sub_implement.c",
]
public_configs = [ ":broadcast_public" ]
configs -= [ "//build/lite/config:language_c" ]
cflags_c = [
"-std=c11",
"-Wall",
]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
"//kernel/liteos_a/kernel/common",
]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr:samgr",
"//third_party/bounds_checking_function:libsec_shared",
]
}
}

View File

@ -12,59 +12,56 @@
# limitations under the License.
config("samgr_adapter_public") {
include_dirs = [
"./",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
include_dirs = [
"./",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
static_library("samgr_adapter") {
sources = [
"cmsis/memory_adapter.c",
"cmsis/queue_adapter.c",
"cmsis/thread_adapter.c",
"cmsis/time_adapter.c",
]
static_library("samgr_adapter") {
sources = [
"cmsis/memory_adapter.c",
"cmsis/queue_adapter.c",
"cmsis/thread_adapter.c",
"cmsis/time_adapter.c",
]
public_configs = [":samgr_adapter_public"]
cflags = [ "-Wall" ]
public_configs = [ ":samgr_adapter_public" ]
cflags = [ "-Wall" ]
include_dirs = [
"//kernel/liteos_m/components/cmsis",
"//kernel/liteos_m/components/kal/include",
]
}
include_dirs = [ "//kernel/liteos_m/kal" ]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
source_set("samgr_adapter") {
sources = [
"posix/lock_free_queue.c",
"posix/memory_adapter.c",
"posix/queue_adapter.c",
"posix/thread_adapter.c",
"posix/time_adapter.c",
]
source_set("samgr_adapter") {
sources = [
"posix/lock_free_queue.c",
"posix/memory_adapter.c",
"posix/queue_adapter.c",
"posix/thread_adapter.c",
"posix/time_adapter.c",
]
public_configs = [":samgr_adapter_public"]
public_configs = [ ":samgr_adapter_public" ]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
cflags = [
"-fPIC",
"-Wall"
]
public_deps = [
"//third_party/bounds_checking_function:libsec_shared"
]
defines = [ "_GNU_SOURCE" ]
if (ohos_kernel_type == "linux") {
defines += [ "SAMGR_LINUX_ADAPTER" ]
}
cflags = [
"-fPIC",
"-Wall",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_shared",
]
defines = [ "_GNU_SOURCE" ]
if (ohos_kernel_type == "linux") {
defines += [ "SAMGR_LINUX_ADAPTER" ]
}
}
}