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/innerkits/bundlemgr_lite/slite", 53 "${appexecfwk_lite_path}/interfaces/innerkits/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/security/permission/interfaces/kits/permission_lite", 59 "//base/security/permission/services/permission_lite/pms/include", 60 "${aafwk_lite_path}/frameworks/want_lite/include", 61 "${aafwk_lite_path}/interfaces/kits/want_lite", 62 "${aafwk_lite_path}/interfaces/kits/ability_lite/slite", 63 "${aafwk_lite_path}/interfaces/innerkits/abilitymgr_lite", 64 "//foundation/communication/ipc_lite/interfaces/kits", 65 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 66 "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", 67 "//third_party/bounds_checking_function/include", 68 "//utils/native/lite/include", 69 "//utils/native/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/services/permission_lite/pms_client:pms_client", 95 ] 96 97 include_dirs = [ 98 "include", 99 "//base/security/permission/interfaces/kits/permission_lite", 100 "//base/security/permission/services/permission_lite/pms/include", 101 "${aafwk_lite_path}/frameworks/want_lite/include", 102 "${aafwk_lite_path}/interfaces/kits/want_lite", 103 "${aafwk_lite_path}/interfaces/innerkits/abilitymgr_lite", 104 "${appexecfwk_lite_path}/interfaces/innerkits/bundlemgr_lite", 105 "${appexecfwk_lite_path}/interfaces/kits/bundle_lite", 106 "${appexecfwk_lite_path}/utils/bundle_lite", 107 "//foundation/communication/ipc_lite/interfaces/kits", 108 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 109 "//foundation/distributedschedule/samgr_lite/interfaces/kits/registry", 110 "//third_party/bounds_checking_function/include", 111 "//utils/native/lite/include", 112 "//third_party/cJSON", 113 ] 114 115 defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ] 116 } 117 118 cflags = [ 119 "-fPIC", 120 "-Wall", 121 "-Wno-format", 122 ] 123 cflags_cc = cflags 124} 125 126ndk_lib("bundle_notes") { 127 lib_extension = ".so" 128 deps = [ ":bundle" ] 129 head_files = [ "${appexecfwk_lite_path}/interfaces/kits/bundle_lite" ] 130} 131