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 | |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "hidl-gen-defaults", |
| 17 | cflags: [ |
| 18 | "-O0", |
| 19 | "-g", |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | ], |
| 23 | } |
Steven Moreland | 6081863 | 2017-02-04 00:33:42 -0800 | [diff] [blame] | 24 | |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 25 | // This configuration is inherited by all hidl-gen-generated modules. |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 26 | cc_defaults { |
| 27 | name: "hidl-module-defaults", |
Steven Moreland | fa5b404 | 2017-06-19 16:44:36 +0000 | [diff] [blame] | 28 | cflags: [ |
| 29 | "-Wall", |
| 30 | "-Werror", |
Steven Moreland | cbcf9f7 | 2017-11-20 10:04:15 -0800 | [diff] [blame^] | 31 | "-Wextra-semi", |
Steven Moreland | fa5b404 | 2017-06-19 16:44:36 +0000 | [diff] [blame] | 32 | ], |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 33 | product_variables: { |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 34 | debuggable: { |
| 35 | cflags: ["-D__ANDROID_DEBUGGABLE__"] |
| 36 | }, |
Steven Moreland | f9cf33b | 2017-05-18 13:58:54 -0700 | [diff] [blame] | 37 | }, |
Steven Moreland | 6a3cdff | 2017-05-18 16:14:38 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Steven Moreland | 887b84c | 2017-10-09 18:40:58 -0700 | [diff] [blame] | 40 | // This configuration is inherited by all hidl-gen-java modules |
| 41 | java_defaults { |
| 42 | name: "hidl-java-module-defaults", |
Steven Moreland | c6d03ae | 2017-10-28 16:05:57 -0700 | [diff] [blame] | 43 | // TODO(b/68433855): allow HIDL java to build in the PDK |
| 44 | product_variables: { |
| 45 | pdk: { |
| 46 | enabled: false, |
| 47 | }, |
| 48 | }, |
Steven Moreland | 887b84c | 2017-10-09 18:40:58 -0700 | [diff] [blame] | 49 | } |
| 50 | |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 51 | // |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 52 | // libhidl-gen-hash |
| 53 | // |
Tri Vo | 7089aa4 | 2017-07-28 12:58:17 -0700 | [diff] [blame] | 54 | cc_library { |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 55 | name: "libhidl-gen-hash", |
Steven Moreland | 8cf3ac3 | 2017-04-20 15:00:25 -0700 | [diff] [blame] | 56 | host_supported: true, |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 57 | defaults: ["hidl-gen-defaults"], |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 58 | srcs: ["Hash.cpp"], |
| 59 | local_include_dirs: ["include_hash/hidl-hash"], |
| 60 | export_include_dirs: ["include_hash"], |
| 61 | shared_libs: [ |
| 62 | "libbase", |
| 63 | "libcrypto", |
| 64 | "libssl", |
| 65 | ], |
| 66 | } |
| 67 | |
| 68 | // |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 69 | // libhidl-gen |
| 70 | // |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 71 | cc_library_host_shared { |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 72 | name: "libhidl-gen", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 73 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 74 | srcs: [ |
| 75 | "Annotation.cpp", |
| 76 | "ArrayType.cpp", |
| 77 | "CompoundType.cpp", |
| 78 | "ConstantExpression.cpp", |
Martijn Coenen | 115d428 | 2016-12-19 05:14:04 +0100 | [diff] [blame] | 79 | "DeathRecipientType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 80 | "EnumType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 81 | "HandleType.cpp", |
Andreas Huber | 6755e9d | 2017-04-06 11:09:07 -0700 | [diff] [blame] | 82 | "HidlTypeAssertion.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 83 | "Interface.cpp", |
Timur Iskhakov | 0e7c2a9 | 2017-09-06 11:40:59 -0700 | [diff] [blame] | 84 | "Location.cpp", |
Martijn Coenen | 99e6beb | 2016-12-01 15:48:42 +0100 | [diff] [blame] | 85 | "MemoryType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 86 | "Method.cpp", |
| 87 | "NamedType.cpp", |
Martijn Coenen | 99e6beb | 2016-12-01 15:48:42 +0100 | [diff] [blame] | 88 | "PointerType.cpp", |
Hridya Valsaraju | a32bde8 | 2016-12-27 11:47:46 -0800 | [diff] [blame] | 89 | "FmqType.cpp", |
Yifan Hong | bf459bc | 2016-08-23 16:50:37 -0700 | [diff] [blame] | 90 | "RefType.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 91 | "ScalarType.cpp", |
| 92 | "Scope.cpp", |
| 93 | "StringType.cpp", |
| 94 | "Type.cpp", |
| 95 | "TypeDef.cpp", |
| 96 | "VectorType.cpp", |
| 97 | ], |
| 98 | shared_libs: [ |
| 99 | "libbase", |
| 100 | "liblog", |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 101 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 102 | "libhidl-gen-utils", |
| 103 | ], |
Steven Moreland | 53b9bfb | 2017-09-20 14:15:30 -0700 | [diff] [blame] | 104 | export_shared_lib_headers: [ |
| 105 | "libbase", |
| 106 | "libhidl-gen-utils", |
| 107 | ], |
| 108 | export_include_dirs: ["."], // for tests |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | // |
| 112 | // libhidl-gen-ast |
| 113 | // |
| 114 | |
| 115 | cc_library_host_shared { |
| 116 | name: "libhidl-gen-ast", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 117 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 118 | srcs: [ |
| 119 | "Coordinator.cpp", |
| 120 | "generateCpp.cpp", |
Steven Moreland | 9a6da7a | 2017-09-15 16:21:24 -0700 | [diff] [blame] | 121 | "generateCppAdapter.cpp", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 122 | "generateCppImpl.cpp", |
| 123 | "generateJava.cpp", |
| 124 | "generateVts.cpp", |
| 125 | "hidl-gen_y.yy", |
| 126 | "hidl-gen_l.ll", |
| 127 | "AST.cpp", |
| 128 | ], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 129 | shared_libs: [ |
| 130 | "libbase", |
| 131 | "liblog", |
| 132 | "libhidl-gen", |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 133 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 134 | "libhidl-gen-utils", |
| 135 | ], |
Steven Moreland | 53b9bfb | 2017-09-20 14:15:30 -0700 | [diff] [blame] | 136 | export_shared_lib_headers: [ |
| 137 | "libbase", |
| 138 | "libhidl-gen-utils", |
| 139 | ], |
| 140 | export_include_dirs: ["."], // for tests |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | // |
| 144 | // hidl-gen |
| 145 | // |
| 146 | cc_binary_host { |
| 147 | name: "hidl-gen", |
Steven Moreland | 3ee43c8 | 2017-08-04 11:03:02 -0700 | [diff] [blame] | 148 | defaults: ["hidl-gen-defaults"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 149 | srcs: ["main.cpp"], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 150 | shared_libs: [ |
| 151 | "libbase", |
| 152 | "liblog", |
| 153 | "libhidl-gen", |
| 154 | "libhidl-gen-ast", |
Steven Moreland | 5bdfa70 | 2017-04-18 23:20:39 -0700 | [diff] [blame] | 155 | "libhidl-gen-hash", |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 156 | "libhidl-gen-utils", |
| 157 | ], |
Dan Willemsen | e4376b8 | 2016-09-26 13:58:25 -0700 | [diff] [blame] | 158 | } |