提交 91f2ac31 编写于 作者: O openharmony_ci 提交者: Gitee

!57 增加LiteOS-M内核的适配

Merge pull request !57 from SimonLi/master
...@@ -13,7 +13,14 @@ ...@@ -13,7 +13,14 @@
# limitations under the License. # limitations under the License.
# #
shared_library("ace_kit_common") { import("//build/lite/config/component/lite_component.gni")
lite_library("ace_kit_common") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
sources = [ "src/nativeapi_common.cpp" ] sources = [ "src/nativeapi_common.cpp" ]
cflags = [ "-Wall" ] cflags = [ "-Wall" ]
cflags_cc = cflags cflags_cc = cflags
......
...@@ -13,11 +13,17 @@ ...@@ -13,11 +13,17 @@
# limitations under the License. # limitations under the License.
# #
shared_library("ace_kit_deviceinfo") { import("//build/lite/config/component/lite_component.gni")
lite_library("ace_kit_deviceinfo") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
sources = [ "src/nativeapi_deviceinfo.cpp" ] sources = [ "src/nativeapi_deviceinfo.cpp" ]
cflags = [ "-Wall" ] cflags = [ "-Wall" ]
cflags_cc = cflags cflags_cc = cflags
ldflags = [ "-shared" ]
include_dirs = [ include_dirs = [
"include", "include",
......
...@@ -13,9 +13,15 @@ ...@@ -13,9 +13,15 @@
# limitations under the License. # limitations under the License.
# #
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/aafwk/path.gni") import("//build/lite/config/subsystem/aafwk/path.gni")
shared_library("ace_kit_file") { lite_library("ace_kit_file") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
sources = [ sources = [
"src/nativeapi_fs.cpp", "src/nativeapi_fs.cpp",
"src/nativeapi_fs_impl.c", "src/nativeapi_fs_impl.c",
......
...@@ -13,9 +13,15 @@ ...@@ -13,9 +13,15 @@
# limitations under the License. # limitations under the License.
# #
import("//build/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/aafwk/path.gni") import("//build/lite/config/subsystem/aafwk/path.gni")
shared_library("ace_kit_kvstore") { lite_library("ace_kit_kvstore") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
sources = [ sources = [
"src/nativeapi_kv.cpp", "src/nativeapi_kv.cpp",
"src/nativeapi_kv_impl.c", "src/nativeapi_kv_impl.c",
......
# Copyright (c) 2020 Huawei Device Co., Ltd. # Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
shared_library("kal_timer") { import("//build/lite/config/component/lite_component.gni")
sources = [
"src/kal.c", lite_library("kal_timer") {
] if (ohos_kernel_type == "liteos_m") {
cflags = ["-Wall"] target_type = "static_library"
cflags_cc = cflags } else {
target_type = "shared_library"
include_dirs = [ }
"include", sources = [ "src/kal.c" ]
"//utils/native/lite/include", cflags = [ "-Wall" ]
] cflags_cc = cflags
}
\ No newline at end of file include_dirs = [
"include",
"//utils/native/lite/include",
]
}
# Copyright (c) 2020 Huawei Device Co., Ltd. # Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, # distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
shared_library("ace_kit_timer") { import("//build/lite/config/component/lite_component.gni")
sources = [
"src/nativeapi_timer_task.c", lite_library("ace_kit_timer") {
] if (ohos_kernel_type == "liteos_m") {
cflags = ["-Wall"] target_type = "static_library"
cflags_cc = cflags } else {
target_type = "shared_library"
include_dirs = [ }
"include", sources = [ "src/nativeapi_timer_task.c" ]
"//utils/native/lite/include", cflags = [ "-Wall" ]
"//utils/native/lite/kal/timer/include", cflags_cc = cflags
]
if (ohos_kernel_type == "liteos_a") { include_dirs = [
include_dirs += ["//third_party/musl/include"] "include",
} "//utils/native/lite/include",
public_deps = ["//utils/native/lite/kal/timer:kal_timer"] "//utils/native/lite/kal/timer/include",
} ]
\ No newline at end of file if (ohos_kernel_type == "liteos_a") {
include_dirs += [ "//third_party/musl/include" ]
}
public_deps = [ "//utils/native/lite/kal/timer:kal_timer" ]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册