blob: 1ff4812b95fe876288551ced9288e1f319e32ad0 [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
15subdirs = [
16 "test"
17]
18
Steven Moreland12de2d42017-08-04 11:06:32 -070019cc_defaults {
20 name: "libvintf-defaults",
21 cflags: [
22 "-Wall",
23 "-Werror",
Yifan Hong832e3902018-07-16 15:22:55 -070024 "-Wextra-semi",
Steven Moreland12de2d42017-08-04 11:06:32 -070025 ],
Steven Moreland8eb7bc52018-06-01 15:55:23 -070026
27 target: {
28 android: {
29 cflags: ["-DLIBVINTF_TARGET"],
30 },
31 }
Steven Moreland12de2d42017-08-04 11:06:32 -070032}
Steven Moreland08f9ee72017-02-17 22:46:24 -080033
Yifan Hong9f78c182018-07-12 14:45:52 -070034cc_library {
35 name: "libvintf",
Yifan Honge621fb12018-02-28 14:41:38 -080036 defaults: ["libvintf-defaults"],
37 host_supported: true,
Yifan Hong3dc45842018-07-16 15:02:34 -070038 recovery_available: true,
Yifan Honga28729e2018-01-17 13:40:35 -080039 srcs: [
40 "parse_string.cpp",
41 "parse_xml.cpp",
42 "CompatibilityMatrix.cpp",
Yifan Hong10d86222018-04-06 15:41:05 -070043 "FileSystem.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080044 "HalManifest.cpp",
45 "HalInterface.cpp",
46 "KernelConfigTypedValue.cpp",
Yifan Honge621fb12018-02-28 14:41:38 -080047 "KernelConfigParser.cpp",
Yifan Hong90ed9972018-12-03 15:08:34 -080048 "KernelInfo.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080049 "RuntimeInfo.cpp",
50 "ManifestHal.cpp",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080051 "ManifestInstance.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080052 "MatrixHal.cpp",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080053 "MatrixInstance.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080054 "MatrixKernel.cpp",
Yifan Hong10d86222018-04-06 15:41:05 -070055 "PropertyFetcher.cpp",
Yifan Hong705216b2018-03-21 17:27:47 -070056 "Regex.cpp",
Yifan Honga28729e2018-01-17 13:40:35 -080057 "SystemSdk.cpp",
58 "TransportArch.cpp",
59 "VintfObject.cpp",
60 "XmlFile.cpp",
Yifan Honge621fb12018-02-28 14:41:38 -080061 ],
Yifan Hong676447a2016-11-15 12:57:23 -080062 shared_libs: [
63 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080064 "libhidl-gen-utils",
Yifan Hong676447a2016-11-15 12:57:23 -080065 "liblog",
Yifan Hongccf967b2017-01-18 11:04:19 -080066 "libselinux",
Yifan Hong676447a2016-11-15 12:57:23 -080067 "libtinyxml2",
Yifan Honge621fb12018-02-28 14:41:38 -080068 "libz",
69 ],
70 export_include_dirs: ["include", "."],
71 local_include_dirs: ["include/vintf"],
72
Yifan Hong2a90ffe2018-03-05 17:45:34 -080073 export_shared_lib_headers: [
74 "libhidl-gen-utils",
75 ],
76
Yifan Honge621fb12018-02-28 14:41:38 -080077 target: {
78 host: {
79 srcs: [
80 "RuntimeInfo-host.cpp",
81 ],
82 },
83 android: {
84 srcs: [
85 "RuntimeInfo-target.cpp",
86 ],
Yifan Honge621fb12018-02-28 14:41:38 -080087 },
88 }
89}
90
Yifan Hong676447a2016-11-15 12:57:23 -080091cc_binary {
92 name: "vintf",
Steven Moreland12de2d42017-08-04 11:06:32 -070093 defaults: ["libvintf-defaults"],
Yifan Hong676447a2016-11-15 12:57:23 -080094 shared_libs: [
Yifan Honge3a92342018-01-25 17:00:16 -080095 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -080096 "libhidl-gen-utils",
Yifan Hong676447a2016-11-15 12:57:23 -080097 "libvintf",
Yifan Hong676447a2016-11-15 12:57:23 -080098 ],
99 srcs: [
100 "main.cpp"
101 ],
102}
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000103
104cc_binary_host {
Yifan Honga72bde72017-09-28 13:36:48 -0700105 name: "checkvintf",
106 defaults: ["libvintf-defaults"],
Michael Schwartzc4c3b5e2017-11-08 20:21:08 -0800107 static_libs: [
Jae Shin13ebc4c2018-06-05 11:20:00 +0900108 "libbase",
Yifan Hong2a90ffe2018-03-05 17:45:34 -0800109 "libhidl-gen-utils",
Yifan Hong9f78c182018-07-12 14:45:52 -0700110 "libvintf",
Yifan Hong69c1b112018-02-27 17:06:00 -0800111 "libutils",
Michael Schwartzc4c3b5e2017-11-08 20:21:08 -0800112 "libtinyxml2",
113 ],
Jae Shin13ebc4c2018-06-05 11:20:00 +0900114 stl: "libc++_static",
Yifan Honga72bde72017-09-28 13:36:48 -0700115 srcs: [
116 "check_vintf.cpp",
Yifan Honga72bde72017-09-28 13:36:48 -0700117 ],
118}
119
Yifan Hong8302cea2017-12-18 20:17:05 -0800120cc_library_static {
121 name: "libassemblevintf",
122 host_supported: true,
123 defaults: ["libvintf-defaults"],
124 shared_libs: [
125 "libvintf",
126 "libbase",
127 ],
128 srcs: [
129 "AssembleVintf.cpp",
130 ],
131 export_include_dirs: ["include-test"],
132}
133
Yifan Honga72bde72017-09-28 13:36:48 -0700134cc_binary_host {
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000135 name: "assemble_vintf",
Steven Moreland12de2d42017-08-04 11:06:32 -0700136 defaults: ["libvintf-defaults"],
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000137 shared_libs: [
Yifan Hong9a8b1a72017-08-25 17:55:33 -0700138 "libvintf",
139 "libbase",
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000140 ],
Yifan Hong8302cea2017-12-18 20:17:05 -0800141 static_libs: [
142 "libassemblevintf",
143 ],
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000144 srcs: [
Yifan Hong8302cea2017-12-18 20:17:05 -0800145 "assemble_vintf_main.cpp"
Yifan Hong4d18bcc2017-04-07 21:47:16 +0000146 ],
147}
Yifan Hong00611d52018-04-05 16:28:33 -0700148
149cc_library_static {
150 name: "libvintf_recovery",
Jerry Zhangfbc9efc2018-07-17 12:21:40 -0700151 recovery_available: true,
Yifan Hong00611d52018-04-05 16:28:33 -0700152 defaults: ["libvintf-defaults"],
153 srcs: ["VintfObjectRecovery.cpp"],
154 export_include_dirs: ["include"],
155 local_include_dirs: ["include/vintf"],
156 static_libs: [
157 "libbase",
158 "libvintf",
159 "libhidl-gen-utils",
160 "libfs_mgr",
161 ],
162 export_static_lib_headers: ["libhidl-gen-utils"],
163}