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