1# Copyright (C) 2021-2022 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} 29 30build_flags = [ 31 "-O2", 32 "-ftrapv", 33 "-Wall", 34 "-Werror", 35 "-Wextra", 36 "-Wshadow", 37 "-fstack-protector-all", 38 "-FPIC", 39 "-FS", 40 "-D_FORTITY_SOURCE=2", 41 "-Wformat=2", 42 "-Wfloat-equal", 43 "-Wdate-time", 44] 45 46if (defined(ohos_lite)) { 47 if (ohos_kernel_type == "liteos_m") { 48 import("${deviceauth_feature_config}/mini/config.gni") 49 device_auth_enable_soft_bus_channel = false 50 } else { 51 import("${deviceauth_feature_config}/small/config.gni") 52 } 53} else { 54 import("${deviceauth_feature_config}/standard/config.gni") 55} 56