• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//build/ohos.gni")
15import("//foundation/filemanagement/dfs_service/distributedfile.gni")
16
17config("compiler_configs") {
18  visibility = [ ":*" ]
19  visibility += [
20    "${distributedfile_path}/services/*",
21    "${distributedfile_path}/test/moduletest/*",
22  ]
23
24  cflags = [
25    "-Wall",
26    "-Werror",
27    "-Wdate-time",
28    "-Wfloat-equal",
29    "-Wshadow",
30    "-Wformat=2",
31    "-fvisibility=hidden",
32    "-ffunction-sections",
33    "-Os",
34  ]
35  configs = [ "//build/config/compiler:exceptions" ]
36
37  cflags_cc = [
38    "-fvisibility-inlines-hidden",
39    "-Os",
40  ]
41
42  defines = [
43    "LOG_DOMAIN=0xD001600",
44    "LOG_LEVEL=INFO",
45  ]
46}
47
48config("utils_public_config") {
49  include_dirs = [
50    "log/include",
51    "preference/include",
52    "system/include",
53  ]
54}
55
56ohos_shared_library("libdistributedfileutils") {
57  sources = [
58    "log/src/dfs_error.cpp",
59    "log/src/utils_log.cpp",
60    "preference/src/cloud_pref_impl.cpp",
61    "system/src/dfsu_access_token_helper.cpp",
62    "system/src/dfsu_fd_guard.cpp",
63    "system/src/dfsu_mount_argument_descriptors.cpp",
64    "system/src/utils_directory.cpp",
65  ]
66
67  configs = [ "//build/config/compiler:exceptions" ]
68  public_configs = [ ":utils_public_config" ]
69
70  defines = [
71    "LOG_DOMAIN=0xD004308",
72    "LOG_TAG=\"distributedfile_utils\"",
73  ]
74
75  external_deps = [
76    "access_token:libaccesstoken_sdk",
77    "access_token:libtokenid_sdk",
78    "c_utils:utils",
79    "c_utils:utilsbase",
80    "hilog:libhilog",
81    "ipc:ipc_core",
82    "preferences:native_preferences",
83  ]
84
85  part_name = "dfs_service"
86  innerapi_tags = [ "platformsdk" ]
87  subsystem_name = "filemanagement"
88}
89
90config("dentry_public_config") {
91  include_dirs = [ "dentry/include" ]
92}
93
94ohos_shared_library("libdistributedfiledentry") {
95  include_dirs = [
96    "dentry/include",
97    "log/include",
98  ]
99  sources = [
100    "dentry/src/file_utils.cpp",
101    "dentry/src/meta_file.cpp",
102  ]
103
104  public_configs = [ ":dentry_public_config" ]
105
106  deps = [ "${utils_path}:libdistributedfileutils" ]
107
108  external_deps = [
109    "c_utils:utils",
110    "hilog:libhilog",
111  ]
112
113  defines = [
114    "LOG_DOMAIN=0xD004307",
115    "LOG_TAG=\"CLOUDSYNC_SA\"",
116  ]
117
118  part_name = "dfs_service"
119  subsystem_name = "filemanagement"
120}
121