blob: 73d7264f855c05eeea8da4958f80b15edefdb6a3 [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",
Greg Hartmanefe487a2017-11-10 20:39:06 -080072 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -070073 ],
74 defaults: ["cuttlefish_host"],
75}
76
77cc_library_host_static {
78 name: "libvsoc_gralloc",
79 srcs: [
80 "host/vsoc/gralloc/gralloc_buffer_region.cpp",
81 ],
82 header_libs: ["cuttlefish_glog"],
83 static_libs: [
84 "vsoc_lib",
85 "libbase",
86 ],
87 defaults: ["cuttlefish_host"],
88}
89
90cc_test_host {
91 name: "circqueue_test",
92 srcs: [
93 "common/vsoc/lib/circqueue_test.cpp",
94 ],
95 static_libs: [
96 "vsoc_lib",
97 "libbase",
98 ],
99 defaults: ["cuttlefish_host"],
100}
101
102cc_test_host {
103 name: "lock_test",
104 srcs: [
105 "common/vsoc/lib/lock_test.cpp",
106 ],
107 static_libs: [
108 "vsoc_lib",
109 "libgtest_host",
110 "libbase",
111 "cuttlefish_auto_resources",
112 "libcuttlefish_fs",
113 ],
114 defaults: ["cuttlefish_host"],
115}
116
117cc_test_host {
118 name: "vsoc_graphics_test",
119 srcs: [
120 "common/vsoc/lib/graphics_test.cpp",
121 ],
122 static_libs: [
123 "vsoc_lib",
124 "libbase",
125 ],
126 defaults: ["cuttlefish_host"],
127}
128
129cc_binary_host {
130 name: "host_region_e2e_test",
131 srcs: [
132 "host/vsoc/lib/host_region_e2e_test.cpp",
133 ],
134 static_libs: [
135 "vsoc_lib",
136 "libgtest_host",
137 "libbase",
138 "cuttlefish_auto_resources",
139 "libcuttlefish_fs",
Greg Hartmanefe487a2017-11-10 20:39:06 -0800140 "libgflags",
Greg Hartmana4ff2482017-10-03 16:35:00 -0700141 ],
142 defaults: ["cuttlefish_host"],
Greg Hartmanbff7e632017-09-29 11:32:08 -0700143}