|
| 1 | +# Copyright 2020 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Description: |
| 16 | +# Snappy library |
| 17 | + |
| 18 | +package(default_visibility = ["//visibility:public"]) |
| 19 | + |
| 20 | +licenses(["notice"]) # BSD 3-Clause |
| 21 | + |
| 22 | +exports_files(["COPYING"]) |
| 23 | + |
| 24 | +cc_library( |
| 25 | + name = "snappy", |
| 26 | + srcs = glob( |
| 27 | + [ |
| 28 | + "*.cc", |
| 29 | + "*.h", |
| 30 | + ], |
| 31 | + exclude = [ |
| 32 | + "*test.*", |
| 33 | + "*fuzzer.*", |
| 34 | + ], |
| 35 | + ), |
| 36 | + hdrs = [ |
| 37 | + "snappy-stubs-public.h", |
| 38 | + ], |
| 39 | + copts = [], |
| 40 | + includes = ["."], |
| 41 | +) |
| 42 | + |
| 43 | +# LINT.IfChange(snappy_gen_version) |
| 44 | +genrule( |
| 45 | + name = "snappy_stubs_public_h", |
| 46 | + srcs = ["snappy-stubs-public.h.in"], |
| 47 | + outs = ["snappy-stubs-public.h"], |
| 48 | + cmd = ("sed " + |
| 49 | + "-e 's/$${HAVE_SYS_UIO_H_01}/HAVE_SYS_UIO_H/g' " + |
| 50 | + "-e 's/$${PROJECT_VERSION_MAJOR}/1/g' " + |
| 51 | + "-e 's/$${PROJECT_VERSION_MINOR}/1/g' " + |
| 52 | + "-e 's/$${PROJECT_VERSION_PATCH}/8/g' " + |
| 53 | + "$< >$@"), |
| 54 | +) |
| 55 | +# LINT.ThenChange(../WORKSPACE:snappy_archive_version) |
0 commit comments