Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 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 | |
| 15 | subdirs = [ |
| 16 | "c2hal", |
Dan Willemsen | 676abdc | 2016-09-28 19:42:22 -0700 | [diff] [blame] | 17 | "test", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 18 | "utils", |
| 19 | ] |
| 20 | |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 21 | cc_defaults { |
| 22 | name: "hidl-gen-defaults", |
| 23 | cflags: [ |
| 24 | "-O0", |
| 25 | "-g", |
| 26 | "-Wall", |
| 27 | "-Werror", |
| 28 | ], |
| 29 | } |
Steven Moreland | 6081863 | 2017-02-04 00:33:42 -0800 | [diff] [blame] | 30 | |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 31 | // This configuration is inherited by all hidl-gen-generated modules. |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 32 | cc_defaults { |
| 33 | name: "hidl-module-defaults", |
Steven Moreland | fa5b404 | 2017-06-19 16:44:36 +0000 | [diff] [blame] | 34 | cflags: [ |
| 35 | "-Wall", |
| 36 | "-Werror", |
| 37 | ], |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 38 | product_variables: { |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 39 | debuggable: { |
| 40 | cflags: ["-D__ANDROID_DEBUGGABLE__"] |
| 41 | }, |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 42 | treble: { |
| 43 | cflags: ["-D__ANDROID_TREBLE__"] |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 44 | }, |
| 45 | }, |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 46 | } |
| 47 | |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 48 | // |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 49 | // libhidl-gen-hash |
| 50 | // |
Tri Vo | 7089aa4 | 2017-07-28 12:58:17 -0700 | [diff] [blame] | 51 | cc_library { |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 52 | name: "libhidl-gen-hash", |
Steven Moreland | 8cf3ac3 | 2017-04-20 15:00:25 -0700 | [diff] [blame] | 53 | host_supported: true, |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 54 | defaults: ["hidl-gen-defaults"], |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 55 | 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 Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 66 | // libhidl-gen |
| 67 | // |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 68 | cc_library_host_shared { |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 69 | name: "libhidl-gen", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 70 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 71 | srcs: [ |
| 72 | "Annotation.cpp", |
| 73 | "ArrayType.cpp", |
| 74 | "CompoundType.cpp", |
| 75 | "ConstantExpression.cpp", |
Martijn Coenen | 115d428 | 2016-12-19 05:14:04 +0100 | [diff] [blame] | 76 | "DeathRecipientType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 77 | "EnumType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 78 | "HandleType.cpp", |
Andreas Huber | 6755e9d | 2017-04-06 11:09:07 -0700 | [diff] [blame] | 79 | "HidlTypeAssertion.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 80 | "Interface.cpp", |
Martijn Coenen | 99e6beb | 2016-12-01 15:48:42 +0100 | [diff] [blame] | 81 | "MemoryType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 82 | "Method.cpp", |
| 83 | "NamedType.cpp", |
Martijn Coenen | 99e6beb | 2016-12-01 15:48:42 +0100 | [diff] [blame] | 84 | "PointerType.cpp", |
Hridya Valsaraju | a32bde8 | 2016-12-27 11:47:46 -0800 | [diff] [blame] | 85 | "FmqType.cpp", |
Yifan Hong | bf459bc | 2016-08-23 16:50:37 -0700 | [diff] [blame] | 86 | "RefType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 87 | "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 Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 97 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 98 | "libhidl-gen-utils", |
| 99 | ], |
| 100 | } |
| 101 | |
| 102 | // |
| 103 | // libhidl-gen-ast |
| 104 | // |
| 105 | |
| 106 | cc_library_host_shared { |
| 107 | name: "libhidl-gen-ast", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 108 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 109 | 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 Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 119 | shared_libs: [ |
| 120 | "libbase", |
| 121 | "liblog", |
| 122 | "libhidl-gen", |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 123 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 124 | "libhidl-gen-utils", |
| 125 | ], |
| 126 | } |
| 127 | |
| 128 | // |
| 129 | // hidl-gen |
| 130 | // |
| 131 | cc_binary_host { |
| 132 | name: "hidl-gen", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 133 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 134 | srcs: ["main.cpp"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 135 | shared_libs: [ |
| 136 | "libbase", |
| 137 | "liblog", |
| 138 | "libhidl-gen", |
| 139 | "libhidl-gen-ast", |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 140 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 141 | "libhidl-gen-utils", |
| 142 | ], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 143 | } |