• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2017 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    default_applicable_licenses: ["system_libvintf_license"],
17}
18
19// Added automatically by a large-scale-change
20// http://go/android-license-faq
21license {
22    name: "system_libvintf_license",
23    visibility: [":__subpackages__"],
24    license_kinds: [
25        "SPDX-license-identifier-Apache-2.0",
26    ],
27    license_text: [
28        "NOTICE",
29    ],
30}
31
32cc_defaults {
33    name: "libvintf-defaults",
34    cflags: [
35        "-Wall",
36        "-Werror",
37        "-Wextra-semi",
38    ],
39
40    target: {
41        android: {
42            cflags: ["-DLIBVINTF_TARGET"],
43        },
44    }
45}
46
47libvintf_private_deps = [
48    "libbase",
49    "libhidl-gen-utils",
50    "liblog",
51    "libselinux",
52    "libtinyxml2",
53    "libz",
54]
55
56cc_defaults {
57    name: "libvintf_static_user_defaults",
58    static_libs: libvintf_private_deps,
59}
60
61cc_library {
62    name: "libvintf",
63    defaults: ["libvintf-defaults"],
64    host_supported: true,
65    recovery_available: true,
66    srcs: [
67        "parse_string.cpp",
68        "parse_xml.cpp",
69        "CompatibilityMatrix.cpp",
70        "FileSystem.cpp",
71        "HalManifest.cpp",
72        "HalInterface.cpp",
73        "KernelConfigTypedValue.cpp",
74        "KernelConfigParser.cpp",
75        "KernelInfo.cpp",
76        "RuntimeInfo.cpp",
77        "ManifestHal.cpp",
78        "ManifestInstance.cpp",
79        "MatrixHal.cpp",
80        "MatrixInstance.cpp",
81        "MatrixKernel.cpp",
82        "PropertyFetcher.cpp",
83        "Regex.cpp",
84        "SystemSdk.cpp",
85        "TransportArch.cpp",
86        "VintfObject.cpp",
87        "XmlFile.cpp",
88        "utils.cpp",
89    ],
90    shared_libs: libvintf_private_deps,
91    header_libs: [
92        "libaidlmetadata_headers",
93        "libhidlmetadata_headers",
94    ],
95    whole_static_libs: [
96        "libkver",
97    ],
98    export_include_dirs: ["include", "."],
99    local_include_dirs: ["include/vintf"],
100
101    export_shared_lib_headers: [
102        "libbase",
103        "libhidl-gen-utils",
104    ],
105    export_header_lib_headers: [
106        "libaidlmetadata_headers",
107        "libhidlmetadata_headers",
108    ],
109    target: {
110        host: {
111            srcs: [
112                "RuntimeInfo-host.cpp",
113                "VintfObjectRecovery.cpp",
114            ],
115        },
116        android: {
117            srcs: [
118                "RuntimeInfo-target.cpp",
119            ],
120        },
121        recovery: {
122            srcs: [
123                "VintfObjectRecovery.cpp",
124            ],
125        },
126    }
127}
128
129cc_library_headers {
130    name: "libvintf_local_headers",
131    host_supported: true,
132    export_include_dirs: ["."],
133    visibility: [
134        "//system/libvintf:__subpackages__",
135    ],
136}
137
138cc_binary {
139    name: "vintf",
140    defaults: ["libvintf-defaults"],
141    shared_libs: [
142        "libbase",
143        "libhidl-gen-utils",
144        "libvintf",
145    ],
146    srcs: [
147        "main.cpp"
148    ],
149}
150
151cc_binary_host {
152    name: "checkvintf",
153    defaults: ["libvintf-defaults"],
154    static_libs: [
155        "libaidlmetadata",
156        "libbase",
157        "libhidl-gen-utils",
158        "libhidlmetadata",
159        "liblog",
160        "libvintf",
161        "libvintf_fcm_exclude",
162        "libutils",
163        "libtinyxml2",
164    ],
165    stl: "libc++_static",
166    srcs: [
167        "check_vintf.cpp",
168        "HostFileSystem.cpp",
169    ],
170    local_include_dirs: ["include-host"],
171}
172
173cc_library_static {
174    name: "libassemblevintf",
175    host_supported: true,
176    defaults: ["libvintf-defaults"],
177    shared_libs: [
178        "libvintf",
179        "libbase",
180    ],
181    static_libs: [
182        "libvts_vintf_test_common",
183    ],
184    srcs: [
185        "AssembleVintf.cpp",
186    ],
187    export_include_dirs: ["include-test"],
188}
189
190cc_binary_host {
191    name: "assemble_vintf",
192    defaults: ["libvintf-defaults"],
193    shared_libs: [
194        "libvintf",
195        "libbase",
196    ],
197    static_libs: [
198        "libassemblevintf",
199        "libvts_vintf_test_common",
200    ],
201    srcs: [
202        "assemble_vintf_main.cpp"
203    ],
204}
205
206cc_defaults {
207    name: "libvintffm-defaults",
208    defaults: ["libvintf-defaults"],
209    host_supported: true,
210    export_include_dirs: [
211        "include-host",
212        "include-test",
213    ],
214    target: {
215        android: {
216            enabled: false,
217        },
218    },
219    static_libs: [
220        "libbase",
221        "libhidl-gen-utils",
222        "liblog",
223        "libtinyxml2",
224        "libutils",
225        "libvintf",
226    ],
227}
228
229cc_library_static {
230    name: "libvintffm",
231    defaults: ["libvintffm-defaults"],
232    srcs: [
233        "HostFileSystem.cpp",
234        "VintfFm.cpp",
235    ],
236}
237
238cc_binary_host {
239    name: "vintffm",
240    defaults: ["libvintffm-defaults"],
241    static_libs: [
242        "libvintffm",
243    ],
244    srcs: [
245        "VintfFmMain.cpp",
246    ],
247}
248