• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#Copyright (c) 2019-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")
15
16config("iowow_public_config") {
17  include_dirs = [
18    "//third_party/iowow/src",
19    "//third_party/iowow/src/fs",
20    "//third_party/iowow/src/kv",
21    "//third_party/iowow/src/log",
22    "//third_party/iowow/src/platform",
23    "//third_party/iowow/src/rdb",
24    "//third_party/iowow/src/utils",
25  ]
26}
27
28config("iowow_config") {
29  include_dirs = [
30    "//third_party/iowow/src",
31    "//third_party/iowow/src/fs",
32    "//third_party/iowow/src/kv",
33    "//third_party/iowow/src/log",
34    "//third_party/iowow/src/platform",
35    "//third_party/iowow/src/rdb",
36    "//third_party/iowow/src/utils",
37  ]
38
39  cflags = [
40    "-fPIC",
41    "-std=gnu11",
42    "-fsigned-char",
43    "-pedantic",
44    "-Wfatal-errors",
45    "-Wall",
46    "-Wextra",
47    "-Wno-int-conversion",
48    "-Wno-sign-compare",
49    "-Wno-unused-parameter",
50    "-Wno-unknown-pragmas",
51    "-Wno-unused-function",
52    "-Wno-missing-field-initializers",
53    "-Wno-missing-braces",
54    "-O3",
55    "-DNDEBUG",
56    "-U__ANDROID__",
57  ]
58
59  defines = [
60    "IW_API_EXPORTS",
61    "IW_HAVE_CLOCK_MONOTONIC",
62    "IW_HAVE_PTHREAD_CONDATTR_SETCLOCK",
63    "IW_PTHREADS",
64    "PTHREAD_SPIN_LOCK_SHIM",
65    "_GNU_SOURCE",
66    "_LARGEFILE_SOURCE",
67  ]
68
69  if (target_cpu == "x86" || target_cpu == "arm") {
70    defines += [
71      "IW_32",
72      "_FILE_OFFSET_BITS=64",
73    ]
74  } else {
75    defines += [
76      "IW_64",
77      "_FILE_OFFSET_BITS=64",
78    ]
79  }
80}
81
82ohos_shared_library("iowow") {
83  configs = [ ":iowow_config" ]
84
85  public_configs = [ ":iowow_public_config" ]
86
87  sources = [
88    "src/fs/iwexfile.c",
89    "src/fs/iwfile.c",
90    "src/fs/iwfs.c",
91    "src/fs/iwfsmfile.c",
92    "src/iowow.c",
93    "src/kv/iwal.c",
94    "src/kv/iwkv.c",
95    "src/log/iwlog.c",
96    "src/platform/iwp.c",
97    "src/rdb/iwrdb.c",
98    "src/utils/iwarr.c",
99    "src/utils/iwconv.c",
100    "src/utils/iwhmap.c",
101    "src/utils/iwpool.c",
102    "src/utils/iwsha2.c",
103    "src/utils/iwstree.c",
104    "src/utils/iwstw.c",
105    "src/utils/iwth.c",
106    "src/utils/iwutils.c",
107    "src/utils/iwuuid.c",
108    "src/utils/iwxstr.c",
109    "src/utils/mt19937ar.c",
110    "src/utils/murmur3.c",
111  ]
112
113  part_name = "hiview"
114  subsystem_name = "hiviewdfx"
115}
116