Nicolas "Pixel" Noble | 31d11db | 2016-10-20 09:29:46 +0200 | [diff] [blame] | 1 | def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): |
| 2 | copts = [] |
| 3 | if language == "C": |
| 4 | copts = ["-std=c99"] |
| 5 | native.cc_library( |
| 6 | name = name, |
| 7 | srcs = srcs, |
| 8 | hdrs = hdrs, |
| 9 | deps = deps, |
| 10 | copts = copts, |
Nicolas "Pixel" Noble | 60ca22f | 2016-10-20 10:23:53 +0200 | [diff] [blame^] | 11 | linkopts = ["-pthread"], |
Nicolas "Pixel" Noble | 31d11db | 2016-10-20 09:29:46 +0200 | [diff] [blame] | 12 | includes = [ |
| 13 | "include" |
| 14 | ] |
| 15 | ) |
| 16 | |
| 17 | |
| 18 | def nanopb(): |
| 19 | native.cc_library( |
| 20 | name = "nanopb", |
| 21 | srcs = [ |
| 22 | '//third_party/nanopb/pb_common.c', |
| 23 | '//third_party/nanopb/pb_decode.c', |
| 24 | '//third_party/nanopb/pb_encode.c', |
| 25 | ], |
| 26 | hdrs = [ |
| 27 | '//third_party/nanopb/pb.h', |
| 28 | '//third_party/nanopb/pb_common.h', |
| 29 | '//third_party/nanopb/pb_decode.h', |
| 30 | '//third_party/nanopb/pb_encode.h', |
| 31 | ] |
| 32 | ) |