Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 1 | // |
| 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 | |
| 16 | subdirs = [ |
| 17 | "common", |
Tomasz Wiszkowski | eb642fc | 2017-11-28 12:36:31 -0800 | [diff] [blame^] | 18 | "guest", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 19 | "host", |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 20 | ] |
| 21 | |
| 22 | cc_library_headers { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 23 | 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 |
| 29 | cc_library_headers { |
| 30 | name: "cuttlefish_glog", |
| 31 | export_include_dirs: ["common/libs"], |
| 32 | host_supported: true, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | cc_defaults { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 36 | 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 Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 53 | }, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | cc_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 Hartman | efe487a | 2017-11-10 20:39:06 -0800 | [diff] [blame] | 73 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 74 | ], |
| 75 | defaults: ["cuttlefish_host"], |
| 76 | } |
| 77 | |
| 78 | cc_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 | |
| 91 | cc_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 | |
| 103 | cc_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 | |
| 118 | cc_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 | |
| 130 | cc_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 Hartman | efe487a | 2017-11-10 20:39:06 -0800 | [diff] [blame] | 141 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 142 | ], |
| 143 | defaults: ["cuttlefish_host"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 144 | } |