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", |
| 24 | export_include_dirs: ["."], |
| 25 | host_supported: true, |
| 26 | } |
| 27 | |
| 28 | // TODO(b/67435044) Update the include paths and remove this |
| 29 | cc_library_headers { |
| 30 | name: "cuttlefish_glog", |
| 31 | export_include_dirs: ["common/libs"], |
| 32 | host_supported: true, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | cc_defaults { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 36 | name: "cuttlefish_base", |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 37 | gnu_extensions: false, |
| 38 | header_libs: [ |
| 39 | "cuttlefish_common_headers", |
| 40 | "cuttlefish_kernel_headers", |
| 41 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 42 | target: { |
| 43 | linux: { |
| 44 | host_ldlibs: ["-lrt"], |
| 45 | cflags: ["-DCUTTLEFISH_HOST"], |
| 46 | }, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 47 | // We don't need 32 bit host-side builds |
| 48 | // TODO(ghartman): linux_glibc on master |
| 49 | linux_x86: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 50 | enabled: false, |
| 51 | }, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 52 | // We don't need Darwin host-side builds |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 53 | darwin: { |
| 54 | enabled: false, |
| 55 | }, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 56 | }, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 57 | vendor: true, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 58 | } |
| 59 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 60 | // ARM code should not touch the VSoC window on an x86 CPU. |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 61 | cc_defaults { |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 62 | name: "cuttlefish_native_isa", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 63 | target: { |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 64 | android_arm: { |
| 65 | enabled: false, |
| 66 | }, |
| 67 | }, |
| 68 | } |
| 69 | |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 70 | cc_defaults { |
| 71 | name: "cuttlefish_host_only", |
| 72 | device_supported: false, |
| 73 | host_supported: true, |
| 74 | defaults: ["cuttlefish_base"], |
| 75 | } |
| 76 | |
| 77 | cc_defaults { |
| 78 | name: "cuttlefish_host_and_guest", |
| 79 | host_supported: true, |
| 80 | defaults: ["cuttlefish_base"], |
| 81 | } |
| 82 | |
| 83 | cc_library_shared { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 84 | name: "vsoc_lib", |
| 85 | srcs: [ |
| 86 | "common/vsoc/lib/compat.cpp", |
| 87 | "common/vsoc/lib/e2e_test_region_layout.cpp", |
| 88 | "common/vsoc/lib/fb_bcast_layout.cpp", |
| 89 | "common/vsoc/lib/gralloc_layout.cpp", |
| 90 | "common/vsoc/lib/lock_common.cpp", |
| 91 | "common/vsoc/lib/region_view.cpp", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 92 | "common/vsoc/lib/wifi_exchange_layout.cpp", |
Tomasz Wiszkowski | 719ce86 | 2017-12-01 12:31:17 -0800 | [diff] [blame] | 93 | "common/vsoc/lib/wifi_exchange_view.cpp", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 94 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 95 | header_libs: ["cuttlefish_glog"], |
| 96 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 97 | "libcuttlefish_fs", |
Greg Hartman | 98d18af | 2017-12-05 13:12:31 -0800 | [diff] [blame] | 98 | "cuttlefish_auto_resources", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 99 | "libbase", |
| 100 | ], |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 101 | target: { |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 102 | //TODO(ghartman): linux_glibc on master |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 103 | linux: { |
Tomasz Wiszkowski | 55d53ff | 2017-12-04 15:39:57 -0800 | [diff] [blame] | 104 | srcs: [ |
| 105 | "host/vsoc/lib/host_lock.cpp", |
| 106 | "host/vsoc/lib/region_control.cpp", |
| 107 | "host/vsoc/lib/region_view.cpp", |
| 108 | ], |
| 109 | }, |
| 110 | android: { |
| 111 | srcs: [ |
| 112 | "guest/vsoc/lib/guest_lock.cpp", |
| 113 | "guest/vsoc/lib/region_control.cpp", |
| 114 | "guest/vsoc/lib/region_view.cpp", |
| 115 | ], |
| 116 | }, |
| 117 | }, |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 118 | defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | cc_library_host_static { |
| 122 | name: "libvsoc_gralloc", |
| 123 | srcs: [ |
| 124 | "host/vsoc/gralloc/gralloc_buffer_region.cpp", |
| 125 | ], |
| 126 | header_libs: ["cuttlefish_glog"], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 127 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 128 | "vsoc_lib", |
| 129 | "libbase", |
| 130 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 131 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | cc_test_host { |
| 135 | name: "circqueue_test", |
| 136 | srcs: [ |
| 137 | "common/vsoc/lib/circqueue_test.cpp", |
| 138 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 139 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 140 | "vsoc_lib", |
| 141 | "libbase", |
| 142 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 143 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | cc_test_host { |
| 147 | name: "lock_test", |
| 148 | srcs: [ |
| 149 | "common/vsoc/lib/lock_test.cpp", |
| 150 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 151 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 152 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 153 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 154 | "cuttlefish_auto_resources", |
| 155 | "libbase", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 156 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 157 | static_libs: [ |
| 158 | "libgtest_host", |
| 159 | ], |
| 160 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 161 | } |
| 162 | |
| 163 | cc_test_host { |
| 164 | name: "vsoc_graphics_test", |
| 165 | srcs: [ |
| 166 | "common/vsoc/lib/graphics_test.cpp", |
| 167 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 168 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 169 | "vsoc_lib", |
| 170 | "libbase", |
| 171 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 172 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | cc_binary_host { |
| 176 | name: "host_region_e2e_test", |
| 177 | srcs: [ |
| 178 | "host/vsoc/lib/host_region_e2e_test.cpp", |
| 179 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 180 | shared_libs: [ |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 181 | "vsoc_lib", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 182 | "libcuttlefish_fs", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 183 | "cuttlefish_auto_resources", |
| 184 | "libbase", |
| 185 | ], |
| 186 | static_libs: [ |
Greg Hartman | 6da4302 | 2017-12-05 11:16:02 -0800 | [diff] [blame] | 187 | "libcuttlefish_host_config", |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 188 | "libgtest_host", |
Tomasz Wiszkowski | c2c4dd6 | 2017-11-30 10:19:22 -0800 | [diff] [blame] | 189 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 190 | ], |
Greg Hartman | ce872ef | 2017-12-04 22:51:47 -0800 | [diff] [blame^] | 191 | defaults: ["cuttlefish_host_only"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 192 | } |