mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-04 09:14:00 +00:00
3f770b82e7
Signed-off-by: xionglei6 <xionglei6@huawei.com>
129 lines
3.8 KiB
Plaintext
129 lines
3.8 KiB
Plaintext
# 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("//base/startup/init_lite/begetd.gni")
|
|
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",
|
|
"//base/security/selinux/interfaces/policycoreutils/include",
|
|
"//third_party/libuv/include",
|
|
"//third_party/cJSON",
|
|
]
|
|
|
|
defines = [ "PARAM_SUPPORT_SAVE_PERSIST" ]
|
|
if (build_selinux) {
|
|
defines += [ "WITH_SELINUX" ]
|
|
}
|
|
|
|
if (defined(boot_kernel_extended_cmdline)) {
|
|
defines += [ "BOOT_EXTENDED_CMDLINE=\"${boot_kernel_extended_cmdline}\"" ]
|
|
}
|
|
|
|
if (param_security == "selinux") {
|
|
sources += [ "adapter/param_selinux.c" ]
|
|
defines += [ "PARAM_SUPPORT_SELINUX" ]
|
|
} else {
|
|
sources += [ "adapter/param_dac.c" ]
|
|
defines += [ "PARAM_SUPPORT_DAC" ]
|
|
if (use_musl) {
|
|
defines += [ "PARAM_SUPPORT_DAC_CHECK" ]
|
|
}
|
|
}
|
|
|
|
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/security/selinux/interfaces/policycoreutils/include",
|
|
"//base/startup/init_lite/services/loopevent/include",
|
|
]
|
|
|
|
defines = [ "INIT_AGENT" ]
|
|
defines += [ "_GNU_SOURCE" ]
|
|
|
|
if (build_selinux) {
|
|
defines += [ "WITH_SELINUX" ]
|
|
}
|
|
|
|
if (param_security == "selinux") {
|
|
sources += [ "adapter/param_selinux.c" ]
|
|
defines += [ "PARAM_SUPPORT_SELINUX" ]
|
|
} else {
|
|
sources += [ "adapter/param_dac.c" ]
|
|
defines += [ "PARAM_SUPPORT_DAC" ]
|
|
if (use_musl) {
|
|
defines += [ "PARAM_SUPPORT_DAC_CHECK" ]
|
|
}
|
|
}
|
|
|
|
deps = [
|
|
"//base/startup/init_lite/services/log:agent_log",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
]
|
|
install_images = [
|
|
"system",
|
|
"updater",
|
|
]
|
|
part_name = "init"
|
|
}
|