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/json", 21 "//third_party/iowow/src/kv", 22 "//third_party/iowow/src/log", 23 "//third_party/iowow/src/platform", 24 "//third_party/iowow/src/rdb", 25 "//third_party/iowow/src/re", 26 "//third_party/iowow/src/utils", 27 ] 28} 29 30config("iowow_config") { 31 include_dirs = [ 32 "//third_party/iowow/src", 33 "//third_party/iowow/src/fs", 34 "//third_party/iowow/src/json", 35 "//third_party/iowow/src/kv", 36 "//third_party/iowow/src/log", 37 "//third_party/iowow/src/platform", 38 "//third_party/iowow/src/rdb", 39 "//third_party/iowow/src/re", 40 "//third_party/iowow/src/utils", 41 ] 42 43 cflags = [ 44 "-fPIC", 45 "-std=gnu11", 46 "-fsigned-char", 47 "-pedantic", 48 "-Wfatal-errors", 49 "-Wall", 50 "-Wextra", 51 "-Wno-int-conversion", 52 "-Wno-sign-compare", 53 "-Wno-unused-parameter", 54 "-Wno-unknown-pragmas", 55 "-Wno-unused-function", 56 "-Wno-missing-field-initializers", 57 "-Wno-missing-braces", 58 "-Wno-strict-prototypes", 59 "-O3", 60 "-DNDEBUG", 61 "-U__ANDROID__", 62 ] 63 64 defines = [ 65 "IW_API_EXPORTS", 66 "IW_HAVE_CLOCK_MONOTONIC", 67 "IW_HAVE_PTHREAD_CONDATTR_SETCLOCK", 68 "IW_PTHREADS", 69 "PTHREAD_SPIN_LOCK_SHIM", 70 "_GNU_SOURCE", 71 "_LARGEFILE_SOURCE", 72 ] 73 74 if (target_cpu == "x86" || target_cpu == "arm") { 75 defines += [ 76 "IW_32", 77 "_FILE_OFFSET_BITS=64", 78 ] 79 } else { 80 defines += [ 81 "IW_64", 82 "_FILE_OFFSET_BITS=64", 83 ] 84 } 85} 86 87ohos_shared_library("iowow") { 88 configs = [ ":iowow_config" ] 89 90 public_configs = [ ":iowow_public_config" ] 91 92 sources = [ 93 "src/fs/iwexfile.c", 94 "src/fs/iwfile.c", 95 "src/fs/iwfs.c", 96 "src/fs/iwfsmfile.c", 97 "src/iowow.c", 98 "src/json/iwbinn.c", 99 "src/json/iwjser.c", 100 "src/json/iwjson.c", 101 "src/kv/iwal.c", 102 "src/kv/iwkv.c", 103 "src/log/iwlog.c", 104 "src/platform/iwp.c", 105 "src/rdb/iwrdb.c", 106 "src/re/compile.c", 107 "src/re/iwre.c", 108 "src/re/parse.c", 109 "src/re/vm.c", 110 "src/utils/iwarr.c", 111 "src/utils/iwavl.c", 112 "src/utils/iwconv.c", 113 "src/utils/iwhmap.c", 114 "src/utils/iwini.c", 115 "src/utils/iwpool.c", 116 "src/utils/iwrb.c", 117 "src/utils/iwstw.c", 118 "src/utils/iwth.c", 119 "src/utils/iwtp.c", 120 "src/utils/iwutils.c", 121 "src/utils/iwuuid.c", 122 "src/utils/iwxstr.c", 123 "src/utils/mt19937ar.c", 124 "src/utils/murmur3.c", 125 "src/utils/utf8proc.c", 126 ] 127 128 innerapi_tags = [ "platformsdk" ] 129 part_name = "iowow" 130 subsystem_name = "thirdparty" 131} 132