# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("$build_root/ark.gni") config("zlib_config") { cflags = [ "-Wno-incompatible-pointer-types", "-Werror", "-Wno-strict-prototypes", "-Wimplicit-function-declaration", "-Wno-unused-but-set-variable", ] } config("zlib_public_config") { include_dirs = [ "//third_party/zlib" ] } ohos_static_library("libz") { stack_protector_ret = false sources = [ "//third_party/zlib/adler32.c", "//third_party/zlib/compress.c", "//third_party/zlib/contrib/minizip/ioapi.c", "//third_party/zlib/contrib/minizip/unzip.c", "//third_party/zlib/contrib/minizip/zip.c", "//third_party/zlib/crc32.c", "//third_party/zlib/crc32.h", "//third_party/zlib/deflate.c", "//third_party/zlib/deflate.h", "//third_party/zlib/gzclose.c", "//third_party/zlib/gzguts.h", "//third_party/zlib/gzlib.c", "//third_party/zlib/gzread.c", "//third_party/zlib/gzwrite.c", "//third_party/zlib/infback.c", "//third_party/zlib/inffast.c", "//third_party/zlib/inffast.h", "//third_party/zlib/inffixed.h", "//third_party/zlib/inflate.c", "//third_party/zlib/inflate.h", "//third_party/zlib/inftrees.c", "//third_party/zlib/inftrees.h", "//third_party/zlib/trees.c", "//third_party/zlib/trees.h", "//third_party/zlib/uncompr.c", "//third_party/zlib/zconf.h", "//third_party/zlib/zlib.h", "//third_party/zlib/zutil.c", "//third_party/zlib/zutil.h", ] configs = [ ":zlib_config" ] public_configs = [ ":zlib_public_config" ] part_name = "zlib" subsystem_name = "thirdparty" } ohos_shared_library("shared_libz") { stack_protector_ret = false sources = [ "//third_party/zlib/adler32.c", "//third_party/zlib/compress.c", "//third_party/zlib/contrib/minizip/ioapi.c", "//third_party/zlib/contrib/minizip/unzip.c", "//third_party/zlib/contrib/minizip/zip.c", "//third_party/zlib/crc32.c", "//third_party/zlib/crc32.h", "//third_party/zlib/deflate.c", "//third_party/zlib/deflate.h", "//third_party/zlib/gzclose.c", "//third_party/zlib/gzguts.h", "//third_party/zlib/gzlib.c", "//third_party/zlib/gzread.c", "//third_party/zlib/gzwrite.c", "//third_party/zlib/infback.c", "//third_party/zlib/inffast.c", "//third_party/zlib/inffast.h", "//third_party/zlib/inffixed.h", "//third_party/zlib/inflate.c", "//third_party/zlib/inflate.h", "//third_party/zlib/inftrees.c", "//third_party/zlib/inftrees.h", "//third_party/zlib/trees.c", "//third_party/zlib/trees.h", "//third_party/zlib/uncompr.c", "//third_party/zlib/zconf.h", "//third_party/zlib/zlib.h", "//third_party/zlib/zutil.c", "//third_party/zlib/zutil.h", ] configs = [ ":zlib_config" ] public_configs = [ ":zlib_public_config" ] install_images = [ "system", "updater", ] innerapi_tags = [ "platformsdk" ] part_name = "zlib" subsystem_name = "thirdparty" }