blob: f6d570a6a5986952e3c3e53fe273501b979ff8d3 [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 Hartmana4ff2482017-10-03 16:35:00 -070036 name: "cuttlefish_host",
37 gnu_extensions: false,
38 header_libs: [
39 "cuttlefish_common_headers",
40 "cuttlefish_kernel_headers",
41 ],
42 // Build only 64 bit Intel Linux host executables
43 device_supported: false,
44 compile_multilib: "64",
45 target: {
46 linux: {
47 host_ldlibs: ["-lrt"],
48 cflags: ["-DCUTTLEFISH_HOST"],
49 },
50 darwin: {
51 enabled: false,
52 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070053 },
Greg Hartmana4ff2482017-10-03 16:35:00 -070054}
55
56cc_library_host_static {
57 name: "vsoc_lib",
58 srcs: [
59 "common/vsoc/lib/compat.cpp",
60 "common/vsoc/lib/e2e_test_region_layout.cpp",
61 "common/vsoc/lib/fb_bcast_layout.cpp",
62 "common/vsoc/lib/gralloc_layout.cpp",
63 "common/vsoc/lib/lock_common.cpp",
64 "common/vsoc/lib/region_view.cpp",
65 "host/vsoc/lib/host_lock.cpp",
66 "host/vsoc/lib/region_control.cpp",
67 "host/vsoc/lib/region_view.cpp",
68 ],
69 header_libs: ["cuttlefish_glog"],
70 static_libs: [
71 "libcuttlefish_fs",
72 "libbase",
Greg Hartmanefe487a2017-11-10 20:39:06 -080073 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -070074 ],
75 defaults: ["cuttlefish_host"],
76}
77
78cc_library_host_static {
79 name: "libvsoc_gralloc",
80 srcs: [
81 "host/vsoc/gralloc/gralloc_buffer_region.cpp",
82 ],
83 header_libs: ["cuttlefish_glog"],
84 static_libs: [
85 "vsoc_lib",
86 "libbase",
87 ],
88 defaults: ["cuttlefish_host"],
89}
90
91cc_test_host {
92 name: "circqueue_test",
93 srcs: [
94 "common/vsoc/lib/circqueue_test.cpp",
95 ],
96 static_libs: [
97 "vsoc_lib",
98 "libbase",
99 ],
100 defaults: ["cuttlefish_host"],
101}
102
103cc_test_host {
104 name: "lock_test",
105 srcs: [
106 "common/vsoc/lib/lock_test.cpp",
107 ],
108 static_libs: [
109 "vsoc_lib",
110 "libgtest_host",
111 "libbase",
112 "cuttlefish_auto_resources",
113 "libcuttlefish_fs",
114 ],
115 defaults: ["cuttlefish_host"],
116}
117
118cc_test_host {
119 name: "vsoc_graphics_test",
120 srcs: [
121 "common/vsoc/lib/graphics_test.cpp",
122 ],
123 static_libs: [
124 "vsoc_lib",
125 "libbase",
126 ],
127 defaults: ["cuttlefish_host"],
128}
129
130cc_binary_host {
131 name: "host_region_e2e_test",
132 srcs: [
133 "host/vsoc/lib/host_region_e2e_test.cpp",
134 ],
135 static_libs: [
136 "vsoc_lib",
137 "libgtest_host",
138 "libbase",
139 "cuttlefish_auto_resources",
140 "libcuttlefish_fs",
Greg Hartmanefe487a2017-11-10 20:39:06 -0800141 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700142 ],
143 defaults: ["cuttlefish_host"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700144}