blob: dba4ab577899c9f779eea2b6145061e29d889f87 [file] [log] [blame]
dvdli0eafdbb2020-11-16 17:07:04 +08001# BUILD
2#
3# Copyright 2020, The Android Open Source Project
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are met:
7# * Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# * Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12# * Neither the name of The Android Open Source Project nor the names of
13# its contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND
17# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE
20# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26# DAMAGE.
27#
28
29cc_library(
30 name = "tinyalsa",
31 srcs = glob(["src/*.c"]),
32 includes = ["include"],
33 hdrs = glob([
34 "include/**/*.h",
35 "src/*.h",
36 ]),
37 visibility = ["//visibility:public"],
38)
39
40cc_test(
41 name = "tinyalsa_tests",
42 srcs = glob([
43 "tests/src/*.cc",
44 "tests/include/*.h",
45 ]),
46 includes = ["tests/include"],
47 deps = [
48 "//:tinyalsa",
49 "@googletest//:gtest_main"
50 ],
51 linkopts = [
52 "-ldl",
53 ],
54 copts = [
55 "-std=c++17",
56 ],
57)