• 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    product_variables: {
32        debuggable: {
33            cflags: ["-D__ANDROID_DEBUGGABLE__"]
34        },
35        treble: {
36            cflags: ["-D__ANDROID_TREBLE__"]
37        },
38    },
39}
40
41//
42// libhidl-gen-hash
43//
44cc_library_shared {
45    name: "libhidl-gen-hash",
46    host_supported: true,
47    cflags: hidl_flags,
48    srcs: ["Hash.cpp"],
49    local_include_dirs: ["include_hash/hidl-hash"],
50    export_include_dirs: ["include_hash"],
51    shared_libs: [
52        "libbase",
53        "libcrypto",
54        "libssl",
55    ],
56}
57
58//
59// libhidl-gen
60//
61cc_library_host_shared {
62    name: "libhidl-gen",
63    cflags: hidl_flags,
64    srcs: [
65        "Annotation.cpp",
66        "ArrayType.cpp",
67        "CompoundType.cpp",
68        "ConstantExpression.cpp",
69        "DeathRecipientType.cpp",
70        "EnumType.cpp",
71        "HandleType.cpp",
72        "HidlTypeAssertion.cpp",
73        "Interface.cpp",
74        "MemoryType.cpp",
75        "Method.cpp",
76        "NamedType.cpp",
77        "PointerType.cpp",
78        "FmqType.cpp",
79        "RefType.cpp",
80        "ScalarType.cpp",
81        "Scope.cpp",
82        "StringType.cpp",
83        "Type.cpp",
84        "TypeDef.cpp",
85        "VectorType.cpp",
86    ],
87    shared_libs: [
88        "libbase",
89        "liblog",
90        "libhidl-gen-hash",
91        "libhidl-gen-utils",
92    ],
93}
94
95//
96// libhidl-gen-ast
97//
98
99cc_library_host_shared {
100    name: "libhidl-gen-ast",
101    cflags: hidl_flags,
102    srcs: [
103        "Coordinator.cpp",
104        "generateCpp.cpp",
105        "generateCppImpl.cpp",
106        "generateJava.cpp",
107        "generateVts.cpp",
108        "hidl-gen_y.yy",
109        "hidl-gen_l.ll",
110        "AST.cpp",
111    ],
112    shared_libs: [
113        "libbase",
114        "liblog",
115        "libhidl-gen",
116        "libhidl-gen-hash",
117        "libhidl-gen-utils",
118    ],
119}
120
121//
122// hidl-gen
123//
124cc_binary_host {
125    name: "hidl-gen",
126    cflags: hidl_flags,
127    srcs: ["main.cpp"],
128    shared_libs: [
129        "libbase",
130        "liblog",
131        "libhidl-gen",
132        "libhidl-gen-ast",
133        "libhidl-gen-hash",
134        "libhidl-gen-utils",
135    ],
136}
137