mirror of
https://github.com/nexus-stc/hyperboria
synced 2024-12-21 09:07:46 +01:00
8472f27ec5
GitOrigin-RevId: ddf02e70d2827c048db49b687ebbcdcc67807ca6
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
_ZLIB_HEADERS = [
|
|
"crc32.h",
|
|
"deflate.h",
|
|
"gzguts.h",
|
|
"inffast.h",
|
|
"inffixed.h",
|
|
"inflate.h",
|
|
"inftrees.h",
|
|
"trees.h",
|
|
"zconf.h",
|
|
"zlib.h",
|
|
"zutil.h",
|
|
]
|
|
|
|
_ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS]
|
|
|
|
genrule(
|
|
name = "copy_public_headers",
|
|
srcs = _ZLIB_HEADERS,
|
|
outs = _ZLIB_PREFIXED_HEADERS,
|
|
cmd = "cp $(SRCS) $(@D)/zlib/include/",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "zlib",
|
|
srcs = [
|
|
"adler32.c",
|
|
"compress.c",
|
|
"crc32.c",
|
|
"deflate.c",
|
|
"gzclose.c",
|
|
"gzlib.c",
|
|
"gzread.c",
|
|
"gzwrite.c",
|
|
"infback.c",
|
|
"inffast.c",
|
|
"inflate.c",
|
|
"inftrees.c",
|
|
"trees.c",
|
|
"uncompr.c",
|
|
"zutil.c",
|
|
] + _ZLIB_HEADERS,
|
|
hdrs = _ZLIB_PREFIXED_HEADERS,
|
|
copts = [
|
|
"-Wno-unused-variable",
|
|
"-Wno-implicit-function-declaration",
|
|
],
|
|
includes = ["zlib/include/"],
|
|
)
|