blob: d19dcb68c72591ddf158c6a775eaa29535a79901 [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 {
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080036 name: "cuttlefish_common",
37 gnu_extensions: false,
38 header_libs: [
39 "cuttlefish_common_headers",
40 "cuttlefish_kernel_headers",
41 ],
42 host_supported: true,
43 device_supported: true,
44 target: {
45 linux: {
46 host_ldlibs: ["-lrt"],
47 cflags: ["-DCUTTLEFISH_HOST"],
48 },
49 darwin: {
50 enabled: false,
51 },
52 android: {
53 enabled: true,
54 },
55 windows: {
56 enabled: false,
57 },
58 },
59}
60
61cc_defaults {
Greg Hartmana4ff2482017-10-03 16:35:00 -070062 name: "cuttlefish_host",
63 gnu_extensions: false,
64 header_libs: [
65 "cuttlefish_common_headers",
66 "cuttlefish_kernel_headers",
67 ],
68 // Build only 64 bit Intel Linux host executables
69 device_supported: false,
70 compile_multilib: "64",
71 target: {
72 linux: {
73 host_ldlibs: ["-lrt"],
74 cflags: ["-DCUTTLEFISH_HOST"],
75 },
76 darwin: {
77 enabled: false,
78 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070079 },
Greg Hartmana4ff2482017-10-03 16:35:00 -070080}
81
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080082cc_library {
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",
88 "common/vsoc/lib/gralloc_layout.cpp",
89 "common/vsoc/lib/lock_common.cpp",
90 "common/vsoc/lib/region_view.cpp",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -080091 "common/vsoc/lib/wifi_exchange_layout.cpp",
Tomasz Wiszkowski719ce862017-12-01 12:31:17 -080092 "common/vsoc/lib/wifi_exchange_view.cpp",
Greg Hartmana4ff2482017-10-03 16:35:00 -070093 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -080094 header_libs: [
95 "cuttlefish_glog"
96 ],
Greg Hartmana4ff2482017-10-03 16:35:00 -070097 static_libs: [
98 "libcuttlefish_fs",
99 "libbase",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800100 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700101 ],
Tomasz Wiszkowski55d53ff2017-12-04 15:39:57 -0800102 target: {
103 linux: {
104 host_ldlibs: ["-lrt"],
105 cflags: ["-DCUTTLEFISH_HOST"],
106 srcs: [
107 "host/vsoc/lib/host_lock.cpp",
108 "host/vsoc/lib/region_control.cpp",
109 "host/vsoc/lib/region_view.cpp",
110 ],
111 },
112 android: {
113 srcs: [
114 "guest/vsoc/lib/guest_lock.cpp",
115 "guest/vsoc/lib/region_control.cpp",
116 "guest/vsoc/lib/region_view.cpp",
117 ],
118 },
119 },
120 defaults: ["cuttlefish_common"],
Greg Hartmana4ff2482017-10-03 16:35:00 -0700121}
122
123cc_library_host_static {
124 name: "libvsoc_gralloc",
125 srcs: [
126 "host/vsoc/gralloc/gralloc_buffer_region.cpp",
127 ],
128 header_libs: ["cuttlefish_glog"],
129 static_libs: [
130 "vsoc_lib",
131 "libbase",
132 ],
133 defaults: ["cuttlefish_host"],
134}
135
136cc_test_host {
137 name: "circqueue_test",
138 srcs: [
139 "common/vsoc/lib/circqueue_test.cpp",
140 ],
141 static_libs: [
142 "vsoc_lib",
143 "libbase",
144 ],
145 defaults: ["cuttlefish_host"],
146}
147
148cc_test_host {
149 name: "lock_test",
150 srcs: [
151 "common/vsoc/lib/lock_test.cpp",
152 ],
153 static_libs: [
154 "vsoc_lib",
155 "libgtest_host",
156 "libbase",
157 "cuttlefish_auto_resources",
158 "libcuttlefish_fs",
159 ],
160 defaults: ["cuttlefish_host"],
161}
162
163cc_test_host {
164 name: "vsoc_graphics_test",
165 srcs: [
166 "common/vsoc/lib/graphics_test.cpp",
167 ],
168 static_libs: [
169 "vsoc_lib",
170 "libbase",
171 ],
172 defaults: ["cuttlefish_host"],
173}
174
175cc_binary_host {
176 name: "host_region_e2e_test",
177 srcs: [
178 "host/vsoc/lib/host_region_e2e_test.cpp",
179 ],
180 static_libs: [
181 "vsoc_lib",
182 "libgtest_host",
183 "libbase",
184 "cuttlefish_auto_resources",
185 "libcuttlefish_fs",
Tomasz Wiszkowskic2c4dd62017-11-30 10:19:22 -0800186 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700187 ],
188 defaults: ["cuttlefish_host"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700189}