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

3 4
import("//build/ohos.gni")
import("//build/ohos/ndk/ndk.gni")
K
k00229000 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

config("zlib_config") {
  include_dirs = [ "." ]
  cflags = [
    "-Wno-incompatible-pointer-types",
    "-Werror",
    "-Wimplicit-function-declaration",
  ]
}

static_library("libz") {
  sources = [
    "adler32.c",
    "compress.c",
    "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.h",
    "inflate.c",
    "inftrees.c",
    "inftrees.h",
    "trees.c",
    "trees.h",
    "uncompr.c",
    "zconf.h",
    "zlib.h",
    "zutil.c",
    "zutil.h",
    "contrib/minizip/ioapi.c",
    "contrib/minizip/unzip.c",
  ]
  public_configs = [ ":zlib_config" ]
}

static_library("libz_test") {
  deps = [":libz"]
}
X
x00334695 已提交
52

53
ohos_ndk_headers("zlib_header") {
X
x00334695 已提交
54
  sources = ["./zlib.h","./zconf.h"]
Z
z00526978 已提交
55
  notices = ["LICENSE"]
X
x00334695 已提交
56 57
}

58
ohos_ndk_library("libz_ndk") {
X
x00334695 已提交
59 60 61
  output_name = "z"
  ndk_description_file = "./zlib.ndk.json"
}