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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_native_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_native_license"],
22}
23
24cc_library_static {
25    name: "liblshal",
26    shared_libs: [
27        "libbase",
28        "libbinderdebug",
29        "libcutils",
30        "libutils",
31        "libhidlbase",
32        "libhidl-gen-hash",
33        "libhidl-gen-utils",
34        "libvintf",
35    ],
36    static_libs: [
37        "libprocpartition",
38    ],
39    srcs: [
40        "DebugCommand.cpp",
41        "HelpCommand.cpp",
42        "Lshal.cpp",
43        "ListCommand.cpp",
44        "PipeRelay.cpp",
45        "TableEntry.cpp",
46        "TextTable.cpp",
47        "utils.cpp",
48        "WaitCommand.cpp",
49    ],
50    cflags: [
51        "-Wall",
52        "-Werror",
53    ],
54}
55
56cc_defaults {
57    name: "lshal_defaults",
58    shared_libs: [
59        "libbase",
60        "libbinderdebug",
61        "libcutils",
62        "libutils",
63        "libhidlbase",
64        "libhidl-gen-hash",
65        "libhidl-gen-utils",
66        "libvintf",
67    ],
68    static_libs: [
69        "liblshal",
70        "libprocpartition",
71    ],
72    cflags: ["-Wall", "-Werror"],
73}
74
75cc_binary {
76    name: "lshal",
77    defaults: ["lshal_defaults"],
78    srcs: [
79        "main.cpp"
80    ]
81}
82
83cc_test {
84    name: "lshal_test",
85    test_suites: ["device-tests"],
86    defaults: [
87        "libvintf_static_user_defaults",
88        "lshal_defaults"
89    ],
90    gtest: true,
91    static_libs: [
92        "android.hardware.tests.inheritance@1.0",
93        "libgmock",
94        "libvintf",
95    ],
96    shared_libs: [
97        "libhidlbase",
98    ],
99    srcs: [
100        "test.cpp"
101    ]
102}
103