Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 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 | |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "libvintf-defaults", |
| 17 | cflags: [ |
| 18 | "-Wall", |
| 19 | "-Werror", |
Yifan Hong | 832e390 | 2018-07-16 15:22:55 -0700 | [diff] [blame] | 20 | "-Wextra-semi", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 21 | ], |
Steven Moreland | 8eb7bc5 | 2018-06-01 15:55:23 -0700 | [diff] [blame] | 22 | |
| 23 | target: { |
| 24 | android: { |
| 25 | cflags: ["-DLIBVINTF_TARGET"], |
| 26 | }, |
| 27 | } |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 28 | } |
Steven Moreland | 08f9ee7 | 2017-02-17 22:46:24 -0800 | [diff] [blame] | 29 | |
Yifan Hong | 9f78c18 | 2018-07-12 14:45:52 -0700 | [diff] [blame] | 30 | cc_library { |
| 31 | name: "libvintf", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 32 | defaults: ["libvintf-defaults"], |
| 33 | host_supported: true, |
Yifan Hong | 3dc4584 | 2018-07-16 15:02:34 -0700 | [diff] [blame] | 34 | recovery_available: true, |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 35 | srcs: [ |
| 36 | "parse_string.cpp", |
| 37 | "parse_xml.cpp", |
| 38 | "CompatibilityMatrix.cpp", |
Yifan Hong | 10d8622 | 2018-04-06 15:41:05 -0700 | [diff] [blame] | 39 | "FileSystem.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 40 | "HalManifest.cpp", |
| 41 | "HalInterface.cpp", |
| 42 | "KernelConfigTypedValue.cpp", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 43 | "KernelConfigParser.cpp", |
Yifan Hong | 90ed997 | 2018-12-03 15:08:34 -0800 | [diff] [blame] | 44 | "KernelInfo.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 45 | "RuntimeInfo.cpp", |
| 46 | "ManifestHal.cpp", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 47 | "ManifestInstance.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 48 | "MatrixHal.cpp", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 49 | "MatrixInstance.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 50 | "MatrixKernel.cpp", |
Yifan Hong | 10d8622 | 2018-04-06 15:41:05 -0700 | [diff] [blame] | 51 | "PropertyFetcher.cpp", |
Yifan Hong | 705216b | 2018-03-21 17:27:47 -0700 | [diff] [blame] | 52 | "Regex.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 53 | "SystemSdk.cpp", |
| 54 | "TransportArch.cpp", |
| 55 | "VintfObject.cpp", |
| 56 | "XmlFile.cpp", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 57 | ], |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 58 | shared_libs: [ |
| 59 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 60 | "libhidl-gen-utils", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 61 | "liblog", |
Yifan Hong | ccf967b | 2017-01-18 11:04:19 -0800 | [diff] [blame] | 62 | "libselinux", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 63 | "libtinyxml2", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 64 | "libz", |
| 65 | ], |
Yifan Hong | ff1a25c | 2020-03-17 14:09:10 -0700 | [diff] [blame] | 66 | header_libs: [ |
| 67 | "libhidlmetadata_headers", |
| 68 | ], |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 69 | export_include_dirs: ["include", "."], |
| 70 | local_include_dirs: ["include/vintf"], |
| 71 | |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 72 | export_shared_lib_headers: [ |
Yifan Hong | 6e32a5f | 2020-03-12 16:06:27 -0700 | [diff] [blame] | 73 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 74 | "libhidl-gen-utils", |
| 75 | ], |
Yifan Hong | ff1a25c | 2020-03-17 14:09:10 -0700 | [diff] [blame] | 76 | export_header_lib_headers: [ |
| 77 | "libhidlmetadata_headers", |
| 78 | ], |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 79 | target: { |
| 80 | host: { |
| 81 | srcs: [ |
| 82 | "RuntimeInfo-host.cpp", |
| 83 | ], |
| 84 | }, |
| 85 | android: { |
| 86 | srcs: [ |
| 87 | "RuntimeInfo-target.cpp", |
| 88 | ], |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 89 | }, |
| 90 | } |
| 91 | } |
| 92 | |
Yifan Hong | a7459dd | 2019-09-10 18:02:41 -0700 | [diff] [blame] | 93 | cc_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 Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 102 | cc_binary { |
| 103 | name: "vintf", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 104 | defaults: ["libvintf-defaults"], |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 105 | shared_libs: [ |
Yifan Hong | e3a9234 | 2018-01-25 17:00:16 -0800 | [diff] [blame] | 106 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 107 | "libhidl-gen-utils", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 108 | "libvintf", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 109 | ], |
| 110 | srcs: [ |
| 111 | "main.cpp" |
| 112 | ], |
| 113 | } |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 114 | |
| 115 | cc_binary_host { |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 116 | name: "checkvintf", |
| 117 | defaults: ["libvintf-defaults"], |
Michael Schwartz | c4c3b5e | 2017-11-08 20:21:08 -0800 | [diff] [blame] | 118 | static_libs: [ |
Jae Shin | 13ebc4c | 2018-06-05 11:20:00 +0900 | [diff] [blame] | 119 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 120 | "libhidl-gen-utils", |
Yifan Hong | ff1a25c | 2020-03-17 14:09:10 -0700 | [diff] [blame] | 121 | "libhidlmetadata", |
Tom Cherry | 8ce091a | 2020-01-09 09:20:14 -0800 | [diff] [blame] | 122 | "liblog", |
Yifan Hong | 9f78c18 | 2018-07-12 14:45:52 -0700 | [diff] [blame] | 123 | "libvintf", |
Yifan Hong | 69c1b11 | 2018-02-27 17:06:00 -0800 | [diff] [blame] | 124 | "libutils", |
Michael Schwartz | c4c3b5e | 2017-11-08 20:21:08 -0800 | [diff] [blame] | 125 | "libtinyxml2", |
| 126 | ], |
Jae Shin | 13ebc4c | 2018-06-05 11:20:00 +0900 | [diff] [blame] | 127 | stl: "libc++_static", |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 128 | srcs: [ |
| 129 | "check_vintf.cpp", |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 130 | ], |
| 131 | } |
| 132 | |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 133 | cc_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 Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 147 | cc_binary_host { |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 148 | name: "assemble_vintf", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 149 | defaults: ["libvintf-defaults"], |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 150 | shared_libs: [ |
Yifan Hong | 9a8b1a7 | 2017-08-25 17:55:33 -0700 | [diff] [blame] | 151 | "libvintf", |
| 152 | "libbase", |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 153 | ], |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 154 | static_libs: [ |
| 155 | "libassemblevintf", |
| 156 | ], |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 157 | srcs: [ |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 158 | "assemble_vintf_main.cpp" |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 159 | ], |
| 160 | } |
Yifan Hong | 00611d5 | 2018-04-05 16:28:33 -0700 | [diff] [blame] | 161 | |