startup_init/services/param/BUILD.gn
xionglei6 17d558aef8 init: add func
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2022-01-19 16:08:48 +08:00

108 lines
3.2 KiB
Plaintext
Executable File

# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
declare_args() {
param_security = "dac"
}
ohos_static_library("param_service") {
sources = [
"adapter/param_libuvadp.c",
"adapter/param_persistadp.c",
"manager/param_manager.c",
"manager/param_message.c",
"manager/param_trie.c",
"manager/param_utils.c",
"service/param_persist.c",
"service/param_service.c",
"trigger/trigger_checker.c",
"trigger/trigger_manager.c",
"trigger/trigger_processor.c",
]
include_dirs = [
"include",
"adapter",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/init/include",
"//base/startup/init_lite/services/log",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/loopevent/include",
"//third_party/libuv/include",
"//third_party/cJSON",
]
defines = [ "PARAM_SUPPORT_SAVE_PERSIST" ]
if (param_security == "selinux") {
sources += [ "adapter/param_selinux.c" ]
defines += [ "PARAM_SUPPORT_SELINUX" ]
} else {
sources += [ "adapter/param_dac.c" ]
defines += [ "PARAM_SUPPORT_DAC" ]
}
deps = [
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/loopevent:loopevent",
"//base/startup/init_lite/services/utils:libinit_tools",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
]
part_name = "init"
subsystem_name = "startup"
}
ohos_shared_library("param_client") {
sources = [
"//base/startup/init_lite/services/utils/init_utils.c",
"client/param_request.c",
"manager/param_manager.c",
"manager/param_message.c",
"manager/param_trie.c",
"manager/param_utils.c",
]
include_dirs = [
"include",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/log",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//base/startup/init_lite/services/loopevent/include",
]
defines = [ "INIT_AGENT" ]
if (param_security == "selinux") {
sources += [ "adapter/param_selinux.c" ]
defines += [ "PARAM_SUPPORT_SELINUX" ]
} else {
sources += [ "adapter/param_dac.c" ]
defines += [ "PARAM_SUPPORT_DAC" ]
}
deps = [
"//base/startup/init_lite/services/log:agent_log",
"//third_party/bounds_checking_function:libsec_static",
]
install_images = [
"system",
"updater",
]
part_name = "init"
}