blob: 4e19401a9cb72e567e308c9a8b335bd2ddc4e6a3 [file] [log] [blame]
Greg Hartmanbff7e632017-09-29 11:32:08 -07001//
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
16subdirs = [
17 "common",
Tomasz Wiszkowskieb642fc2017-11-28 12:36:31 -080018 "guest",
Greg Hartmana4ff2482017-10-03 16:35:00 -070019 "host",
Greg Hartmanbff7e632017-09-29 11:32:08 -070020]
21
22cc_library_headers {
Greg Hartmana4ff2482017-10-03 16:35:00 -070023 name: "cuttlefish_common_headers",
Isaac Chenfef21be2017-12-11 16:57:33 +080024 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070025 export_include_dirs: ["."],
26 host_supported: true,
27}
28
Ram Muthiah792e2ad2019-04-19 11:19:46 -070029cc_library_headers {
30 name: "cuttlefish_common_headers_product",
31 product_specific: true,
32 export_include_dirs: ["."],
33 host_supported: true,
34}
35
Greg Hartmana4ff2482017-10-03 16:35:00 -070036// TODO(b/67435044) Update the include paths and remove this
37cc_library_headers {
38 name: "cuttlefish_glog",
Isaac Chenfef21be2017-12-11 16:57:33 +080039 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070040 export_include_dirs: ["common/libs"],
41 host_supported: true,
Greg Hartmanbff7e632017-09-29 11:32:08 -070042}
43
Ram Muthiah792e2ad2019-04-19 11:19:46 -070044// TODO(b/67435044) Update the include paths and remove this
45cc_library_headers {
46 name: "cuttlefish_glog_product",
47 product_specific: true,
48 export_include_dirs: ["common/libs"],
49 host_supported: true,
50}
51
Greg Hartmanbff7e632017-09-29 11:32:08 -070052cc_defaults {
Greg Hartmance872ef2017-12-04 22:51:47 -080053 name: "cuttlefish_base",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080054 gnu_extensions: false,
55 header_libs: [
56 "cuttlefish_common_headers",
57 "cuttlefish_kernel_headers",
Tristan Muntsingerbb4f39e2019-02-19 18:48:09 -080058 "cuttlefish_shared_config",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080059 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080060 target: {
Ryan Haining508c8082018-03-13 11:26:19 -070061 host: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080062 host_ldlibs: ["-lrt"],
63 cflags: ["-DCUTTLEFISH_HOST"],
Ryan Haining508c8082018-03-13 11:26:19 -070064 compile_multilib: "64",
Ryan Haininged1fe922018-03-13 17:43:30 +000065 },
66 // We don't need Darwin host-side builds
67 darwin: {
68 enabled: false,
Greg Hartmana4ff2482017-10-03 16:35:00 -070069 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070070 },
Greg Hartman7d5e0bf2017-12-19 23:48:34 -080071 cflags: ["-Werror", "-Wall"],
Greg Hartmance872ef2017-12-04 22:51:47 -080072 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070073}
74
Greg Hartmance872ef2017-12-04 22:51:47 -080075cc_defaults {
Ram Muthiah792e2ad2019-04-19 11:19:46 -070076 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
98cc_defaults {
Greg Hartmane9adb542018-05-09 13:12:51 -070099 name: "cuttlefish_guest_only",
100 defaults: ["cuttlefish_base"],
101}
102
103cc_defaults {
Greg Hartmance872ef2017-12-04 22:51:47 -0800104 name: "cuttlefish_host_only",
105 device_supported: false,
106 host_supported: true,
107 defaults: ["cuttlefish_base"],
108}
109
110cc_defaults {
111 name: "cuttlefish_host_and_guest",
112 host_supported: true,
113 defaults: ["cuttlefish_base"],
114}
115
116cc_library_shared {
Greg Hartmana4ff2482017-10-03 16:35:00 -0700117 name: "vsoc_lib",
118 srcs: [
119 "common/vsoc/lib/compat.cpp",
Andreas Hubercc1cd952018-01-18 12:57:33 -0800120 "common/vsoc/lib/audio_data_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700121 "common/vsoc/lib/e2e_test_region_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700122 "common/vsoc/lib/gralloc_layout.cpp",
Jorge E. Moreira7510c962017-11-28 11:14:08 -0800123 "common/vsoc/lib/input_events_layout.cpp",
124 "common/vsoc/lib/input_events_region_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700125 "common/vsoc/lib/lock_common.cpp",
Jorge E. Moreira334f3a92018-11-12 10:22:53 -0800126 "common/vsoc/lib/managed_e2e_test_region_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700127 "common/vsoc/lib/region_view.cpp",
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800128 "common/vsoc/lib/screen_layout.cpp",
129 "common/vsoc/lib/screen_region_view.cpp",
Ryan Hainingb1899152018-01-29 15:50:37 -0800130 "common/vsoc/lib/socket_forward_layout.cpp",
131 "common/vsoc/lib/socket_forward_region_view.cpp",
Jorge E. Moreira4f498ee2018-05-11 15:24:00 -0700132 "common/vsoc/lib/vsoc_memory.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700133 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800134 header_libs: ["cuttlefish_glog"],
135 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700136 "libcuttlefish_fs",
Greg Hartman98d18af2017-12-05 13:12:31 -0800137 "cuttlefish_auto_resources",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700138 "libbase",
Greg Hartmand072a342017-12-05 20:27:40 -0800139 "liblog",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700140 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800141 target: {
Ryan Haining508c8082018-03-13 11:26:19 -0700142 host: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800143 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800144 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800145 "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 Hartmand072a342017-12-05 20:27:40 -0800152 "guest/vsoc/lib/gralloc_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800153 "guest/vsoc/lib/guest_lock.cpp",
154 "guest/vsoc/lib/region_control.cpp",
155 "guest/vsoc/lib/region_view.cpp",
156 ],
157 },
158 },
Alistair Strachan834fbf62018-11-02 15:23:00 -0700159 defaults: ["cuttlefish_host_and_guest"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700160}
161
Greg Hartmana4ff2482017-10-03 16:35:00 -0700162cc_test_host {
163 name: "circqueue_test",
164 srcs: [
165 "common/vsoc/lib/circqueue_test.cpp",
166 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800167 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700168 "vsoc_lib",
169 "libbase",
170 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800171 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700172}
173
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800174cc_binary_host {
175 name: "vsoc_screen_region_view_test",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800176 srcs: [
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800177 "common/vsoc/lib/screen_region_view_test.cpp",
178 ],
179 static_libs: [
180 "libcuttlefish_host_config",
Jorge E. Moreira577383b2018-05-24 14:17:51 -0700181 "libjsoncpp",
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800182 "libgflags",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800183 ],
184 shared_libs: [
185 "vsoc_lib",
186 "libbase",
Jorge E. Moreira2a777f62018-06-13 17:28:10 -0700187 "libcuttlefish_utils",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800188 ],
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800189 defaults: ["cuttlefish_host_only"],
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800190}
191
Greg Hartmana4ff2482017-10-03 16:35:00 -0700192cc_test_host {
193 name: "lock_test",
194 srcs: [
195 "common/vsoc/lib/lock_test.cpp",
196 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800197 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700198 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700199 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800200 "cuttlefish_auto_resources",
201 "libbase",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700202 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800203 static_libs: [
204 "libgtest_host",
205 ],
206 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700207}
208
209cc_test_host {
210 name: "vsoc_graphics_test",
211 srcs: [
212 "common/vsoc/lib/graphics_test.cpp",
213 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800214 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700215 "vsoc_lib",
216 "libbase",
217 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800218 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700219}
220
221cc_binary_host {
222 name: "host_region_e2e_test",
223 srcs: [
224 "host/vsoc/lib/host_region_e2e_test.cpp",
225 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800226 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700227 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700228 "libcuttlefish_fs",
Jorge E. Moreira2a777f62018-06-13 17:28:10 -0700229 "libcuttlefish_utils",
Greg Hartmance872ef2017-12-04 22:51:47 -0800230 "cuttlefish_auto_resources",
231 "libbase",
232 ],
233 static_libs: [
Greg Hartman6da43022017-12-05 11:16:02 -0800234 "libcuttlefish_host_config",
Jorge E. Moreira577383b2018-05-24 14:17:51 -0700235 "libjsoncpp",
Greg Hartmance872ef2017-12-04 22:51:47 -0800236 "libgtest_host",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800237 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700238 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800239 defaults: ["cuttlefish_host_only"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700240}