diff options
Diffstat (limited to 'grpc-build-system.bzl')
-rw-r--r-- | grpc-build-system.bzl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl new file mode 100644 index 0000000000..1d6d1a42c2 --- /dev/null +++ b/grpc-build-system.bzl @@ -0,0 +1,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', + ] + ) |