提交 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",
......
...@@ -11,11 +11,16 @@ ...@@ -11,11 +11,16 @@
# 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"
} else {
target_type = "shared_library"
}
sources = [ "src/kal.c" ]
cflags = [ "-Wall" ]
cflags_cc = cflags cflags_cc = cflags
include_dirs = [ include_dirs = [
......
...@@ -11,11 +11,16 @@ ...@@ -11,11 +11,16 @@
# 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"
} else {
target_type = "shared_library"
}
sources = [ "src/nativeapi_timer_task.c" ]
cflags = [ "-Wall" ]
cflags_cc = cflags cflags_cc = cflags
include_dirs = [ include_dirs = [
...@@ -24,7 +29,7 @@ shared_library("ace_kit_timer") { ...@@ -24,7 +29,7 @@ shared_library("ace_kit_timer") {
"//utils/native/lite/kal/timer/include", "//utils/native/lite/kal/timer/include",
] ]
if (ohos_kernel_type == "liteos_a") { if (ohos_kernel_type == "liteos_a") {
include_dirs += ["//third_party/musl/include"] include_dirs += [ "//third_party/musl/include" ]
} }
public_deps = ["//utils/native/lite/kal/timer:kal_timer"] 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.
先完成此消息的编辑!
想要评论请 注册