blob: be209a01ca7eec3f0105c2cf2de1dd60fbc67167 [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
29// TODO(b/67435044) Update the include paths and remove this
30cc_library_headers {
31 name: "cuttlefish_glog",
Isaac Chenfef21be2017-12-11 16:57:33 +080032 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070033 export_include_dirs: ["common/libs"],
34 host_supported: true,
Greg Hartmanbff7e632017-09-29 11:32:08 -070035}
36
37cc_defaults {
Greg Hartmance872ef2017-12-04 22:51:47 -080038 name: "cuttlefish_base",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080039 gnu_extensions: false,
40 header_libs: [
41 "cuttlefish_common_headers",
42 "cuttlefish_kernel_headers",
43 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080044 target: {
Ryan Haining508c8082018-03-13 11:26:19 -070045 host: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080046 host_ldlibs: ["-lrt"],
47 cflags: ["-DCUTTLEFISH_HOST"],
Ryan Haining508c8082018-03-13 11:26:19 -070048 compile_multilib: "64",
Ryan Haininged1fe922018-03-13 17:43:30 +000049 },
50 // We don't need Darwin host-side builds
51 darwin: {
52 enabled: false,
Greg Hartmana4ff2482017-10-03 16:35:00 -070053 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070054 },
Greg Hartman7d5e0bf2017-12-19 23:48:34 -080055 cflags: ["-Werror", "-Wall"],
Greg Hartmance872ef2017-12-04 22:51:47 -080056 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070057}
58
Greg Hartmance872ef2017-12-04 22:51:47 -080059// ARM code should not touch the VSoC window on an x86 CPU.
Greg Hartman98d18af2017-12-05 13:12:31 -080060cc_defaults {
Greg Hartman6da43022017-12-05 11:16:02 -080061 name: "cuttlefish_native_isa",
Greg Hartmance872ef2017-12-04 22:51:47 -080062 target: {
Greg Hartman98d18af2017-12-05 13:12:31 -080063 android_arm: {
64 enabled: false,
65 },
Greg Hartmanab9caea2017-12-08 19:49:14 -080066 android_arm64: {
67 enabled: false,
68 },
Greg Hartman98d18af2017-12-05 13:12:31 -080069 },
70}
71
Greg Hartmance872ef2017-12-04 22:51:47 -080072cc_defaults {
Greg Hartmane9adb542018-05-09 13:12:51 -070073 name: "cuttlefish_guest_only",
74 defaults: ["cuttlefish_base"],
75}
76
77cc_defaults {
Greg Hartmance872ef2017-12-04 22:51:47 -080078 name: "cuttlefish_host_only",
79 device_supported: false,
80 host_supported: true,
81 defaults: ["cuttlefish_base"],
82}
83
84cc_defaults {
85 name: "cuttlefish_host_and_guest",
86 host_supported: true,
87 defaults: ["cuttlefish_base"],
88}
89
90cc_library_shared {
Greg Hartmana4ff2482017-10-03 16:35:00 -070091 name: "vsoc_lib",
92 srcs: [
93 "common/vsoc/lib/compat.cpp",
Andreas Hubercc1cd952018-01-18 12:57:33 -080094 "common/vsoc/lib/audio_data_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070095 "common/vsoc/lib/e2e_test_region_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070096 "common/vsoc/lib/gralloc_layout.cpp",
Jorge E. Moreira7510c962017-11-28 11:14:08 -080097 "common/vsoc/lib/input_events_layout.cpp",
98 "common/vsoc/lib/input_events_region_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070099 "common/vsoc/lib/lock_common.cpp",
100 "common/vsoc/lib/region_view.cpp",
Jorge E. Moreirad6c129e2018-01-05 14:52:21 -0800101 "common/vsoc/lib/ril_layout.cpp",
102 "common/vsoc/lib/ril_region_view.cpp",
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800103 "common/vsoc/lib/screen_layout.cpp",
104 "common/vsoc/lib/screen_region_view.cpp",
Ryan Hainingb1899152018-01-29 15:50:37 -0800105 "common/vsoc/lib/socket_forward_layout.cpp",
106 "common/vsoc/lib/socket_forward_region_view.cpp",
Jorge E. Moreira4f498ee2018-05-11 15:24:00 -0700107 "common/vsoc/lib/vsoc_memory.cpp",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800108 "common/vsoc/lib/wifi_exchange_layout.cpp",
Tomasz Wiszkowski719ce862017-12-01 12:31:17 -0800109 "common/vsoc/lib/wifi_exchange_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700110 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800111 header_libs: ["cuttlefish_glog"],
112 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700113 "libcuttlefish_fs",
Greg Hartman98d18af2017-12-05 13:12:31 -0800114 "cuttlefish_auto_resources",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700115 "libbase",
Greg Hartmand072a342017-12-05 20:27:40 -0800116 "liblog",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700117 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800118 target: {
Ryan Haining508c8082018-03-13 11:26:19 -0700119 host: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800120 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800121 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800122 "host/vsoc/lib/host_lock.cpp",
123 "host/vsoc/lib/region_control.cpp",
124 "host/vsoc/lib/region_view.cpp",
125 ],
126 },
127 android: {
128 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800129 "guest/vsoc/lib/gralloc_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800130 "guest/vsoc/lib/guest_lock.cpp",
131 "guest/vsoc/lib/region_control.cpp",
132 "guest/vsoc/lib/region_view.cpp",
133 ],
134 },
135 },
Greg Hartmance872ef2017-12-04 22:51:47 -0800136 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700137}
138
Greg Hartmana4ff2482017-10-03 16:35:00 -0700139cc_test_host {
140 name: "circqueue_test",
141 srcs: [
142 "common/vsoc/lib/circqueue_test.cpp",
143 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800144 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700145 "vsoc_lib",
146 "libbase",
147 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800148 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700149}
150
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800151cc_binary_host {
152 name: "vsoc_screen_region_view_test",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800153 srcs: [
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800154 "common/vsoc/lib/screen_region_view_test.cpp",
155 ],
156 static_libs: [
157 "libcuttlefish_host_config",
Jorge E. Moreira577383b2018-05-24 14:17:51 -0700158 "libjsoncpp",
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800159 "libgflags",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800160 ],
161 shared_libs: [
162 "vsoc_lib",
163 "libbase",
Jorge E. Moreira2a777f62018-06-13 17:28:10 -0700164 "libcuttlefish_utils",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800165 ],
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800166 defaults: ["cuttlefish_host_only"],
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800167}
168
Greg Hartmana4ff2482017-10-03 16:35:00 -0700169cc_test_host {
170 name: "lock_test",
171 srcs: [
172 "common/vsoc/lib/lock_test.cpp",
173 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800174 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700175 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700176 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800177 "cuttlefish_auto_resources",
178 "libbase",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700179 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800180 static_libs: [
181 "libgtest_host",
182 ],
183 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700184}
185
186cc_test_host {
187 name: "vsoc_graphics_test",
188 srcs: [
189 "common/vsoc/lib/graphics_test.cpp",
190 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800191 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700192 "vsoc_lib",
193 "libbase",
194 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800195 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700196}
197
198cc_binary_host {
199 name: "host_region_e2e_test",
200 srcs: [
201 "host/vsoc/lib/host_region_e2e_test.cpp",
202 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800203 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700204 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700205 "libcuttlefish_fs",
Jorge E. Moreira2a777f62018-06-13 17:28:10 -0700206 "libcuttlefish_utils",
Greg Hartmance872ef2017-12-04 22:51:47 -0800207 "cuttlefish_auto_resources",
208 "libbase",
209 ],
210 static_libs: [
Greg Hartman6da43022017-12-05 11:16:02 -0800211 "libcuttlefish_host_config",
Jorge E. Moreira577383b2018-05-24 14:17:51 -0700212 "libjsoncpp",
Greg Hartmance872ef2017-12-04 22:51:47 -0800213 "libgtest_host",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800214 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700215 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800216 defaults: ["cuttlefish_host_only"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700217}