• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2025 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.
13
14deviceauth_path = "//base/security/device_auth"
15common_lib_path = "${deviceauth_path}/common_lib"
16deps_adapter_path = "${deviceauth_path}/deps_adapter"
17key_management_adapter_path =
18    "${deviceauth_path}/deps_adapter/key_management_adapter"
19os_adapter_path = "${deviceauth_path}/deps_adapter/os_adapter"
20
21inner_api_path = "${deviceauth_path}/interfaces/inner_api"
22frameworks_path = "${deviceauth_path}/frameworks"
23services_path = "${deviceauth_path}/services"
24
25declare_args() {
26  deviceauth_feature_config = "//base/security/device_auth/default_config"
27  device_auth_enable_soft_bus_channel = true
28  device_auth_use_customized_key_adapter = false
29}
30
31build_flags = [
32  "-O2",
33  "-ftrapv",
34  "-Wall",
35  "-Werror",
36  "-Wextra",
37  "-Wshadow",
38  "-fstack-protector-all",
39  "-FPIC",
40  "-FS",
41  "-D_FORTIFY_SOURCE=2",
42  "-Wformat=2",
43  "-Wfloat-equal",
44  "-Wdate-time",
45]
46
47if (defined(ohos_lite)) {
48  if (ohos_kernel_type == "liteos_m") {
49    import("${deviceauth_feature_config}/mini/config.gni")
50    device_auth_enable_soft_bus_channel = false
51  } else {
52    import("${deviceauth_feature_config}/small/config.gni")
53  }
54} else {
55  import("${deviceauth_feature_config}/standard/config.gni")
56}
57