diff --git a/BUILD.gn b/BUILD.gn old mode 100644 new mode 100755 index 2edd1dc49897a12566c14a09de9ec8e75552a767..bb857e39c427e325bea38b823f322f897046df1c --- a/BUILD.gn +++ b/BUILD.gn @@ -1,6 +1,7 @@ # Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. import("//build/harmonyos.gni") +import("//build/harmonyos/ndk/ndk.gni") config("zlib_config") { include_dirs = [ "." ] @@ -48,3 +49,12 @@ static_library("libz") { static_library("libz_test") { deps = [":libz"] } + +harmonyos_ndk_headers("zlib_header") { + sources = ["./zlib.h","./zconf.h"] +} + +harmonyos_ndk_library("libz_ndk") { + output_name = "z" + ndk_description_file = "./zlib.ndk.json" +} diff --git a/zlib.ndk.json b/zlib.ndk.json new file mode 100755 index 0000000000000000000000000000000000000000..63c681be27aceda2ff8143016d54d7ab96ddacd9 --- /dev/null +++ b/zlib.ndk.json @@ -0,0 +1,51 @@ +[ + { "name": "_dist_code" }, + { "name": "_length_code" }, + { "name": "_tr_align" }, + { "name": "_tr_flush_bits" }, + { "name": "_tr_flush_block" }, + { "name": "_tr_init" }, + { "name": "_tr_stored_block" }, + { "name": "_tr_tally" }, + { "name": "adler32" }, + { "name": "compress2" }, + { "name": "compress" }, + { "name": "crc32" }, + { "name": "deflate" }, + { "name": "deflateCopy" }, + { "name": "deflateEnd" }, + { "name": "deflateInit2_" }, + { "name": "deflateInit_" }, + { "name": "deflateParams" }, + { "name": "deflateReset" }, + { "name": "deflateSetDictionary" }, + { "name": "get_crc_table" }, + { "name": "gzclose" }, + { "name": "gzdopen" }, + { "name": "gzeof" }, + { "name": "gzerror" }, + { "name": "gzflush" }, + { "name": "gzgetc" }, + { "name": "gzgets" }, + { "name": "gzopen" }, + { "name": "gzprintf" }, + { "name": "gzputc" }, + { "name": "gzputs" }, + { "name": "gzread" }, + { "name": "gzrewind" }, + { "name": "gzseek" }, + { "name": "gzsetparams" }, + { "name": "gztell" }, + { "name": "gzwrite" }, + { "name": "inflate" }, + { "name": "inflateEnd" }, + { "name": "inflateInit2_" }, + { "name": "inflateInit_" }, + { "name": "inflateReset" }, + { "name": "inflateSetDictionary" }, + { "name": "inflateSync" }, + { "name": "inflateSyncPoint" }, + { "name": "uncompress" }, + { "name": "zError" }, + { "name": "zlibVersion" } +]