1# Copyright (c) 2021 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("//base/startup/init/begetd.gni") 14import("//build/ohos.gni") 15 16ohos_prebuilt_etc("param_watcher.rc") { 17 source = "etc/param_watcher.cfg" 18 relative_install_dir = "init" 19 part_name = "init" 20 subsystem_name = "startup" 21} 22 23ohos_shared_library("param_watcher") { 24 sources = [ 25 "//base/startup/init/services/param/linux/param_message.c", 26 "proxy/watcher_manager.cpp", 27 "proxy/watcher_manager_stub.cpp", 28 "proxy/watcher_proxy.cpp", 29 ] 30 31 include_dirs = [ 32 "//base/startup/init/services/param/include", 33 "//base/startup/init/interfaces/innerkits/include/param", 34 "//base/startup/init/services/param/linux", 35 "//base/startup/init/services/param/watcher/proxy", 36 "//base/startup/init/services/param/watcher/include", 37 "//base/startup/init/interfaces/innerkits/include", 38 "//base/startup/init/services/log", 39 "//base/startup/init/services/loopevent/include", 40 ] 41 42 deps = [ 43 "//base/startup/init/interfaces/innerkits:libbegetutil", 44 "//base/startup/init/services/log:agent_log", 45 ] 46 47 branch_protector_ret = "pac_ret" 48 sanitize = { 49 cfi = true 50 cfi_cross_dso = true 51 debug = false 52 } 53 54 external_deps = [ 55 "bounds_checking_function:libsec_shared", 56 "cJSON:cjson", 57 "c_utils:utils", 58 "ipc:ipc_core", 59 "safwk:system_ability_fwk", 60 "samgr:samgr_proxy", 61 ] 62 63 if (init_paramwatcher_hicollie_enable) { 64 external_deps += [ "hicollie:libhicollie" ] 65 defines = [ "HICOLLIE_ENABLE" ] 66 } 67 68 shlib_type = "sa" 69 install_images = [ "system" ] 70 part_name = "init" 71 subsystem_name = "startup" 72} 73