blob: 4743e1e0cf630d06997a41e7dfee73e9712ff7ab [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 Moreland3ee43c82017-08-04 11:03:02 -070021cc_defaults {
22 name: "hidl-gen-defaults",
23 cflags: [
24 "-O0",
25 "-g",
26 "-Wall",
27 "-Werror",
28 ],
29}
Steven Moreland60818632017-02-04 00:33:42 -080030
Steven Morelandf9cf33b2017-05-18 13:58:54 -070031// This configuration is inherited by all hidl-gen-generated modules.
Steven Moreland6a3cdff2017-05-18 16:14:38 -070032cc_defaults {
33 name: "hidl-module-defaults",
Steven Morelandfa5b4042017-06-19 16:44:36 +000034 cflags: [
35 "-Wall",
36 "-Werror",
37 ],
Steven Moreland6a3cdff2017-05-18 16:14:38 -070038 product_variables: {
Steven Morelandf9cf33b2017-05-18 13:58:54 -070039 debuggable: {
40 cflags: ["-D__ANDROID_DEBUGGABLE__"]
41 },
Steven Moreland6a3cdff2017-05-18 16:14:38 -070042 treble: {
43 cflags: ["-D__ANDROID_TREBLE__"]
Steven Morelandf9cf33b2017-05-18 13:58:54 -070044 },
45 },
Steven Moreland6a3cdff2017-05-18 16:14:38 -070046}
47
Dan Willemsene4376b82016-09-26 13:58:25 -070048//
Steven Moreland5bdfa702017-04-18 23:20:39 -070049// libhidl-gen-hash
50//
Tri Vo7089aa42017-07-28 12:58:17 -070051cc_library {
Steven Moreland5bdfa702017-04-18 23:20:39 -070052 name: "libhidl-gen-hash",
Steven Moreland8cf3ac32017-04-20 15:00:25 -070053 host_supported: true,
Steven Moreland3ee43c82017-08-04 11:03:02 -070054 defaults: ["hidl-gen-defaults"],
Steven Moreland5bdfa702017-04-18 23:20:39 -070055 srcs: ["Hash.cpp"],
56 local_include_dirs: ["include_hash/hidl-hash"],
57 export_include_dirs: ["include_hash"],
58 shared_libs: [
59 "libbase",
60 "libcrypto",
61 "libssl",
62 ],
63}
64
65//
Dan Willemsene4376b82016-09-26 13:58:25 -070066// libhidl-gen
67//
Steven Moreland5bdfa702017-04-18 23:20:39 -070068cc_library_host_shared {
Dan Willemsene4376b82016-09-26 13:58:25 -070069 name: "libhidl-gen",
Steven Moreland3ee43c82017-08-04 11:03:02 -070070 defaults: ["hidl-gen-defaults"],
Dan Willemsene4376b82016-09-26 13:58:25 -070071 srcs: [
72 "Annotation.cpp",
73 "ArrayType.cpp",
74 "CompoundType.cpp",
75 "ConstantExpression.cpp",
Martijn Coenen115d4282016-12-19 05:14:04 +010076 "DeathRecipientType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070077 "EnumType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070078 "HandleType.cpp",
Andreas Huber6755e9d2017-04-06 11:09:07 -070079 "HidlTypeAssertion.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070080 "Interface.cpp",
Martijn Coenen99e6beb2016-12-01 15:48:42 +010081 "MemoryType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070082 "Method.cpp",
83 "NamedType.cpp",
Martijn Coenen99e6beb2016-12-01 15:48:42 +010084 "PointerType.cpp",
Hridya Valsarajua32bde82016-12-27 11:47:46 -080085 "FmqType.cpp",
Yifan Hongbf459bc2016-08-23 16:50:37 -070086 "RefType.cpp",
Dan Willemsene4376b82016-09-26 13:58:25 -070087 "ScalarType.cpp",
88 "Scope.cpp",
89 "StringType.cpp",
90 "Type.cpp",
91 "TypeDef.cpp",
92 "VectorType.cpp",
93 ],
94 shared_libs: [
95 "libbase",
96 "liblog",
Steven Moreland5bdfa702017-04-18 23:20:39 -070097 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -070098 "libhidl-gen-utils",
99 ],
100}
101
102//
103// libhidl-gen-ast
104//
105
106cc_library_host_shared {
107 name: "libhidl-gen-ast",
Steven Moreland3ee43c82017-08-04 11:03:02 -0700108 defaults: ["hidl-gen-defaults"],
Dan Willemsene4376b82016-09-26 13:58:25 -0700109 srcs: [
110 "Coordinator.cpp",
111 "generateCpp.cpp",
112 "generateCppImpl.cpp",
113 "generateJava.cpp",
114 "generateVts.cpp",
115 "hidl-gen_y.yy",
116 "hidl-gen_l.ll",
117 "AST.cpp",
118 ],
Dan Willemsene4376b82016-09-26 13:58:25 -0700119 shared_libs: [
120 "libbase",
121 "liblog",
122 "libhidl-gen",
Steven Moreland5bdfa702017-04-18 23:20:39 -0700123 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -0700124 "libhidl-gen-utils",
125 ],
126}
127
128//
129// hidl-gen
130//
131cc_binary_host {
132 name: "hidl-gen",
Steven Moreland3ee43c82017-08-04 11:03:02 -0700133 defaults: ["hidl-gen-defaults"],
Dan Willemsene4376b82016-09-26 13:58:25 -0700134 srcs: ["main.cpp"],
Dan Willemsene4376b82016-09-26 13:58:25 -0700135 shared_libs: [
136 "libbase",
137 "liblog",
138 "libhidl-gen",
139 "libhidl-gen-ast",
Steven Moreland5bdfa702017-04-18 23:20:39 -0700140 "libhidl-gen-hash",
Dan Willemsene4376b82016-09-26 13:58:25 -0700141 "libhidl-gen-utils",
142 ],
Dan Willemsene4376b82016-09-26 13:58:25 -0700143}