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 14import("//base/account/os_account/os_account.gni") 15import("//build/ohos.gni") 16 17config("os_account_core_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = 21 [ "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include" ] 22 23 cflags = [] 24 if (target_cpu == "arm") { 25 cflags += [ "-DBINDER_IPC_32BIT" ] 26 } 27 28 cflags += [ "-pipe" ] 29 cflags_cc = [ 30 "-Wdate-time", 31 "-Wformat=2", 32 "-Wfloat-equal", 33 "-Wshadow", 34 ] 35 36 defines = [ 37 "ACCOUNT_LOG_TAG = \"OsAccountCoreFwk\"", 38 "LOG_DOMAIN = 0xD001B00", 39 ] 40} 41 42config("os_account_core_public_config") { 43 include_dirs = [ 44 "${os_account_core_path}/include", 45 "${os_account_interfaces_native_path}/include", 46 "${innerkits_path}/include", 47 "${ability_runtime_path}/interfaces/inner_api/base/include/", 48 "${ability_runtime_path}/interfaces/inner_api/want/include", 49 "//utils/system/safwk/native/include", 50 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 51 "${innerkits_native_path}/include", 52 ] 53} 54 55config("os_account_core_all_dependent_configs") { 56 include_dirs = [ 57 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 58 "//commonlibrary/c_utils/base/include", 59 ] 60} 61 62ohos_shared_library("os_account_core") { 63 sources = [ 64 "${os_account_core_path}/src/os_account.cpp", 65 "${os_account_core_path}/src/os_account_death_recipient.cpp", 66 "${os_account_core_path}/src/os_account_event_listener.cpp", 67 "${os_account_core_path}/src/os_account_event_proxy.cpp", 68 "${os_account_core_path}/src/os_account_event_stub.cpp", 69 "${os_account_core_path}/src/os_account_proxy.cpp", 70 "${os_account_core_path}/src/os_account_stub.cpp", 71 "${os_account_innerkits_native_path}/src/os_account_info.cpp", 72 "${os_account_innerkits_native_path}/src/os_account_subscribe_info.cpp", 73 "${os_account_innerkits_native_path}/src/os_account_subscriber.cpp", 74 ] 75 76 configs = [ 77 ":os_account_core_config", 78 "${account_coverage_config_path}:coverage_flags", 79 ] 80 81 public_configs = [ ":os_account_core_public_config" ] 82 83 all_dependent_configs = [ ":os_account_core_all_dependent_configs" ] 84 85 use_exceptions = true 86 87 version_script = "libos_account_core.map" 88 89 deps = [ "${innerkits_native_path}:libaccountkits" ] 90 91 external_deps = [ 92 "ability_base:want", 93 "ability_runtime:wantagent_innerkits", 94 "c_utils:utils", 95 "hiviewdfx_hilog_native:libhilog", 96 "ipc:ipc_core", 97 "samgr:samgr_proxy", 98 ] 99 100 subsystem_name = "account" 101 part_name = "os_account" 102} 103