BUILD.gn 1.1 KB
Newer Older
M
mamingshuai 已提交
1
# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved.
K
k00229000 已提交
2

M
mamingshuai 已提交
3 4
import("//build/ohos.gni")
import("//build/ohos/ndk/ndk.gni")
K
k00229000 已提交
5 6

config("zlib_config") {
M
mamingshuai 已提交
7 8 9 10 11
  cflags = [
    "-Wno-incompatible-pointer-types",
    "-Werror",
    "-Wimplicit-function-declaration",
  ]
K
k00229000 已提交
12 13
}

M
mamingshuai 已提交
14 15 16 17 18 19
config("zlib_public_config") {
  include_dirs = [ "." ]
}

ohos_static_library("libz") {
  sources = [
K
k00229000 已提交
20 21
    "adler32.c",
    "compress.c",
M
mamingshuai 已提交
22 23
    "contrib/minizip/ioapi.c",
    "contrib/minizip/unzip.c",
K
k00229000 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36 37
    "crc32.c",
    "crc32.h",
    "deflate.c",
    "deflate.h",
    "gzclose.c",
    "gzguts.h",
    "gzlib.c",
    "gzread.c",
    "gzwrite.c",
    "infback.c",
    "inffast.c",
    "inffast.h",
    "inffixed.h",
    "inflate.c",
M
mamingshuai 已提交
38
    "inflate.h",
K
k00229000 已提交
39 40 41 42 43 44 45 46 47
    "inftrees.c",
    "inftrees.h",
    "trees.c",
    "trees.h",
    "uncompr.c",
    "zconf.h",
    "zlib.h",
    "zutil.c",
    "zutil.h",
M
mamingshuai 已提交
48 49 50
  ]
  configs = [ ":zlib_config" ]
  public_configs = [ ":zlib_public_config" ]
X
x00334695 已提交
51 52
}

M
mamingshuai 已提交
53 54 55 56 57 58
ohos_ndk_headers("zlib_header") {
  sources = [
    "./zconf.h",
    "./zlib.h",
  ]
}
W
wenjun 已提交
59

M
mamingshuai 已提交
60 61 62 63
ohos_ndk_library("libz_ndk") {
  output_name = "z"
  ndk_description_file = "./zlib.ndk.json"
  output_extension = "so"
X
x00334695 已提交
64
}