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 | |
| 15 | subdirs = [ |
| 16 | "test" |
| 17 | ] |
| 18 | |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 19 | cc_defaults { |
| 20 | name: "libvintf-defaults", |
| 21 | cflags: [ |
| 22 | "-Wall", |
| 23 | "-Werror", |
Yifan Hong | 832e390 | 2018-07-16 15:22:55 -0700 | [diff] [blame] | 24 | "-Wextra-semi", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 25 | ], |
Steven Moreland | 8eb7bc5 | 2018-06-01 15:55:23 -0700 | [diff] [blame] | 26 | |
| 27 | target: { |
| 28 | android: { |
| 29 | cflags: ["-DLIBVINTF_TARGET"], |
| 30 | }, |
| 31 | } |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 32 | } |
Steven Moreland | 08f9ee7 | 2017-02-17 22:46:24 -0800 | [diff] [blame] | 33 | |
Yifan Hong | 9f78c18 | 2018-07-12 14:45:52 -0700 | [diff] [blame] | 34 | cc_library { |
| 35 | name: "libvintf", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 36 | defaults: ["libvintf-defaults"], |
| 37 | host_supported: true, |
Yifan Hong | 3dc4584 | 2018-07-16 15:02:34 -0700 | [diff] [blame] | 38 | recovery_available: true, |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 39 | srcs: [ |
| 40 | "parse_string.cpp", |
| 41 | "parse_xml.cpp", |
| 42 | "CompatibilityMatrix.cpp", |
Yifan Hong | 10d8622 | 2018-04-06 15:41:05 -0700 | [diff] [blame] | 43 | "FileSystem.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 44 | "HalManifest.cpp", |
| 45 | "HalInterface.cpp", |
| 46 | "KernelConfigTypedValue.cpp", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 47 | "KernelConfigParser.cpp", |
Yifan Hong | 90ed997 | 2018-12-03 15:08:34 -0800 | [diff] [blame] | 48 | "KernelInfo.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 49 | "RuntimeInfo.cpp", |
| 50 | "ManifestHal.cpp", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 51 | "ManifestInstance.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 52 | "MatrixHal.cpp", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 53 | "MatrixInstance.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 54 | "MatrixKernel.cpp", |
Yifan Hong | 10d8622 | 2018-04-06 15:41:05 -0700 | [diff] [blame] | 55 | "PropertyFetcher.cpp", |
Yifan Hong | 705216b | 2018-03-21 17:27:47 -0700 | [diff] [blame] | 56 | "Regex.cpp", |
Yifan Hong | a28729e | 2018-01-17 13:40:35 -0800 | [diff] [blame] | 57 | "SystemSdk.cpp", |
| 58 | "TransportArch.cpp", |
| 59 | "VintfObject.cpp", |
| 60 | "XmlFile.cpp", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 61 | ], |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 62 | shared_libs: [ |
| 63 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 64 | "libhidl-gen-utils", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 65 | "liblog", |
Yifan Hong | ccf967b | 2017-01-18 11:04:19 -0800 | [diff] [blame] | 66 | "libselinux", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 67 | "libtinyxml2", |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 68 | "libz", |
| 69 | ], |
| 70 | export_include_dirs: ["include", "."], |
| 71 | local_include_dirs: ["include/vintf"], |
| 72 | |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 73 | export_shared_lib_headers: [ |
| 74 | "libhidl-gen-utils", |
| 75 | ], |
| 76 | |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 77 | target: { |
| 78 | host: { |
| 79 | srcs: [ |
| 80 | "RuntimeInfo-host.cpp", |
| 81 | ], |
| 82 | }, |
| 83 | android: { |
| 84 | srcs: [ |
| 85 | "RuntimeInfo-target.cpp", |
| 86 | ], |
Yifan Hong | e621fb1 | 2018-02-28 14:41:38 -0800 | [diff] [blame] | 87 | }, |
| 88 | } |
| 89 | } |
| 90 | |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 91 | cc_binary { |
| 92 | name: "vintf", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 93 | defaults: ["libvintf-defaults"], |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 94 | shared_libs: [ |
Yifan Hong | e3a9234 | 2018-01-25 17:00:16 -0800 | [diff] [blame] | 95 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 96 | "libhidl-gen-utils", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 97 | "libvintf", |
Yifan Hong | 676447a | 2016-11-15 12:57:23 -0800 | [diff] [blame] | 98 | ], |
| 99 | srcs: [ |
| 100 | "main.cpp" |
| 101 | ], |
| 102 | } |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 103 | |
| 104 | cc_binary_host { |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 105 | name: "checkvintf", |
| 106 | defaults: ["libvintf-defaults"], |
Michael Schwartz | c4c3b5e | 2017-11-08 20:21:08 -0800 | [diff] [blame] | 107 | static_libs: [ |
Jae Shin | 13ebc4c | 2018-06-05 11:20:00 +0900 | [diff] [blame] | 108 | "libbase", |
Yifan Hong | 2a90ffe | 2018-03-05 17:45:34 -0800 | [diff] [blame] | 109 | "libhidl-gen-utils", |
Yifan Hong | 9f78c18 | 2018-07-12 14:45:52 -0700 | [diff] [blame] | 110 | "libvintf", |
Yifan Hong | 69c1b11 | 2018-02-27 17:06:00 -0800 | [diff] [blame] | 111 | "libutils", |
Michael Schwartz | c4c3b5e | 2017-11-08 20:21:08 -0800 | [diff] [blame] | 112 | "libtinyxml2", |
| 113 | ], |
Jae Shin | 13ebc4c | 2018-06-05 11:20:00 +0900 | [diff] [blame] | 114 | stl: "libc++_static", |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 115 | srcs: [ |
| 116 | "check_vintf.cpp", |
Yifan Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 117 | ], |
| 118 | } |
| 119 | |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 120 | cc_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 Hong | a72bde7 | 2017-09-28 13:36:48 -0700 | [diff] [blame] | 134 | cc_binary_host { |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 135 | name: "assemble_vintf", |
Steven Moreland | 12de2d4 | 2017-08-04 11:06:32 -0700 | [diff] [blame] | 136 | defaults: ["libvintf-defaults"], |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 137 | shared_libs: [ |
Yifan Hong | 9a8b1a7 | 2017-08-25 17:55:33 -0700 | [diff] [blame] | 138 | "libvintf", |
| 139 | "libbase", |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 140 | ], |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 141 | static_libs: [ |
| 142 | "libassemblevintf", |
| 143 | ], |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 144 | srcs: [ |
Yifan Hong | 8302cea | 2017-12-18 20:17:05 -0800 | [diff] [blame] | 145 | "assemble_vintf_main.cpp" |
Yifan Hong | 4d18bcc | 2017-04-07 21:47:16 +0000 | [diff] [blame] | 146 | ], |
| 147 | } |
Yifan Hong | 00611d5 | 2018-04-05 16:28:33 -0700 | [diff] [blame] | 148 | |
| 149 | cc_library_static { |
| 150 | name: "libvintf_recovery", |
Jerry Zhang | fbc9efc | 2018-07-17 12:21:40 -0700 | [diff] [blame] | 151 | recovery_available: true, |
Yifan Hong | 00611d5 | 2018-04-05 16:28:33 -0700 | [diff] [blame] | 152 | 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 | } |