1// Copyright (C) 2016 The Android Open Source Project
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
15cc_library_static {
16    name: "liblshal",
17    shared_libs: [
18        "libbase",
19        "libcutils",
20        "libutils",
21        "libhidlbase",
22        "libhidl-gen-hash",
23        "libhidl-gen-utils",
24        "libvintf",
25    ],
26    static_libs: [
27        "libprocpartition",
28    ],
29    srcs: [
30        "DebugCommand.cpp",
31        "HelpCommand.cpp",
32        "Lshal.cpp",
33        "ListCommand.cpp",
34        "PipeRelay.cpp",
35        "TableEntry.cpp",
36        "TextTable.cpp",
37        "utils.cpp",
38        "WaitCommand.cpp",
39    ],
40    cflags: [
41        "-Wall",
42        "-Werror",
43    ],
44}
45
46cc_defaults {
47    name: "lshal_defaults",
48    shared_libs: [
49        "libbase",
50        "libcutils",
51        "libutils",
52        "libhidlbase",
53        "libhidl-gen-hash",
54        "libhidl-gen-utils",
55        "libvintf",
56    ],
57    static_libs: [
58        "liblshal",
59        "libprocpartition",
60    ],
61    cflags: ["-Wall", "-Werror"],
62}
63
64cc_binary {
65    name: "lshal",
66    defaults: ["lshal_defaults"],
67    srcs: [
68        "main.cpp"
69    ]
70}
71
72cc_test {
73    name: "lshal_test",
74    test_suites: ["device-tests"],
75    defaults: ["lshal_defaults"],
76    gtest: true,
77    static_libs: [
78        "android.hardware.tests.baz@1.0",
79        "libgmock",
80    ],
81    shared_libs: [
82        "libhidlbase",
83        "libvintf",
84    ],
85    srcs: [
86        "test.cpp"
87    ]
88}
89