blob: 561c9cddcc621b2b61f2c10101c4cc7aba377d4e [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",
Greg Hartmana4ff2482017-10-03 16:35:00 -070018 "host",
Greg Hartmanbff7e632017-09-29 11:32:08 -070019]
20
21cc_library_headers {
Greg Hartmana4ff2482017-10-03 16:35:00 -070022 name: "cuttlefish_common_headers",
23 export_include_dirs: ["."],
24 host_supported: true,
25}
26
27// TODO(b/67435044) Update the include paths and remove this
28cc_library_headers {
29 name: "cuttlefish_glog",
30 export_include_dirs: ["common/libs"],
31 host_supported: true,
Greg Hartmanbff7e632017-09-29 11:32:08 -070032}
33
34cc_defaults {
Greg Hartmana4ff2482017-10-03 16:35:00 -070035 name: "cuttlefish_host",
36 gnu_extensions: false,
37 header_libs: [
38 "cuttlefish_common_headers",
39 "cuttlefish_kernel_headers",
40 ],
41 // Build only 64 bit Intel Linux host executables
42 device_supported: false,
43 compile_multilib: "64",
44 target: {
45 linux: {
46 host_ldlibs: ["-lrt"],
47 cflags: ["-DCUTTLEFISH_HOST"],
48 },
49 darwin: {
50 enabled: false,
51 },
Greg Hartmanbff7e632017-09-29 11:32:08 -070052 },
Greg Hartmana4ff2482017-10-03 16:35:00 -070053}
54
55cc_library_host_static {
56 name: "vsoc_lib",
57 srcs: [
58 "common/vsoc/lib/compat.cpp",
59 "common/vsoc/lib/e2e_test_region_layout.cpp",
60 "common/vsoc/lib/fb_bcast_layout.cpp",
61 "common/vsoc/lib/gralloc_layout.cpp",
62 "common/vsoc/lib/lock_common.cpp",
63 "common/vsoc/lib/region_view.cpp",
64 "host/vsoc/lib/host_lock.cpp",
65 "host/vsoc/lib/region_control.cpp",
66 "host/vsoc/lib/region_view.cpp",
67 ],
68 header_libs: ["cuttlefish_glog"],
69 static_libs: [
70 "libcuttlefish_fs",
71 "libbase",
72 ],
73 defaults: ["cuttlefish_host"],
74}
75
76cc_library_host_static {
77 name: "libvsoc_gralloc",
78 srcs: [
79 "host/vsoc/gralloc/gralloc_buffer_region.cpp",
80 ],
81 header_libs: ["cuttlefish_glog"],
82 static_libs: [
83 "vsoc_lib",
84 "libbase",
85 ],
86 defaults: ["cuttlefish_host"],
87}
88
89cc_test_host {
90 name: "circqueue_test",
91 srcs: [
92 "common/vsoc/lib/circqueue_test.cpp",
93 ],
94 static_libs: [
95 "vsoc_lib",
96 "libbase",
97 ],
98 defaults: ["cuttlefish_host"],
99}
100
101cc_test_host {
102 name: "lock_test",
103 srcs: [
104 "common/vsoc/lib/lock_test.cpp",
105 ],
106 static_libs: [
107 "vsoc_lib",
108 "libgtest_host",
109 "libbase",
110 "cuttlefish_auto_resources",
111 "libcuttlefish_fs",
112 ],
113 defaults: ["cuttlefish_host"],
114}
115
116cc_test_host {
117 name: "vsoc_graphics_test",
118 srcs: [
119 "common/vsoc/lib/graphics_test.cpp",
120 ],
121 static_libs: [
122 "vsoc_lib",
123 "libbase",
124 ],
125 defaults: ["cuttlefish_host"],
126}
127
128cc_binary_host {
129 name: "host_region_e2e_test",
130 srcs: [
131 "host/vsoc/lib/host_region_e2e_test.cpp",
132 ],
133 static_libs: [
134 "vsoc_lib",
135 "libgtest_host",
136 "libbase",
137 "cuttlefish_auto_resources",
138 "libcuttlefish_fs",
139 ],
140 defaults: ["cuttlefish_host"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700141}