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", |
| 58 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 59 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 60 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 61 | host_ldlibs: ["-lrt"], |
| 62 | cflags: ["-DCUTTLEFISH_HOST"], |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 63 | compile_multilib: "64", |
Ryan Haining | ed1fe92 | 2018-03-13 17:43:30 +0000 | [diff] [blame] | 64 | }, |
| 65 | // We don't need Darwin host-side builds |
| 66 | darwin: { |
| 67 | enabled: false, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 68 | }, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 69 | }, |
Cody Schuffelen | 88b82d5 | 2019-05-29 14:16:03 -0700 | [diff] [blame] | 70 | cflags: ["-Werror", "-Wall", "-D_FILE_OFFSET_BITS=64"], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 71 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 72 | } |
| 73 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 74 | cc_defaults { |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 75 | name: "cuttlefish_guest_product_only", |
| 76 | product_specific: true, |
| 77 | gnu_extensions: false, |
| 78 | header_libs: [ |
| 79 | "cuttlefish_common_headers_product", |
| 80 | "cuttlefish_kernel_headers_product", |
Ram Muthiah | 792e2ad | 2019-04-19 11:19:46 -0700 | [diff] [blame] | 81 | ], |
| 82 | target: { |
| 83 | host: { |
| 84 | host_ldlibs: ["-lrt"], |
| 85 | cflags: ["-DCUTTLEFISH_HOST"], |
| 86 | compile_multilib: "64", |
| 87 | }, |
| 88 | // We don't need Darwin host-side builds |
| 89 | darwin: { |
| 90 | enabled: false, |
| 91 | }, |
| 92 | }, |
| 93 | cflags: ["-Werror", "-Wall"], |
| 94 | } |
| 95 | |
| 96 | cc_defaults { |
Greg Hartman | e9adb54 | 2018-05-09 13:12:51 -0700 | [diff] [blame] | 97 | name: "cuttlefish_guest_only", |
| 98 | defaults: ["cuttlefish_base"], |
| 99 | } |
| 100 | |
| 101 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 102 | name: "cuttlefish_host_only", |
| 103 | device_supported: false, |
| 104 | host_supported: true, |
| 105 | defaults: ["cuttlefish_base"], |
| 106 | } |
| 107 | |
| 108 | cc_defaults { |
| 109 | name: "cuttlefish_host_and_guest", |
| 110 | host_supported: true, |
| 111 | defaults: ["cuttlefish_base"], |
| 112 | } |
| 113 | |
| 114 | cc_library_shared { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 115 | name: "vsoc_lib", |
| 116 | srcs: [ |
| 117 | "common/vsoc/lib/compat.cpp", |
Andreas Huber | cc1cd95 | 2018-01-18 12:57:33 -0800 | [diff] [blame] | 118 | "common/vsoc/lib/audio_data_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 119 | "common/vsoc/lib/e2e_test_region_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 120 | "common/vsoc/lib/gralloc_layout.cpp", |
Jorge E. Moreira | 7510c96 | 2017-11-28 11:14:08 -0800 | [diff] [blame] | 121 | "common/vsoc/lib/input_events_layout.cpp", |
| 122 | "common/vsoc/lib/input_events_region_view.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 123 | "common/vsoc/lib/lock_common.cpp", |
Jorge E. Moreira | 334f3a9 | 2018-11-12 10:22:53 -0800 | [diff] [blame] | 124 | "common/vsoc/lib/managed_e2e_test_region_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 125 | "common/vsoc/lib/region_view.cpp", |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 126 | "common/vsoc/lib/screen_layout.cpp", |
| 127 | "common/vsoc/lib/screen_region_view.cpp", |
Ryan Haining | b189915 | 2018-01-29 15:50:37 -0800 | [diff] [blame] | 128 | "common/vsoc/lib/socket_forward_layout.cpp", |
| 129 | "common/vsoc/lib/socket_forward_region_view.cpp", |
Jorge E. Moreira | 4f498ee | 2018-05-11 15:24:00 -0700 | [diff] [blame] | 130 | "common/vsoc/lib/vsoc_memory.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 131 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 132 | header_libs: ["cuttlefish_glog"], |
| 133 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 134 | "libcuttlefish_fs", |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 135 | "cuttlefish_auto_resources", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 136 | "libbase", |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 137 | "liblog", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 138 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 139 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 140 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 141 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 142 | "host/vsoc/lib/gralloc_buffer_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 143 | "host/vsoc/lib/host_lock.cpp", |
| 144 | "host/vsoc/lib/region_control.cpp", |
| 145 | "host/vsoc/lib/region_view.cpp", |
| 146 | ], |
| 147 | }, |
| 148 | android: { |
| 149 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 150 | "guest/vsoc/lib/gralloc_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 151 | "guest/vsoc/lib/guest_lock.cpp", |
| 152 | "guest/vsoc/lib/region_control.cpp", |
| 153 | "guest/vsoc/lib/region_view.cpp", |
| 154 | ], |
| 155 | }, |
| 156 | }, |
Alistair Strachan | 834fbf6 | 2018-11-02 15:23:00 -0700 | [diff] [blame] | 157 | defaults: ["cuttlefish_host_and_guest"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 158 | } |
| 159 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 160 | cc_test_host { |
| 161 | name: "circqueue_test", |
| 162 | srcs: [ |
| 163 | "common/vsoc/lib/circqueue_test.cpp", |
| 164 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 165 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 166 | "vsoc_lib", |
| 167 | "libbase", |
| 168 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 169 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 170 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 171 | } |
| 172 | |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 173 | cc_binary_host { |
| 174 | name: "vsoc_screen_region_view_test", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 175 | srcs: [ |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 176 | "common/vsoc/lib/screen_region_view_test.cpp", |
| 177 | ], |
| 178 | static_libs: [ |
| 179 | "libcuttlefish_host_config", |
Jorge E. Moreira | 577383b | 2018-05-24 14:17:51 -0700 | [diff] [blame] | 180 | "libjsoncpp", |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 181 | "libgflags", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 182 | ], |
| 183 | shared_libs: [ |
| 184 | "vsoc_lib", |
| 185 | "libbase", |
Jorge E. Moreira | 2a777f6 | 2018-06-13 17:28:10 -0700 | [diff] [blame] | 186 | "libcuttlefish_utils", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 187 | ], |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 188 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 189 | } |
| 190 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 191 | cc_test_host { |
| 192 | name: "lock_test", |
| 193 | srcs: [ |
| 194 | "common/vsoc/lib/lock_test.cpp", |
| 195 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 196 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 197 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 198 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 199 | "cuttlefish_auto_resources", |
| 200 | "libbase", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 201 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 202 | static_libs: [ |
| 203 | "libgtest_host", |
| 204 | ], |
| 205 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 206 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | cc_test_host { |
| 210 | name: "vsoc_graphics_test", |
| 211 | srcs: [ |
| 212 | "common/vsoc/lib/graphics_test.cpp", |
| 213 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 214 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 215 | "vsoc_lib", |
| 216 | "libbase", |
| 217 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 218 | defaults: ["cuttlefish_host_only"], |
Ram Muthiah | 0cc37d6 | 2019-05-01 15:29:28 -0700 | [diff] [blame] | 219 | test_suites: ["general-tests"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | cc_binary_host { |
| 223 | name: "host_region_e2e_test", |
| 224 | srcs: [ |
| 225 | "host/vsoc/lib/host_region_e2e_test.cpp", |
| 226 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 227 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 228 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 229 | "libcuttlefish_fs", |
Jorge E. Moreira | 2a777f6 | 2018-06-13 17:28:10 -0700 | [diff] [blame] | 230 | "libcuttlefish_utils", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 231 | "cuttlefish_auto_resources", |
| 232 | "libbase", |
| 233 | ], |
| 234 | static_libs: [ |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 235 | "libcuttlefish_host_config", |
Jorge E. Moreira | 577383b | 2018-05-24 14:17:51 -0700 | [diff] [blame] | 236 | "libjsoncpp", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 237 | "libgtest_host", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 238 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 239 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 240 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 241 | } |