blob: 12ab161cf4c8d118a62cf24830a6bb68193f5ba2 [file] [log] [blame]
Yifan Hong676447a2016-11-15 12:57:23 -08001// 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
Steven Moreland12de2d42017-08-04 11:06:32 -070015cc_defaults {
16 name: "libvintf-defaults",
17 cflags: [
18 "-Wall",
19 "-Werror",
Yifan Hong832e3902018-07-16 15:22:55 -070020 "-Wextra-semi",
Steven Moreland12de2d42017-08-04 11:06:32 -070021 ],
Steven Moreland8eb7bc52018-06-01 15:55:23 -070022
23 target: {
24 android: {
25 cflags: ["-DLIBVINTF_TARGET"],
26 },
27 }
Steven Moreland12de2d42017-08-04 11:06:32 -070028}
Steven Moreland08f9ee72017-02-17 22:46:24 -080029
Yifan Hong9f78c182018-07-12 14:45:52 -070030cc_library {
31 name: "libvintf",
Yifan Honge621fb12018-02-28 14:41:38 -080032 defaults: ["libvintf-defaults"],
33 host_supported: true,
Yifan Hong3dc45842018-07-16 15:02:34 -070034 recovery_available: true,
Yifan Honga28729e2018-01-17 13:40:35 -080035 srcs: [
36 "parse_string.cpp",
37 "parse_xml.cpp",
38 "CompatibilityMatrix.cpp",
Yifan Hong10d86222018-04-06 15:41:05 -070039 "FileSystem.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080040 "HalManifest.cpp",
41 "HalInterface.cpp",
42 "KernelConfigTypedValue.cpp",
Yifan Honge621fb12018-02-28 14:41:38 -080043 "KernelConfigParser.cpp",
Yifan Hong90ed9972018-12-03 15:08:34 -080044 "KernelInfo.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080045 "RuntimeInfo.cpp",
46 "ManifestHal.cpp",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080047 "ManifestInstance.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080048 "MatrixHal.cpp",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080049 "MatrixInstance.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080050 "MatrixKernel.cpp",
Yifan Hong10d86222018-04-06 15:41:05 -070051 "PropertyFetcher.cpp",
Yifan Hong705216b2018-03-21 17:27:47 -070052 "Regex.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080053 "SystemSdk.cpp",
54 "TransportArch.cpp",
55 "VintfObject.cpp",
56 "XmlFile.cpp",
Yifan Honge621fb12018-02-28 14:41:38 -080057 ],
Yifan Hong676447a2016-11-15 12:57:23 -080058 shared_libs: [
59 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080060 "libhidl-gen-utils",
Yifan Hong676447a2016-11-15 12:57:23 -080061 "liblog",
Yifan Hongccf967b2017-01-18 11:04:19 -080062 "libselinux",
Yifan Hong676447a2016-11-15 12:57:23 -080063 "libtinyxml2",
Yifan Honge621fb12018-02-28 14:41:38 -080064 "libz",
65 ],
Yifan Hongff1a25c2020-03-17 14:09:10 -070066 header_libs: [
67 "libhidlmetadata_headers",
68 ],
Yifan Honge621fb12018-02-28 14:41:38 -080069 export_include_dirs: ["include", "."],
70 local_include_dirs: ["include/vintf"],
71
Yifan Hong2a90ffe2018-03-05 17:45:34 -080072 export_shared_lib_headers: [
Yifan Hong6e32a5f2020-03-12 16:06:27 -070073 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080074 "libhidl-gen-utils",
75 ],
Yifan Hongff1a25c2020-03-17 14:09:10 -070076 export_header_lib_headers: [
77 "libhidlmetadata_headers",
78 ],
Yifan Honge621fb12018-02-28 14:41:38 -080079 target: {
80 host: {
81 srcs: [
82 "RuntimeInfo-host.cpp",
83 ],
84 },
85 android: {
86 srcs: [
87 "RuntimeInfo-target.cpp",
88 ],
Yifan Honge621fb12018-02-28 14:41:38 -080089 },
90 }
91}
92
Yifan Honga7459dd2019-09-10 18:02:41 -070093cc_library_headers {
94 name: "libvintf_local_headers",
95 host_supported: true,
96 export_include_dirs: ["."],
97 visibility: [
98 "//system/libvintf:__subpackages__",
99 ],
100}
101
Yifan Hong676447a2016-11-15 12:57:23 -0800102cc_binary {
103 name: "vintf",
Steven Moreland12de2d42017-08-04 11:06:32 -0700104 defaults: ["libvintf-defaults"],
Yifan Hong676447a2016-11-15 12:57:23 -0800105 shared_libs: [
Yifan Honge3a92342018-01-25 17:00:16 -0800106 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -0800107 "libhidl-gen-utils",
Yifan Hong676447a2016-11-15 12:57:23 -0800108 "libvintf",
Yifan Hong676447a2016-11-15 12:57:23 -0800109 ],
110 srcs: [
111 "main.cpp"
112 ],
113}
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000114
115cc_binary_host {
Yifan Honga72bde72017-09-28 13:36:48 -0700116 name: "checkvintf",
117 defaults: ["libvintf-defaults"],
Michael Schwartzc4c3b5e2017-11-08 20:21:08 -0800118 static_libs: [
Jae Shin13ebc4c2018-06-05 11:20:00 +0900119 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -0800120 "libhidl-gen-utils",
Yifan Hongff1a25c2020-03-17 14:09:10 -0700121 "libhidlmetadata",
Tom Cherry8ce091a2020-01-09 09:20:14 -0800122 "liblog",
Yifan Hong9f78c182018-07-12 14:45:52 -0700123 "libvintf",
Yifan Hong69c1b112018-02-27 17:06:00 -0800124 "libutils",
Michael Schwartzc4c3b5e2017-11-08 20:21:08 -0800125 "libtinyxml2",
126 ],
Jae Shin13ebc4c2018-06-05 11:20:00 +0900127 stl: "libc++_static",
Yifan Honga72bde72017-09-28 13:36:48 -0700128 srcs: [
129 "check_vintf.cpp",
Yifan Honga72bde72017-09-28 13:36:48 -0700130 ],
131}
132
Yifan Hong8302cea2017-12-18 20:17:05 -0800133cc_library_static {
134 name: "libassemblevintf",
135 host_supported: true,
136 defaults: ["libvintf-defaults"],
137 shared_libs: [
138 "libvintf",
139 "libbase",
140 ],
141 srcs: [
142 "AssembleVintf.cpp",
143 ],
144 export_include_dirs: ["include-test"],
145}
146
Yifan Honga72bde72017-09-28 13:36:48 -0700147cc_binary_host {
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000148 name: "assemble_vintf",
Steven Moreland12de2d42017-08-04 11:06:32 -0700149 defaults: ["libvintf-defaults"],
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000150 shared_libs: [
Yifan Hong9a8b1a72017-08-25 17:55:33 -0700151 "libvintf",
152 "libbase",
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000153 ],
Yifan Hong8302cea2017-12-18 20:17:05 -0800154 static_libs: [
155 "libassemblevintf",
156 ],
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000157 srcs: [
Yifan Hong8302cea2017-12-18 20:17:05 -0800158 "assemble_vintf_main.cpp"
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000159 ],
160}
Yifan Hong00611d52018-04-05 16:28:33 -0700161