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 | |
| 29 | // TODO(b/67435044) Update the include paths and remove this |
| 30 | cc_library_headers { |
| 31 | name: "cuttlefish_glog", |
Isaac Chen | fef21be | 2017-12-11 16:57:33 +0800 | [diff] [blame] | 32 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 33 | export_include_dirs: ["common/libs"], |
| 34 | host_supported: true, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 38 | name: "cuttlefish_base", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 39 | gnu_extensions: false, |
| 40 | header_libs: [ |
| 41 | "cuttlefish_common_headers", |
| 42 | "cuttlefish_kernel_headers", |
| 43 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 44 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 45 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 46 | host_ldlibs: ["-lrt"], |
| 47 | cflags: ["-DCUTTLEFISH_HOST"], |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 48 | compile_multilib: "64", |
Ryan Haining | ed1fe92 | 2018-03-13 17:43:30 +0000 | [diff] [blame] | 49 | }, |
| 50 | // We don't need Darwin host-side builds |
| 51 | darwin: { |
| 52 | enabled: false, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 53 | }, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 54 | }, |
Greg Hartman | 7d5e0bf | 2017-12-19 23:48:34 -0800 | [diff] [blame] | 55 | cflags: ["-Werror", "-Wall"], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 56 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 57 | } |
| 58 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 59 | // ARM code should not touch the VSoC window on an x86 CPU. |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 60 | cc_defaults { |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 61 | name: "cuttlefish_native_isa", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 62 | target: { |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 63 | android_arm: { |
| 64 | enabled: false, |
| 65 | }, |
Greg Hartman | ab9caea | 2017-12-08 19:49:14 -0800 | [diff] [blame] | 66 | android_arm64: { |
| 67 | enabled: false, |
| 68 | }, |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 69 | }, |
| 70 | } |
| 71 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 72 | cc_defaults { |
| 73 | name: "cuttlefish_host_only", |
| 74 | device_supported: false, |
| 75 | host_supported: true, |
| 76 | defaults: ["cuttlefish_base"], |
| 77 | } |
| 78 | |
| 79 | cc_defaults { |
| 80 | name: "cuttlefish_host_and_guest", |
| 81 | host_supported: true, |
| 82 | defaults: ["cuttlefish_base"], |
| 83 | } |
| 84 | |
| 85 | cc_library_shared { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 86 | name: "vsoc_lib", |
| 87 | srcs: [ |
| 88 | "common/vsoc/lib/compat.cpp", |
Andreas Huber | cc1cd95 | 2018-01-18 12:57:33 -0800 | [diff] [blame] | 89 | "common/vsoc/lib/audio_data_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 90 | "common/vsoc/lib/e2e_test_region_layout.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 91 | "common/vsoc/lib/gralloc_layout.cpp", |
Jorge E. Moreira | 7510c96 | 2017-11-28 11:14:08 -0800 | [diff] [blame] | 92 | "common/vsoc/lib/input_events_layout.cpp", |
| 93 | "common/vsoc/lib/input_events_region_view.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 94 | "common/vsoc/lib/lock_common.cpp", |
| 95 | "common/vsoc/lib/region_view.cpp", |
Jorge E. Moreira | d6c129e | 2018-01-05 14:52:21 -0800 | [diff] [blame] | 96 | "common/vsoc/lib/ril_layout.cpp", |
| 97 | "common/vsoc/lib/ril_region_view.cpp", |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 98 | "common/vsoc/lib/screen_layout.cpp", |
| 99 | "common/vsoc/lib/screen_region_view.cpp", |
Ryan Haining | b189915 | 2018-01-29 15:50:37 -0800 | [diff] [blame] | 100 | "common/vsoc/lib/socket_forward_layout.cpp", |
| 101 | "common/vsoc/lib/socket_forward_region_view.cpp", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 102 | "common/vsoc/lib/wifi_exchange_layout.cpp", |
Tomasz Wiszkowski | 719ce86 | 2017-12-01 12:31:17 -0800 | [diff] [blame] | 103 | "common/vsoc/lib/wifi_exchange_view.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 104 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 105 | header_libs: ["cuttlefish_glog"], |
| 106 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 107 | "libcuttlefish_fs", |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 108 | "cuttlefish_auto_resources", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 109 | "libbase", |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 110 | "liblog", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 111 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 112 | target: { |
Ryan Haining | 508c808 | 2018-03-13 11:26:19 -0700 | [diff] [blame] | 113 | host: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 114 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 115 | "host/vsoc/lib/gralloc_buffer_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 116 | "host/vsoc/lib/host_lock.cpp", |
| 117 | "host/vsoc/lib/region_control.cpp", |
| 118 | "host/vsoc/lib/region_view.cpp", |
| 119 | ], |
| 120 | }, |
| 121 | android: { |
| 122 | srcs: [ |
Greg Hartman | d072a34 | 2017-12-05 20:27:40 -0800 | [diff] [blame] | 123 | "guest/vsoc/lib/gralloc_region_view.cpp", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 124 | "guest/vsoc/lib/guest_lock.cpp", |
| 125 | "guest/vsoc/lib/region_control.cpp", |
| 126 | "guest/vsoc/lib/region_view.cpp", |
| 127 | ], |
| 128 | }, |
| 129 | }, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 130 | defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 131 | } |
| 132 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 133 | cc_test_host { |
| 134 | name: "circqueue_test", |
| 135 | srcs: [ |
| 136 | "common/vsoc/lib/circqueue_test.cpp", |
| 137 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 138 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 139 | "vsoc_lib", |
| 140 | "libbase", |
| 141 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 142 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 143 | } |
| 144 | |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 145 | cc_binary_host { |
| 146 | name: "vsoc_screen_region_view_test", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 147 | srcs: [ |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 148 | "common/vsoc/lib/screen_region_view_test.cpp", |
| 149 | ], |
| 150 | static_libs: [ |
| 151 | "libcuttlefish_host_config", |
| 152 | "libgflags", |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 153 | ], |
| 154 | shared_libs: [ |
| 155 | "vsoc_lib", |
| 156 | "libbase", |
| 157 | ], |
Jorge E. Moreira | 57919e8 | 2018-02-13 11:50:34 -0800 | [diff] [blame] | 158 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | 4cbb6ab | 2017-12-04 18:31:37 -0800 | [diff] [blame] | 159 | } |
| 160 | |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 161 | cc_test_host { |
| 162 | name: "lock_test", |
| 163 | srcs: [ |
| 164 | "common/vsoc/lib/lock_test.cpp", |
| 165 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 166 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 167 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 168 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 169 | "cuttlefish_auto_resources", |
| 170 | "libbase", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 171 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 172 | static_libs: [ |
| 173 | "libgtest_host", |
| 174 | ], |
| 175 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | cc_test_host { |
| 179 | name: "vsoc_graphics_test", |
| 180 | srcs: [ |
| 181 | "common/vsoc/lib/graphics_test.cpp", |
| 182 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 183 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 184 | "vsoc_lib", |
| 185 | "libbase", |
| 186 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 187 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | cc_binary_host { |
| 191 | name: "host_region_e2e_test", |
| 192 | srcs: [ |
| 193 | "host/vsoc/lib/host_region_e2e_test.cpp", |
| 194 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 195 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 196 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 197 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 198 | "cuttlefish_auto_resources", |
| 199 | "libbase", |
| 200 | ], |
| 201 | static_libs: [ |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 202 | "libcuttlefish_host_config", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 203 | "libgtest_host", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 204 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 205 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame] | 206 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 207 | } |