• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15subdirs = [
16    "test"
17]
18
19libvintf_flags = [
20    "-Wall",
21    "-Werror",
22]
23
24cc_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        "KernelConfigTypedValue.cpp",
44        "RuntimeInfo.cpp",
45        "ManifestHal.cpp",
46        "MatrixHal.cpp",
47        "MatrixKernel.cpp",
48        "TransportArch.cpp",
49        "VintfObject.cpp",
50        "utils.cpp",
51    ],
52
53    target: {
54        host: {
55            srcs: [
56                "RuntimeInfo-host.cpp"
57            ]
58        },
59        android: {
60            shared_libs: [
61                "libcutils",
62                "libutils",
63                "libz"
64            ],
65            srcs: [
66                "RuntimeInfo-target.cpp"
67            ],
68            cflags: ["-DLIBVINTF_TARGET"],
69        },
70    }
71}
72
73cc_binary {
74    name: "vintf",
75    cflags: libvintf_flags,
76    shared_libs: [
77        "libvintf",
78    ],
79    srcs: [
80        "main.cpp"
81    ],
82}
83
84cc_binary_host {
85    name: "assemble_vintf",
86    cflags: libvintf_flags,
87    shared_libs: [
88        "libvintf"
89    ],
90    srcs: [
91        "assemble_vintf.cpp"
92    ],
93}
94
95cc_library {
96    name: "libvintftest",
97    host_supported: true,
98    shared_libs: [
99        "libbase",
100        "liblog",
101        "libselinux",
102        "libtinyxml2",
103    ],
104    export_include_dirs: ["include/vintf", "include", "test", "."],
105    local_include_dirs: ["include/vintf", "test", "."],
106
107    srcs: [
108        "parse_string.cpp",
109        "parse_xml.cpp",
110        "CompatibilityMatrix.cpp",
111        "HalManifest.cpp",
112        "HalInterface.cpp",
113        "KernelConfigTypedValue.cpp",
114        "RuntimeInfo.cpp",
115        "ManifestHal.cpp",
116        "MatrixHal.cpp",
117        "MatrixKernel.cpp",
118        "TransportArch.cpp",
119        "VintfObject.cpp",
120        "test/RuntimeInfo-fake.cpp",
121        "test/utils-fake.cpp",
122    ],
123
124    target: {
125        android: {
126            shared_libs: [
127                "libcutils",
128                "libutils",
129                "libz"
130            ],
131            cflags: ["-DLIBVINTF_TARGET"],
132        },
133    }
134}
135