# 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") import("//foundation/filemanagement/dfs_service/distributedfile.gni") config("compiler_configs") { visibility = [ ":*" ] visibility += [ "${distributedfile_path}/services/*", "${distributedfile_path}/test/moduletest/*", ] cflags = [ "-Wall", "-Werror", "-Wdate-time", "-Wfloat-equal", "-Wshadow", "-Wformat=2", "-fvisibility=hidden", "-ffunction-sections", "-Os", ] configs = [ "//build/config/compiler:exceptions" ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Os", ] defines = [ "LOG_DOMAIN=0xD001600", "LOG_LEVEL=INFO", ] } config("utils_public_config") { include_dirs = [ "log/include", "preference/include", "system/include", ] } ohos_shared_library("libdistributedfileutils") { sources = [ "log/src/dfs_error.cpp", "log/src/utils_log.cpp", "preference/src/cloud_pref_impl.cpp", "system/src/dfsu_access_token_helper.cpp", "system/src/dfsu_fd_guard.cpp", "system/src/dfsu_mount_argument_descriptors.cpp", "system/src/utils_directory.cpp", ] configs = [ "//build/config/compiler:exceptions" ] public_configs = [ ":utils_public_config" ] defines = [ "LOG_DOMAIN=0xD004308", "LOG_TAG=\"distributedfile_utils\"", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "c_utils:utils", "c_utils:utilsbase", "hilog:libhilog", "ipc:ipc_core", "preferences:native_preferences", ] part_name = "dfs_service" innerapi_tags = [ "platformsdk" ] subsystem_name = "filemanagement" } config("dentry_public_config") { include_dirs = [ "dentry/include" ] } ohos_shared_library("libdistributedfiledentry") { include_dirs = [ "dentry/include", "log/include", ] sources = [ "dentry/src/file_utils.cpp", "dentry/src/meta_file.cpp", ] public_configs = [ ":dentry_public_config" ] deps = [ "${utils_path}:libdistributedfileutils" ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] defines = [ "LOG_DOMAIN=0xD004307", "LOG_TAG=\"CLOUDSYNC_SA\"", ] part_name = "dfs_service" subsystem_name = "filemanagement" }