Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | |
| 16 | subdirs = [ |
| 17 | "common", |
Tomasz Wiszkowski | eb642fc | 2017-11-28 12:36:31 -0800 | [diff] [blame] | 18 | "guest", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 19 | "host", |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 20 | ] |
| 21 | |
| 22 | cc_library_headers { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 23 | name: "cuttlefish_common_headers", |
Isaac Chen | fef21be | 2017-12-11 16:57:33 +0800 | [diff] [blame] | 24 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 25 | export_include_dirs: ["."], |
| 26 | host_supported: true, |
| 27 | } |
| 28 | |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 29 | cc_library_headers { |
| 30 | name: "cuttlefish_common_headers_product", |
| 31 | product_specific: true, |
| 32 | export_include_dirs: ["."], |
| 33 | host_supported: true, |
| 34 | } |
| 35 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 36 | // TODO(b/67435044) Update the include paths and remove this |
| 37 | cc_library_headers { |
| 38 | name: "cuttlefish_glog", |
Isaac Chen | fef21be | 2017-12-11 16:57:33 +0800 | [diff] [blame] | 39 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 40 | export_include_dirs: ["common/libs"], |
| 41 | host_supported: true, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 42 | } |
| 43 | |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 44 | // TODO(b/67435044) Update the include paths and remove this |
| 45 | cc_library_headers { |
| 46 | name: "cuttlefish_glog_product", |
| 47 | product_specific: true, |
| 48 | export_include_dirs: ["common/libs"], |
| 49 | host_supported: true, |
| 50 | } |
| 51 | |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 52 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 53 | name: "cuttlefish_base", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 54 | gnu_extensions: false, |
| 55 | header_libs: [ |
| 56 | "cuttlefish_common_headers", |
| 57 | "cuttlefish_kernel_headers", |
Tristan Muntsinger | bb4f39e | 2019-02-19 18:48:09 -0800 | [diff] [blame] | 58 | "cuttlefish_shared_config", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 59 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 60 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 61 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 62 | host_ldlibs: ["-lrt"], |
| 63 | cflags: ["-DCUTTLEFISH_HOST"], |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 64 | compile_multilib: "64", |
Ryan Haining | ed1fe92 | 2018-03-13 17:43:30 +0000 | [diff] [blame] | 65 | }, |
| 66 | // We don't need Darwin host-side builds |
| 67 | darwin: { |
| 68 | enabled: false, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 69 | }, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 70 | }, |
Cody Schuffelen | 88b82d5 | 2019-05-29 14:16:03 -0700 | [diff] [blame] | 71 | cflags: ["-Werror", "-Wall", "-D_FILE_OFFSET_BITS=64"], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 72 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 73 | } |
| 74 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 75 | cc_defaults { |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 76 | name: "cuttlefish_guest_product_only", |
| 77 | product_specific: true, |
| 78 | gnu_extensions: false, |
| 79 | header_libs: [ |
| 80 | "cuttlefish_common_headers_product", |
| 81 | "cuttlefish_kernel_headers_product", |
| 82 | "cuttlefish_shared_config_product", |
| 83 | ], |
| 84 | target: { |
| 85 | host: { |
| 86 | host_ldlibs: ["-lrt"], |
| 87 | cflags: ["-DCUTTLEFISH_HOST"], |
| 88 | compile_multilib: "64", |
| 89 | }, |
| 90 | // We don't need Darwin host-side builds |
| 91 | darwin: { |
| 92 | enabled: false, |
| 93 | }, |
| 94 | }, |
| 95 | cflags: ["-Werror", "-Wall"], |
| 96 | } |
| 97 | |
| 98 | cc_defaults { |
Greg Hartman | e9adb54 | 2018-05-09 13:12:51 -0700 | [diff] [blame] | 99 | name: "cuttlefish_guest_only", |
| 100 | defaults: ["cuttlefish_base"], |
| 101 | } |
| 102 | |
| 103 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 104 | name: "cuttlefish_host_only", |
| 105 | device_supported: false, |
| 106 | host_supported: true, |
| 107 | defaults: ["cuttlefish_base"], |
| 108 | } |
| 109 | |
| 110 | cc_defaults { |
| 111 | name: "cuttlefish_host_and_guest", |
| 112 | host_supported: true, |
| 113 | defaults: ["cuttlefish_base"], |
| 114 | } |
| 115 | |
| 116 | cc_library_shared { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 117 | name: "vsoc_lib", |
| 118 | srcs: [ |
| 119 | "common/vsoc/lib/compat.cpp", |
Andreas Huber | cc1cd95 | 2018-01-18 12:57:33 -0800 | [diff] [blame] | 120 | "common/vsoc/lib/audio_data_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 121 | "common/vsoc/lib/e2e_test_region_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 122 | "common/vsoc/lib/gralloc_layout.cpp", |
Jorge E. Moreira | 7510c96 | 2017-11-28 11:14:08 -0800 | [diff] [blame] | 123 | "common/vsoc/lib/input_events_layout.cpp", |
| 124 | "common/vsoc/lib/input_events_region_view.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 125 | "common/vsoc/lib/lock_common.cpp", |
Jorge E. Moreira | 334f3a9 | 2018-11-12 10:22:53 -0800 | [diff] [blame] | 126 | "common/vsoc/lib/managed_e2e_test_region_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 127 | "common/vsoc/lib/region_view.cpp", |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 128 | "common/vsoc/lib/screen_layout.cpp", |
| 129 | "common/vsoc/lib/screen_region_view.cpp", |
Ryan Haining | b189915 | 2018-01-29 15:50:37 -0800 | [diff] [blame] | 130 | "common/vsoc/lib/socket_forward_layout.cpp", |
| 131 | "common/vsoc/lib/socket_forward_region_view.cpp", |
Jorge E. Moreira | 4f498ee | 2018-05-11 15:24:00 -0700 | [diff] [blame] | 132 | "common/vsoc/lib/vsoc_memory.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 133 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 134 | header_libs: ["cuttlefish_glog"], |
| 135 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 136 | "libcuttlefish_fs", |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 137 | "cuttlefish_auto_resources", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 138 | "libbase", |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 139 | "liblog", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 140 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 141 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 142 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 143 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 144 | "host/vsoc/lib/gralloc_buffer_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 145 | "host/vsoc/lib/host_lock.cpp", |
| 146 | "host/vsoc/lib/region_control.cpp", |
| 147 | "host/vsoc/lib/region_view.cpp", |
| 148 | ], |
| 149 | }, |
| 150 | android: { |
| 151 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 152 | "guest/vsoc/lib/gralloc_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 153 | "guest/vsoc/lib/guest_lock.cpp", |
| 154 | "guest/vsoc/lib/region_control.cpp", |
| 155 | "guest/vsoc/lib/region_view.cpp", |
| 156 | ], |
| 157 | }, |
| 158 | }, |
Alistair Strachan | 834fbf6 | 2018-11-02 15:23:00 -0700 | [diff] [blame] | 159 | defaults: ["cuttlefish_host_and_guest"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 160 | } |
| 161 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 162 | cc_test_host { |
| 163 | name: "circqueue_test", |
| 164 | srcs: [ |
| 165 | "common/vsoc/lib/circqueue_test.cpp", |
| 166 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 167 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 168 | "vsoc_lib", |
| 169 | "libbase", |
| 170 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 171 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 172 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 173 | } |
| 174 | |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 175 | cc_binary_host { |
| 176 | name: "vsoc_screen_region_view_test", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 177 | srcs: [ |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 178 | "common/vsoc/lib/screen_region_view_test.cpp", |
| 179 | ], |
| 180 | static_libs: [ |
| 181 | "libcuttlefish_host_config", |
Jorge E. Moreira | 577383b | 2018-05-24 14:17:51 -0700 | [diff] [blame] | 182 | "libjsoncpp", |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 183 | "libgflags", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 184 | ], |
| 185 | shared_libs: [ |
| 186 | "vsoc_lib", |
| 187 | "libbase", |
Jorge E. Moreira | 2a777f6 | 2018-06-13 17:28:10 -0700 | [diff] [blame] | 188 | "libcuttlefish_utils", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 189 | ], |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 190 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 191 | } |
| 192 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 193 | cc_test_host { |
| 194 | name: "lock_test", |
| 195 | srcs: [ |
| 196 | "common/vsoc/lib/lock_test.cpp", |
| 197 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 198 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 199 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 200 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 201 | "cuttlefish_auto_resources", |
| 202 | "libbase", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 203 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 204 | static_libs: [ |
| 205 | "libgtest_host", |
| 206 | ], |
| 207 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 208 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | cc_test_host { |
| 212 | name: "vsoc_graphics_test", |
| 213 | srcs: [ |
| 214 | "common/vsoc/lib/graphics_test.cpp", |
| 215 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 216 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 217 | "vsoc_lib", |
| 218 | "libbase", |
| 219 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 220 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 221 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | cc_binary_host { |
| 225 | name: "host_region_e2e_test", |
| 226 | srcs: [ |
| 227 | "host/vsoc/lib/host_region_e2e_test.cpp", |
| 228 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 229 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 230 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 231 | "libcuttlefish_fs", |
Jorge E. Moreira | 2a777f6 | 2018-06-13 17:28:10 -0700 | [diff] [blame] | 232 | "libcuttlefish_utils", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 233 | "cuttlefish_auto_resources", |
| 234 | "libbase", |
| 235 | ], |
| 236 | static_libs: [ |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 237 | "libcuttlefish_host_config", |
Jorge E. Moreira | 577383b | 2018-05-24 14:17:51 -0700 | [diff] [blame] | 238 | "libjsoncpp", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 239 | "libgtest_host", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 240 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 241 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 242 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 243 | } |