• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/ndk/ndk.gni")
15
16generate_notice_file("bundle_notice_file") {
17  module_name = "bundle"
18  module_source_dir_list = [
19    "//third_party/bounds_checking_function",
20    "//third_party/cJSON",
21  ]
22}
23
24lite_component("appexecfwk_kits_lite") {
25  features = [ ":bundle" ]
26}
27
28lite_library("bundle") {
29  if (ohos_kernel_type == "liteos_m") {
30    target_type = "static_library"
31
32    sources = [
33      "src/ability_info.cpp",
34      "src/ability_info_utils.cpp",
35      "src/bundle_info.cpp",
36      "src/bundle_info_utils.cpp",
37      "src/element_name.cpp",
38      "src/module_info.cpp",
39      "src/module_info_utils.cpp",
40      "src/slite/bundle_manager.cpp",
41      "src/slite/bundle_manager_inner.cpp",
42      "src/slite/bundlems_slite_client.cpp",
43    ]
44
45    public_deps = [
46      "${aafwk_lite_path}/frameworks/want_lite:want",
47      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
48    ]
49
50    include_dirs = [
51      "${appexecfwk_lite_path}/services/bundlemgr_lite/include",
52      "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite/slite",
53      "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite",
54      "${appexecfwk_lite_path}/interfaces/kits/bundle_lite/slite",
55      "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
56      "${appexecfwk_lite_path}/utils/bundle_lite",
57      "${appexecfwk_lite_path}/frameworks/bundle_lite/include",
58      "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
59      "//base/security/permission_lite/interfaces/kits",
60      "//base/security/permission_lite/services/pms/include",
61      "${aafwk_lite_path}/frameworks/want_lite/include",
62      "${aafwk_lite_path}/interfaces/kits/want_lite",
63      "${aafwk_lite_path}/interfaces/kits/ability_lite/slite",
64      "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
65      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
66      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
67      "//third_party/bounds_checking_function/include",
68      "//commonlibrary/utils_lite/include",
69      "//commonlibrary/utils_lite/memory/include",
70      "//third_party/cJSON",
71    ]
72  } else {
73    target_type = "shared_library"
74
75    sources = [
76      "src/ability_info.cpp",
77      "src/ability_info_utils.cpp",
78      "src/bundle_callback.cpp",
79      "src/bundle_callback_utils.cpp",
80      "src/bundle_info.cpp",
81      "src/bundle_info_utils.cpp",
82      "src/bundle_manager.cpp",
83      "src/bundle_self_callback.cpp",
84      "src/convert_utils.cpp",
85      "src/element_name.cpp",
86      "src/module_info.cpp",
87      "src/module_info_utils.cpp",
88      "src/token_generate.cpp",
89    ]
90
91    deps = [
92      "${aafwk_lite_path}/frameworks/want_lite:want",
93      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
94      "//base/security/permission_lite/services/pms_client:pms_client",
95    ]
96
97    include_dirs = [
98      "include",
99      "//base/security/permission_lite/interfaces/kits",
100      "//base/security/permission_lite/services/pms/include",
101      "${aafwk_lite_path}/frameworks/want_lite/include",
102      "${aafwk_lite_path}/interfaces/kits/want_lite",
103      "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
104      "${appexecfwk_lite_path}/interfaces/inner_api/bundlemgr_lite",
105      "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
106      "${appexecfwk_lite_path}/utils/bundle_lite",
107      "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include",
108      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
109      "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
110      "//third_party/bounds_checking_function/include",
111      "//commonlibrary/utils_lite/include",
112      "//third_party/cJSON",
113    ]
114
115    defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
116  }
117
118  if (board_toolchain_type != "iccarm") {
119    cflags = [
120      "-fPIC",
121      "-Wall",
122      "-Wno-format",
123    ]
124    cflags_cc = cflags
125  }
126}
127
128ndk_lib("bundle_notes") {
129  lib_extension = ".so"
130  deps = [ ":bundle" ]
131  head_files = [ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite" ]
132}
133