blob: d0c31e91dbc4b9152dd7540e49fdeb857a2a5808 [file] [log] [blame]
Dan Willemsene4376b82016-09-26 13:58:25 -07001// 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",
Dan Willemsen676abdc2016-09-28 19:42:22 -070017 "test",
Dan Willemsene4376b82016-09-26 13:58:25 -070018 "utils",
19]
20
Steven Moreland60818632017-02-04 00:33:42 -080021hidl_flags = [
22 "-O0",
23 "-g",
24 "-Wall",
25 "-Werror",
26]
27
Steven Morelandf9cf33b2017-05-18 13:58:54 -070028// This configuration is inherited by all hidl-gen-generated modules.
Steven Moreland6a3cdff2017-05-18 16:14:38 -070029cc_defaults {
30 name: "hidl-module-defaults",
Steven Morelandfa5b4042017-06-19 16:44:36 +000031 cflags: [
32 "-Wall",
33 "-Werror",
34 ],
Steven Moreland6a3cdff2017-05-18 16:14:38 -070035 product_variables: {
Steven Morelandf9cf33b2017-05-18 13:58:54 -070036 debuggable: {
37 cflags: ["-D__ANDROID_DEBUGGABLE__"]
38 },
Steven Moreland6a3cdff2017-05-18 16:14:38 -070039 treble: {
40 cflags: ["-D__ANDROID_TREBLE__"]
Steven Morelandf9cf33b2017-05-18 13:58:54 -070041 },
42 },
Steven Moreland6a3cdff2017-05-18 16:14:38 -070043}
44
Dan Willemsene4376b82016-09-26 13:58:25 -070045//
Steven Moreland5bdfa702017-04-18 23:20:39 -070046// libhidl-gen-hash
47//
Steven Moreland8cf3ac32017-04-20 15:00:25 -070048cc_library_shared {
Steven Moreland5bdfa702017-04-18 23:20:39 -070049 name: "libhidl-gen-hash",
Steven Moreland8cf3ac32017-04-20 15:00:25 -070050 host_supported: true,
Steven Moreland5bdfa702017-04-18 23:20:39 -070051 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//
Dan Willemsene4376b82016-09-26 13:58:25 -070063// libhidl-gen
64//
Steven Moreland5bdfa702017-04-18 23:20:39 -070065cc_library_host_shared {
Dan Willemsene4376b82016-09-26 13:58:25 -070066 name: "libhidl-gen",
Steven Moreland60818632017-02-04 00:33:42 -080067 cflags: hidl_flags,
Dan Willemsene4376b82016-09-26 13:58:25 -070068 srcs: [
69 "Annotation.cpp",
70 "ArrayType.cpp",
71 "CompoundType.cpp",
72 "ConstantExpression.cpp",
Martijn Coenen115d4282016-12-19 05:14:04 +010073 "DeathRecipientType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070074 "EnumType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070075 "HandleType.cpp",
Andreas Huber6755e9d2017-04-06 11:09:07 -070076 "HidlTypeAssertion.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070077 "Interface.cpp",
Martijn Coenen99e6beb2016-12-01 15:48:42 +010078 "MemoryType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070079 "Method.cpp",
80 "NamedType.cpp",
Martijn Coenen99e6beb2016-12-01 15:48:42 +010081 "PointerType.cpp",
Hridya Valsarajua32bde82016-12-27 11:47:46 -080082 "FmqType.cpp",
Yifan Hongbf459bc2016-08-23 16:50:37 -070083 "RefType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070084 "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",
Steven Moreland5bdfa702017-04-18 23:20:39 -070094 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -070095 "libhidl-gen-utils",
96 ],
97}
98
99//
100// libhidl-gen-ast
101//
102
103cc_library_host_shared {
104 name: "libhidl-gen-ast",
Steven Moreland60818632017-02-04 00:33:42 -0800105 cflags: hidl_flags,
Dan Willemsene4376b82016-09-26 13:58:25 -0700106 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 ],
Dan Willemsene4376b82016-09-26 13:58:25 -0700116 shared_libs: [
117 "libbase",
118 "liblog",
119 "libhidl-gen",
Steven Moreland5bdfa702017-04-18 23:20:39 -0700120 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -0700121 "libhidl-gen-utils",
122 ],
123}
124
125//
126// hidl-gen
127//
128cc_binary_host {
129 name: "hidl-gen",
Steven Moreland60818632017-02-04 00:33:42 -0800130 cflags: hidl_flags,
Dan Willemsene4376b82016-09-26 13:58:25 -0700131 srcs: ["main.cpp"],
Dan Willemsene4376b82016-09-26 13:58:25 -0700132 shared_libs: [
133 "libbase",
134 "liblog",
135 "libhidl-gen",
136 "libhidl-gen-ast",
Steven Moreland5bdfa702017-04-18 23:20:39 -0700137 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -0700138 "libhidl-gen-utils",
139 ],
Dan Willemsene4376b82016-09-26 13:58:25 -0700140}