Created
November 1, 2017 18:59
-
-
Save shakeel/250d2259d491f4a514716d8b28dd3710 to your computer and use it in GitHub Desktop.
Bazel BUILD file for zlib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shakeel@luci:~/Source/net_zlib$ bazel build //... | |
WARNING: ignoring http_proxy in environment. | |
INFO: Analysed 2 targets (0 packages loaded). | |
INFO: Found 2 targets... | |
ERROR: /home/shakeel/Source/net_zlib/BUILD.bazel:5:1: undeclared inclusion(s) in rule '//:zlib': | |
this rule is missing dependency declarations for the following files included by 'gzlib.c': | |
'/usr/lib/llvm-4.0/lib/clang/4.0.1/include/stddef.h' | |
'/usr/lib/llvm-4.0/lib/clang/4.0.1/include/stdarg.h' | |
'/usr/lib/llvm-4.0/lib/clang/4.0.1/include/__stddef_max_align_t.h' | |
'/usr/lib/llvm-4.0/lib/clang/4.0.1/include/limits.h' | |
INFO: Elapsed time: 0.465s, Critical Path: 0.18s | |
FAILED: Build did NOT complete successfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bazel build file for zlib compression library | |
package(default_visibility = ["//visibility:public"]) | |
cc_library( | |
name = "zlib", | |
srcs = [ | |
"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.c", | |
"inflate.h", | |
"inftrees.c", | |
"inftrees.h", | |
"trees.c", | |
"trees.h", | |
"uncompr.c", | |
"zconf.h", | |
"zlib.h", | |
"zutil.c", | |
"zutil.h", | |
], | |
copts = [ | |
"-Wall", | |
"-Wextra", | |
"-Wno-sign-compare", | |
"-Wno-unused-parameter", | |
"-Wno-implicit-function-declaration", | |
], | |
) | |
cc_library( | |
name = "minizip", | |
srcs = [ | |
"contrib/minizip/crypt.h", | |
"contrib/minizip/ioapi.c", | |
"contrib/minizip/ioapi.h", | |
"contrib/minizip/unzip.c", | |
"contrib/minizip/unzip.h", | |
"contrib/minizip/zip.c", | |
"contrib/minizip/zip.h", | |
], | |
deps = [ | |
":zlib", | |
], | |
copts = [ | |
"-Wall", | |
"-Wextra", | |
"-Wno-sign-compare", | |
"-Wno-unused-parameter", | |
"-Wno-implicit-function-declaration", | |
"-Wno-parentheses-equality", | |
], | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gzguts.h -- zlib internal header definitions for gz* operations | |
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler | |
* For conditions of distribution and use, see copyright notice in zlib.h | |
*/ | |
#ifdef _LARGEFILE64_SOURCE | |
# ifndef _LARGEFILE_SOURCE | |
# define _LARGEFILE_SOURCE 1 | |
# endif | |
# ifdef _FILE_OFFSET_BITS | |
# undef _FILE_OFFSET_BITS | |
# endif | |
#endif | |
#ifdef HAVE_HIDDEN | |
# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) | |
#else | |
# define ZLIB_INTERNAL | |
#endif | |
#include <stdio.h> | |
#include "zlib.h" | |
#ifdef STDC | |
# include <string.h> | |
# include <stdlib.h> | |
# include <limits.h> | |
#endif | |
#ifndef _POSIX_SOURCE | |
# define _POSIX_SOURCE | |
#endif | |
#include <fcntl.h> | |
#ifdef _WIN32 | |
# include <stddef.h> | |
#endif | |
// Partial contents of this file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zlib Compression Library | |
new_http_archive( | |
name = "net_zlib", | |
urls = ["http://zlib.net/zlib1211.zip"], | |
strip_prefix = "zlib-1.2.11", | |
build_file = "BUILD.zlib", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment