aboutsummaryrefslogtreecommitdiffhomepage
path: root/grpc-build-system.bzl
blob: 1d6d1a42c2dfe750745d2ea12bcefc5c8093b97a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"):
  copts = []
  if language == "C":
    copts = ["-std=c99"]
  native.cc_library(
    name = name,
    srcs = srcs,
    hdrs = hdrs,
    deps = deps,
    copts = copts,
    includes = [
        "include"
    ]
  )


def nanopb():
  native.cc_library(
    name = "nanopb",
    srcs = [
      '//third_party/nanopb/pb_common.c',
      '//third_party/nanopb/pb_decode.c',
      '//third_party/nanopb/pb_encode.c',
    ],
    hdrs = [
      '//third_party/nanopb/pb.h',
      '//third_party/nanopb/pb_common.h',
      '//third_party/nanopb/pb_decode.h',
      '//third_party/nanopb/pb_encode.h',
    ]
  )