blob: cd055cd7ddb4d31cf9a57bf2b2e54d8fe44896b8 [file] [log] [blame]
Ajay Penmatcha57873d92023-12-18 12:59:21 -08001load("@bazel_skylib//rules:write_file.bzl", "write_file")
2
3licenses(["notice"]) # MIT/X derivative license
4
5exports_files(["COPYING"])
6
7write_file(
8 name = "nghttp2ver.h",
9 out = "lib/includes/nghttp2/nghttp2ver.h",
10 content = """
11/*
12 * nghttp2 - HTTP/2 C Library
13 *
14 * Copyright (c) 2012, 2013 Tatsuhiro Tsujikawa
15 *
16 * Permission is hereby granted, free of charge, to any person obtaining
17 * a copy of this software and associated documentation files (the
18 * "Software"), to deal in the Software without restriction, including
19 * without limitation the rights to use, copy, modify, merge, publish,
20 * distribute, sublicense, and/or sell copies of the Software, and to
21 * permit persons to whom the Software is furnished to do so, subject to
22 * the following conditions:
23 *
24 * The above copyright notice and this permission notice shall be
25 * included in all copies or substantial portions of the Software.
26 *
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 */
35#ifndef NGHTTP2VER_H
36#define NGHTTP2VER_H
37
38/**
39 * @macro
40 * Version number of the nghttp2 library release
41 */
42#define NGHTTP2_VERSION "1.58.0"
43
44/**
45 * @macro
46 * Numerical representation of the version number of the nghttp2 library
47 * release. This is a 24 bit number with 8 bits for major number, 8 bits
48 * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
49 */
50#define NGHTTP2_VERSION_NUM 0x013a00
51
52#endif /* NGHTTP2VER_H */
53""".splitlines(),
54)
55
56cc_library(
57 name = "nghttp2",
58 srcs = glob(["lib/*.c"]),
59 hdrs = glob(["lib/*.h"]) + [
60 "lib/includes/nghttp2/nghttp2.h",
61 ":nghttp2ver.h",
62 ],
63 defines = [
64 "HAVE_TIME_H",
65 "HAVE_ARPA_INET_H",
66 ],
67 includes = [
68 "lib/includes/",
69 ],
70 visibility = ["//visibility:public"],
71)