• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2016 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    "c2hal",
17    "test",
18    "utils",
19]
20
21hidl_flags = [
22    "-O0",
23    "-g",
24    "-Wall",
25    "-Werror",
26]
27
28// This configuration is inherited by all hidl-gen-generated modules.
29cc_defaults {
30    name: "hidl-module-defaults",
31    cflags: [
32        "-Wall",
33        "-Werror",
34    ],
35    product_variables: {
36        debuggable: {
37            cflags: ["-D__ANDROID_DEBUGGABLE__"]
38        },
39        treble: {
40            cflags: ["-D__ANDROID_TREBLE__"]
41        },
42    },
43}
44
45//
46// libhidl-gen-hash
47//
48cc_library {
49    name: "libhidl-gen-hash",
50    host_supported: true,
51    cflags: hidl_flags,
52    srcs: ["Hash.cpp"],
53    local_include_dirs: ["include_hash/hidl-hash"],
54    export_include_dirs: ["include_hash"],
55    shared_libs: [
56        "libbase",
57        "libcrypto",
58        "libssl",
59    ],
60}
61
62//
63// libhidl-gen
64//
65cc_library_host_shared {
66    name: "libhidl-gen",
67    cflags: hidl_flags,
68    srcs: [
69        "Annotation.cpp",
70        "ArrayType.cpp",
71        "CompoundType.cpp",
72        "ConstantExpression.cpp",
73        "DeathRecipientType.cpp",
74        "EnumType.cpp",
75        "HandleType.cpp",
76        "HidlTypeAssertion.cpp",
77        "Interface.cpp",
78        "MemoryType.cpp",
79        "Method.cpp",
80        "NamedType.cpp",
81        "PointerType.cpp",
82        "FmqType.cpp",
83        "RefType.cpp",
84        "ScalarType.cpp",
85        "Scope.cpp",
86        "StringType.cpp",
87        "Type.cpp",
88        "TypeDef.cpp",
89        "VectorType.cpp",
90    ],
91    shared_libs: [
92        "libbase",
93        "liblog",
94        "libhidl-gen-hash",
95        "libhidl-gen-utils",
96    ],
97}
98
99//
100// libhidl-gen-ast
101//
102
103cc_library_host_shared {
104    name: "libhidl-gen-ast",
105    cflags: hidl_flags,
106    srcs: [
107        "Coordinator.cpp",
108        "generateCpp.cpp",
109        "generateCppImpl.cpp",
110        "generateJava.cpp",
111        "generateVts.cpp",
112        "hidl-gen_y.yy",
113        "hidl-gen_l.ll",
114        "AST.cpp",
115    ],
116    shared_libs: [
117        "libbase",
118        "liblog",
119        "libhidl-gen",
120        "libhidl-gen-hash",
121        "libhidl-gen-utils",
122    ],
123}
124
125//
126// hidl-gen
127//
128cc_binary_host {
129    name: "hidl-gen",
130    cflags: hidl_flags,
131    srcs: ["main.cpp"],
132    shared_libs: [
133        "libbase",
134        "liblog",
135        "libhidl-gen",
136        "libhidl-gen-ast",
137        "libhidl-gen-hash",
138        "libhidl-gen-utils",
139    ],
140}
141