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") 15import("config.gni") 16 17lite_component("samgr") { 18 features = [ 19 "samgr", 20 "communication/broadcast", 21 ] 22 23 if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 24 features += [ 25 "samgr_server:server", 26 "samgr_client:client", 27 ] 28 } 29 30 if (enable_ohos_systemabilitymgr_samgr_lite_rpc_mini) { 31 features += [ 32 "samgr_server:server", 33 "samgr_client:client", 34 ] 35 } 36} 37 38copy("ConfigFiles") { 39 sources = [ "config/system_capability.json" ] 40 outputs = [ "$target_out_dir/config/system_capability.json" ] 41} 42 43ndk_lib("samgr_lite_ndk") { 44 if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton") { 45 lib_extension = ".a" 46 } else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 47 lib_extension = ".so" 48 } 49 deps = [ 50 "communication/broadcast", 51 "samgr", 52 ] 53 head_files = [ 54 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 55 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/communication/broadcast", 56 ] 57 if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 58 deps += [ "samgr_server:server" ] 59 head_files += 60 [ "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry" ] 61 } 62} 63 64generate_notice_file("samgr_notice_file") { 65 module_name = "samgr" 66 module_source_dir_list = [ 67 "//third_party/bounds_checking_function", 68 "//third_party/cJSON", 69 ] 70} 71