• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved.
2
3import("//build/ohos.gni")
4import("//build/ohos/ndk/ndk.gni")
5
6config("zlib_config") {
7  cflags = [
8    "-Wno-incompatible-pointer-types",
9    "-Werror",
10    "-Wimplicit-function-declaration",
11  ]
12}
13
14config("zlib_public_config") {
15  include_dirs = [ "." ]
16}
17
18ohos_static_library("libz") {
19  sources = [
20    "adler32.c",
21    "compress.c",
22    "contrib/minizip/ioapi.c",
23    "contrib/minizip/unzip.c",
24    "contrib/minizip/zip.c",
25    "crc32.c",
26    "crc32.h",
27    "deflate.c",
28    "deflate.h",
29    "gzclose.c",
30    "gzguts.h",
31    "gzlib.c",
32    "gzread.c",
33    "gzwrite.c",
34    "infback.c",
35    "inffast.c",
36    "inffast.h",
37    "inffixed.h",
38    "inflate.c",
39    "inflate.h",
40    "inftrees.c",
41    "inftrees.h",
42    "trees.c",
43    "trees.h",
44    "uncompr.c",
45    "zconf.h",
46    "zlib.h",
47    "zutil.c",
48    "zutil.h",
49  ]
50  configs = [ ":zlib_config" ]
51  public_configs = [ ":zlib_public_config" ]
52}
53
54ohos_ndk_headers("zlib_header") {
55  sources = [
56    "./zconf.h",
57    "./zlib.h",
58  ]
59}
60
61ohos_ndk_library("libz_ndk") {
62  output_name = "z"
63  ndk_description_file = "./zlib.ndk.json"
64  output_extension = "so"
65}
66