blob: 3c1d05b4dcc0d60cc43e1f616d02640e120c2425 [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",
24 export_include_dirs: ["."],
25 host_supported: true,
26}
27
28// TODO(b/67435044) Update the include paths and remove this
29cc_library_headers {
30 name: "cuttlefish_glog",
31 export_include_dirs: ["common/libs"],
32 host_supported: true,
Greg Hartmanbff7e632017-09-29 11:32:08 -070033}
34
35cc_defaults {
Greg Hartmance872ef2017-12-04 22:51:47 -080036 name: "cuttlefish_base",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080037 gnu_extensions: false,
38 header_libs: [
39 "cuttlefish_common_headers",
40 "cuttlefish_kernel_headers",
41 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080042 target: {
Greg Hartman09302512017-12-06 20:56:16 -080043 linux_glibc: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080044 host_ldlibs: ["-lrt"],
45 cflags: ["-DCUTTLEFISH_HOST"],
46 },
Greg Hartmance872ef2017-12-04 22:51:47 -080047 // We don't need 32 bit host-side builds
Greg Hartman09302512017-12-06 20:56:16 -080048 linux_glibc_x86: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080049 enabled: false,
50 },
Greg Hartmance872ef2017-12-04 22:51:47 -080051 // We don't need Darwin host-side builds
Greg Hartmana4ff2482017-10-03 16:35:00 -070052 darwin: {
53 enabled: false,
54 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070055 },
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 },
66 },
67}
68
Greg Hartmance872ef2017-12-04 22:51:47 -080069cc_defaults {
70 name: "cuttlefish_host_only",
71 device_supported: false,
72 host_supported: true,
73 defaults: ["cuttlefish_base"],
74}
75
76cc_defaults {
77 name: "cuttlefish_host_and_guest",
78 host_supported: true,
79 defaults: ["cuttlefish_base"],
80}
81
82cc_library_shared {
Greg Hartmana4ff2482017-10-03 16:35:00 -070083 name: "vsoc_lib",
84 srcs: [
85 "common/vsoc/lib/compat.cpp",
86 "common/vsoc/lib/e2e_test_region_layout.cpp",
87 "common/vsoc/lib/fb_bcast_layout.cpp",
Greg Hartman4cbb6ab2017-12-04 18:31:37 -080088 "common/vsoc/lib/fb_bcast_region_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070089 "common/vsoc/lib/gralloc_layout.cpp",
90 "common/vsoc/lib/lock_common.cpp",
91 "common/vsoc/lib/region_view.cpp",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -080092 "common/vsoc/lib/wifi_exchange_layout.cpp",
Tomasz Wiszkowski719ce862017-12-01 12:31:17 -080093 "common/vsoc/lib/wifi_exchange_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070094 ],
Greg Hartmance872ef2017-12-04 22:51:47 -080095 header_libs: ["cuttlefish_glog"],
96 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -070097 "libcuttlefish_fs",
Greg Hartman98d18af2017-12-05 13:12:31 -080098 "cuttlefish_auto_resources",
Greg Hartmana4ff2482017-10-03 16:35:00 -070099 "libbase",
Greg Hartmand072a342017-12-05 20:27:40 -0800100 "liblog",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700101 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800102 target: {
Greg Hartman09302512017-12-06 20:56:16 -0800103 linux_glibc: {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800104 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800105 "host/vsoc/lib/gralloc_buffer_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800106 "host/vsoc/lib/host_lock.cpp",
107 "host/vsoc/lib/region_control.cpp",
108 "host/vsoc/lib/region_view.cpp",
109 ],
110 },
111 android: {
112 srcs: [
Greg Hartmand072a342017-12-05 20:27:40 -0800113 "guest/vsoc/lib/gralloc_region_view.cpp",
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800114 "guest/vsoc/lib/guest_lock.cpp",
115 "guest/vsoc/lib/region_control.cpp",
116 "guest/vsoc/lib/region_view.cpp",
117 ],
118 },
119 },
Greg Hartmance872ef2017-12-04 22:51:47 -0800120 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700121}
122
Greg Hartmana4ff2482017-10-03 16:35:00 -0700123cc_test_host {
124 name: "circqueue_test",
125 srcs: [
126 "common/vsoc/lib/circqueue_test.cpp",
127 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800128 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700129 "vsoc_lib",
130 "libbase",
131 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800132 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700133}
134
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800135cc_test {
136 name: "vsoc_fb_bcast_region_view_test",
137 srcs: [
138 "common/vsoc/lib/fb_bcast_region_view_test.cpp",
139 ],
140 shared_libs: [
141 "vsoc_lib",
142 "libbase",
143 ],
144 target : {
Greg Hartman09302512017-12-06 20:56:16 -0800145 linux_glibc_x86_64: {
Greg Hartman4cbb6ab2017-12-04 18:31:37 -0800146 static_libs: [
147 "libcuttlefish_host_config",
148 "libgflags",
149 ],
150 },
151 },
152 defaults: ["cuttlefish_host_and_guest", "cuttlefish_native_isa"],
153}
154
Greg Hartmana4ff2482017-10-03 16:35:00 -0700155cc_test_host {
156 name: "lock_test",
157 srcs: [
158 "common/vsoc/lib/lock_test.cpp",
159 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800160 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700161 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700162 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800163 "cuttlefish_auto_resources",
164 "libbase",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700165 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800166 static_libs: [
167 "libgtest_host",
168 ],
169 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700170}
171
172cc_test_host {
173 name: "vsoc_graphics_test",
174 srcs: [
175 "common/vsoc/lib/graphics_test.cpp",
176 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800177 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700178 "vsoc_lib",
179 "libbase",
180 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800181 defaults: ["cuttlefish_host_only"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700182}
183
184cc_binary_host {
185 name: "host_region_e2e_test",
186 srcs: [
187 "host/vsoc/lib/host_region_e2e_test.cpp",
188 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800189 shared_libs: [
Greg Hartmana4ff2482017-10-03 16:35:00 -0700190 "vsoc_lib",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700191 "libcuttlefish_fs",
Greg Hartmance872ef2017-12-04 22:51:47 -0800192 "cuttlefish_auto_resources",
193 "libbase",
194 ],
195 static_libs: [
Greg Hartman6da43022017-12-05 11:16:02 -0800196 "libcuttlefish_host_config",
Greg Hartmance872ef2017-12-04 22:51:47 -0800197 "libgtest_host",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800198 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700199 ],
Greg Hartmance872ef2017-12-04 22:51:47 -0800200 defaults: ["cuttlefish_host_only"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700201}