blob: 348a98bb0d53232790de033062097b3ba611b065 [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: {
Greg Hartman09302512017-12-06 20:56:16 -080045 linux_glibc: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080046 host_ldlibs: ["-lrt"],
47 cflags: ["-DCUTTLEFISH_HOST"],
48 },
Greg Hartmance872ef2017-12-04 22:51:47 -080049 // We don't need 32 bit host-side builds
Greg Hartman09302512017-12-06 20:56:16 -080050 linux_glibc_x86: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080051 enabled: false,
52 },
Greg Hartmance872ef2017-12-04 22:51:47 -080053 // We don't need Darwin host-side builds
Greg Hartmana4ff2482017-10-03 16:35:00 -070054 darwin: {
55 enabled: false,
56 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070057 },
Greg Hartmance872ef2017-12-04 22:51:47 -080058 vendor: true,
Greg Hartmana4ff2482017-10-03 16:35:00 -070059}
60
Greg Hartmance872ef2017-12-04 22:51:47 -080061// ARM code should not touch the VSoC window on an x86 CPU.
Greg Hartman98d18af2017-12-05 13:12:31 -080062cc_defaults {
Greg Hartman6da43022017-12-05 11:16:02 -080063 name: "cuttlefish_native_isa",
Greg Hartmance872ef2017-12-04 22:51:47 -080064 target: {
Greg Hartman98d18af2017-12-05 13:12:31 -080065 android_arm: {
66 enabled: false,
67 },
Greg Hartman98ac8e02017-12-08 19:49:14 -080068 android_arm64: {
69 enabled: false,
70 },
Greg Hartman98d18af2017-12-05 13:12:31 -080071 },
72}
73
Greg Hartmance872ef2017-12-04 22:51:47 -080074cc_defaults {
75 name: "cuttlefish_host_only",
76 device_supported: false,
77 host_supported: true,
78 defaults: ["cuttlefish_base"],
79}
80
81cc_defaults {
82 name: "cuttlefish_host_and_guest",
83 host_supported: true,
84 defaults: ["cuttlefish_base"],
85}
86
87cc_library_shared {
Greg Hartmana4ff2482017-10-03 16:35:00 -070088 name: "vsoc_lib",
89 srcs: [
90 "common/vsoc/lib/compat.cpp",
91 "common/vsoc/lib/e2e_test_region_layout.cpp",
92 "common/vsoc/lib/fb_bcast_layout.cpp",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -080093 "common/vsoc/lib/fb_bcast_region_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070094 "common/vsoc/lib/gralloc_layout.cpp",
95 "common/vsoc/lib/lock_common.cpp",
96 "common/vsoc/lib/region_view.cpp",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -080097 "common/vsoc/lib/wifi_exchange_layout.cpp",
Tomasz Wiszkowski719ce862017-12-01 12:31:17 -080098 "common/vsoc/lib/wifi_exchange_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070099 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800100 header_libs: ["cuttlefish_glog"],
101 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700102 "libcuttlefish_fs",
Greg Hartman98d18af2017-12-05 13:12:31 -0800103 "cuttlefish_auto_resources",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700104 "libbase",
Greg Hartmand072a342017-12-05 20:27:40 -0800105 "liblog",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700106 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800107 target: {
Greg Hartman09302512017-12-06 20:56:16 -0800108 linux_glibc: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800109 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800110 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800111 "host/vsoc/lib/host_lock.cpp",
112 "host/vsoc/lib/region_control.cpp",
113 "host/vsoc/lib/region_view.cpp",
114 ],
115 },
116 android: {
117 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800118 "guest/vsoc/lib/gralloc_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800119 "guest/vsoc/lib/guest_lock.cpp",
120 "guest/vsoc/lib/region_control.cpp",
121 "guest/vsoc/lib/region_view.cpp",
122 ],
123 },
124 },
Greg Hartmance872ef2017-12-04 22:51:47 -0800125 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700126}
127
Greg Hartmana4ff2482017-10-03 16:35:00 -0700128cc_test_host {
129 name: "circqueue_test",
130 srcs: [
131 "common/vsoc/lib/circqueue_test.cpp",
132 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800133 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700134 "vsoc_lib",
135 "libbase",
136 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800137 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700138}
139
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800140cc_test {
141 name: "vsoc_fb_bcast_region_view_test",
142 srcs: [
143 "common/vsoc/lib/fb_bcast_region_view_test.cpp",
144 ],
145 shared_libs: [
146 "vsoc_lib",
147 "libbase",
148 ],
149 target : {
Greg Hartman09302512017-12-06 20:56:16 -0800150 linux_glibc_x86_64: {
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800151 static_libs: [
152 "libcuttlefish_host_config",
153 "libgflags",
154 ],
155 },
156 },
157 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
158}
159
Greg Hartmana4ff2482017-10-03 16:35:00 -0700160cc_test_host {
161 name: "lock_test",
162 srcs: [
163 "common/vsoc/lib/lock_test.cpp",
164 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800165 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700166 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700167 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800168 "cuttlefish_auto_resources",
169 "libbase",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700170 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800171 static_libs: [
172 "libgtest_host",
173 ],
174 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700175}
176
177cc_test_host {
178 name: "vsoc_graphics_test",
179 srcs: [
180 "common/vsoc/lib/graphics_test.cpp",
181 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800182 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700183 "vsoc_lib",
184 "libbase",
185 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800186 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700187}
188
189cc_binary_host {
190 name: "host_region_e2e_test",
191 srcs: [
192 "host/vsoc/lib/host_region_e2e_test.cpp",
193 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800194 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700195 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700196 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800197 "cuttlefish_auto_resources",
198 "libbase",
199 ],
200 static_libs: [
Greg Hartman6da43022017-12-05 11:16:02 -0800201 "libcuttlefish_host_config",
Greg Hartmance872ef2017-12-04 22:51:47 -0800202 "libgtest_host",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800203 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700204 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800205 defaults: ["cuttlefish_host_only"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700206}