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", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 18 | "host", |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 19 | ] |
| 20 | |
| 21 | cc_library_headers { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 22 | 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 |
| 28 | cc_library_headers { |
| 29 | name: "cuttlefish_glog", |
| 30 | export_include_dirs: ["common/libs"], |
| 31 | host_supported: true, |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | cc_defaults { |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 35 | 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 Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 52 | }, |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | cc_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 Hartman | efe487a | 2017-11-10 20:39:06 -0800 | [diff] [blame^] | 72 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 73 | ], |
| 74 | defaults: ["cuttlefish_host"], |
| 75 | } |
| 76 | |
| 77 | cc_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 | |
| 90 | cc_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 | |
| 102 | cc_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 | |
| 117 | cc_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 | |
| 129 | cc_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 Hartman | efe487a | 2017-11-10 20:39:06 -0800 | [diff] [blame^] | 140 | "libgflags", |
Greg Hartman | a4ff248 | 2017-10-03 16:35:00 -0700 | [diff] [blame] | 141 | ], |
| 142 | defaults: ["cuttlefish_host"], |
Greg Hartman | bff7e63 | 2017-09-29 11:32:08 -0700 | [diff] [blame] | 143 | } |