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 19 libvintf_flags = [ 20 "-Wall", 21 "-Werror", 22 ] 23 24 cc_library { 25 name: "libvintf", 26 host_supported: true, 27 cflags: libvintf_flags, 28 shared_libs: [ 29 "libbase", 30 "liblog", 31 "libselinux", 32 "libtinyxml2", 33 ], 34 export_include_dirs: ["include"], 35 local_include_dirs: ["include/vintf"], 36 37 srcs: [ 38 "parse_string.cpp", 39 "parse_xml.cpp", 40 "CompatibilityMatrix.cpp", 41 "HalManifest.cpp", 42 "HalInterface.cpp", 43 "KernelConfigParser.cpp", 44 "KernelConfigTypedValue.cpp", 45 "RuntimeInfo.cpp", 46 "ManifestHal.cpp", 47 "MatrixHal.cpp", 48 "MatrixKernel.cpp", 49 "TransportArch.cpp", 50 "VintfObject.cpp", 51 "XmlFile.cpp", 52 "utils.cpp", 53 ], 54 55 target: { 56 host: { 57 srcs: [ 58 "RuntimeInfo-host.cpp" 59 ], 60 cflags: [ 61 "-DLIBVINTF_HOST", 62 ], 63 }, 64 android: { 65 shared_libs: [ 66 "libcutils", 67 "libutils", 68 "libz" 69 ], 70 srcs: [ 71 "RuntimeInfo-target.cpp" 72 ], 73 cflags: ["-DLIBVINTF_TARGET"], 74 }, 75 } 76 } 77 78 cc_binary { 79 name: "vintf", 80 cflags: libvintf_flags, 81 shared_libs: [ 82 "libvintf", 83 ], 84 srcs: [ 85 "main.cpp" 86 ], 87 } 88 89 cc_binary_host { 90 name: "assemble_vintf", 91 cflags: libvintf_flags, 92 shared_libs: [ 93 "libvintf", 94 "libbase", 95 ], 96 srcs: [ 97 "assemble_vintf.cpp" 98 ], 99 } 100 101 cc_library { 102 name: "libvintftest", 103 host_supported: true, 104 shared_libs: [ 105 "libbase", 106 "liblog", 107 "libselinux", 108 "libtinyxml2", 109 ], 110 export_include_dirs: ["include/vintf", "include", "test", "."], 111 local_include_dirs: ["include/vintf", "test", "."], 112 113 srcs: [ 114 "parse_string.cpp", 115 "parse_xml.cpp", 116 "CompatibilityMatrix.cpp", 117 "HalManifest.cpp", 118 "HalInterface.cpp", 119 "KernelConfigTypedValue.cpp", 120 "RuntimeInfo.cpp", 121 "ManifestHal.cpp", 122 "MatrixHal.cpp", 123 "MatrixKernel.cpp", 124 "TransportArch.cpp", 125 "VintfObject.cpp", 126 "XmlFile.cpp", 127 "test/RuntimeInfo-fake.cpp", 128 "test/utils-fake.cpp", 129 ], 130 131 target: { 132 android: { 133 shared_libs: [ 134 "libcutils", 135 "libutils", 136 "libz" 137 ], 138 cflags: ["-DLIBVINTF_TARGET"], 139 }, 140 } 141 } 142