blob: 95707b611cad1c1c470d53517d255139e5dca2f9 [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 Haininged1fe922018-03-13 17:43:30 +000045 linux: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080046 host_ldlibs: ["-lrt"],
47 cflags: ["-DCUTTLEFISH_HOST"],
Ryan Haininged1fe922018-03-13 17:43:30 +000048 },
49 // We don't need 32 bit host-side builds
50 linux_x86: {
51 enabled: false,
52 },
53 // We don't need Darwin host-side builds
54 darwin: {
55 enabled: false,
Greg Hartmana4ff2482017-10-03 16:35:00 -070056 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070057 },
Greg Hartman7d5e0bf2017-12-19 23:48:34 -080058 cflags: ["-Werror", "-Wall"],
Greg Hartmance872ef2017-12-04 22:51:47 -080059 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070060}
61
Greg Hartmance872ef2017-12-04 22:51:47 -080062// ARM code should not touch the VSoC window on an x86 CPU.
Greg Hartman98d18af2017-12-05 13:12:31 -080063cc_defaults {
Greg Hartman6da43022017-12-05 11:16:02 -080064 name: "cuttlefish_native_isa",
Greg Hartmance872ef2017-12-04 22:51:47 -080065 target: {
Greg Hartman98d18af2017-12-05 13:12:31 -080066 android_arm: {
67 enabled: false,
68 },
Greg Hartmanab9caea2017-12-08 19:49:14 -080069 android_arm64: {
70 enabled: false,
71 },
Greg Hartman98d18af2017-12-05 13:12:31 -080072 },
73}
74
Greg Hartmance872ef2017-12-04 22:51:47 -080075cc_defaults {
76 name: "cuttlefish_host_only",
77 device_supported: false,
78 host_supported: true,
79 defaults: ["cuttlefish_base"],
80}
81
82cc_defaults {
83 name: "cuttlefish_host_and_guest",
84 host_supported: true,
85 defaults: ["cuttlefish_base"],
86}
87
88cc_library_shared {
Greg Hartmana4ff2482017-10-03 16:35:00 -070089 name: "vsoc_lib",
90 srcs: [
91 "common/vsoc/lib/compat.cpp",
Andreas Hubercc1cd952018-01-18 12:57:33 -080092 "common/vsoc/lib/audio_data_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070093 "common/vsoc/lib/e2e_test_region_layout.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070094 "common/vsoc/lib/gralloc_layout.cpp",
Jorge E. Moreira7510c962017-11-28 11:14:08 -080095 "common/vsoc/lib/input_events_layout.cpp",
96 "common/vsoc/lib/input_events_region_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070097 "common/vsoc/lib/lock_common.cpp",
98 "common/vsoc/lib/region_view.cpp",
Jorge E. Moreirad6c129e2018-01-05 14:52:21 -080099 "common/vsoc/lib/ril_layout.cpp",
100 "common/vsoc/lib/ril_region_view.cpp",
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800101 "common/vsoc/lib/screen_layout.cpp",
102 "common/vsoc/lib/screen_region_view.cpp",
Ryan Hainingb1899152018-01-29 15:50:37 -0800103 "common/vsoc/lib/socket_forward_layout.cpp",
104 "common/vsoc/lib/socket_forward_region_view.cpp",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800105 "common/vsoc/lib/wifi_exchange_layout.cpp",
Tomasz Wiszkowski719ce862017-12-01 12:31:17 -0800106 "common/vsoc/lib/wifi_exchange_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700107 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800108 header_libs: ["cuttlefish_glog"],
109 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700110 "libcuttlefish_fs",
Greg Hartman98d18af2017-12-05 13:12:31 -0800111 "cuttlefish_auto_resources",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700112 "libbase",
Greg Hartmand072a342017-12-05 20:27:40 -0800113 "liblog",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700114 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800115 target: {
Ryan Haininged1fe922018-03-13 17:43:30 +0000116 linux: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800117 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800118 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800119 "host/vsoc/lib/host_lock.cpp",
120 "host/vsoc/lib/region_control.cpp",
121 "host/vsoc/lib/region_view.cpp",
122 ],
123 },
124 android: {
125 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800126 "guest/vsoc/lib/gralloc_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800127 "guest/vsoc/lib/guest_lock.cpp",
128 "guest/vsoc/lib/region_control.cpp",
129 "guest/vsoc/lib/region_view.cpp",
130 ],
131 },
132 },
Greg Hartmance872ef2017-12-04 22:51:47 -0800133 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700134}
135
Greg Hartmana4ff2482017-10-03 16:35:00 -0700136cc_test_host {
137 name: "circqueue_test",
138 srcs: [
139 "common/vsoc/lib/circqueue_test.cpp",
140 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800141 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700142 "vsoc_lib",
143 "libbase",
144 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800145 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700146}
147
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800148cc_binary_host {
149 name: "vsoc_screen_region_view_test",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800150 srcs: [
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800151 "common/vsoc/lib/screen_region_view_test.cpp",
152 ],
153 static_libs: [
154 "libcuttlefish_host_config",
155 "libgflags",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800156 ],
157 shared_libs: [
158 "vsoc_lib",
159 "libbase",
160 ],
Jorge E. Moreira57919e82018-02-13 11:50:34 -0800161 defaults: ["cuttlefish_host_only"],
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800162}
163
Greg Hartmana4ff2482017-10-03 16:35:00 -0700164cc_test_host {
165 name: "lock_test",
166 srcs: [
167 "common/vsoc/lib/lock_test.cpp",
168 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800169 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700170 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700171 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800172 "cuttlefish_auto_resources",
173 "libbase",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700174 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800175 static_libs: [
176 "libgtest_host",
177 ],
178 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700179}
180
181cc_test_host {
182 name: "vsoc_graphics_test",
183 srcs: [
184 "common/vsoc/lib/graphics_test.cpp",
185 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800186 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700187 "vsoc_lib",
188 "libbase",
189 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800190 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700191}
192
193cc_binary_host {
194 name: "host_region_e2e_test",
195 srcs: [
196 "host/vsoc/lib/host_region_e2e_test.cpp",
197 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800198 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700199 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700200 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800201 "cuttlefish_auto_resources",
202 "libbase",
203 ],
204 static_libs: [
Greg Hartman6da43022017-12-05 11:16:02 -0800205 "libcuttlefish_host_config",
Greg Hartmance872ef2017-12-04 22:51:47 -0800206 "libgtest_host",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800207 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700208 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800209 defaults: ["cuttlefish_host_only"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700210}