1/* 2 * Copyright (C) 2023 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 17package { 18 // See: http://go/android-license-faq 19 default_applicable_licenses: ["hardware_google_gfxstream_license"], 20} 21 22genrule { 23 name: "wsi_common_entrypoints_header_gfxstream", 24 srcs: [":libmesa_vulkan_xml_gfxstream"], 25 out: ["wsi_common_entrypoints.h"], 26 tools: ["vk_entrypoints_gen_gfxstream"], 27 cmd: "python3 $(location vk_entrypoints_gen_gfxstream) --xml " + 28 "$(location :libmesa_vulkan_xml_gfxstream) --proto --weak --out-h " + 29 "$(location wsi_common_entrypoints.h) --out-c " + 30 "$(genDir)/placeholder.c --prefix wsi --beta false", 31} 32 33genrule { 34 name: "wsi_common_entrypoints_impl_gfxstream", 35 srcs: [":libmesa_vulkan_xml_gfxstream"], 36 out: ["wsi_common_entrypoints.c"], 37 tools: ["vk_entrypoints_gen_gfxstream"], 38 cmd: "python3 $(location vk_entrypoints_gen_gfxstream) --xml " + 39 "$(location :libmesa_vulkan_xml_gfxstream) --proto --weak --out-h " + 40 "$(genDir)/wsi_common_entrypoints.h --out-c " + 41 "$(location wsi_common_entrypoints.c) --prefix wsi " + 42 "--beta false", 43} 44 45cc_library_static { 46 name: "libmesa_vulkan_wsi_gfxstream", 47 host_supported: true, 48 vendor: true, 49 defaults: [ 50 "mesa_common_defaults_gfxstream", 51 ], 52 header_libs: [ 53 "mesa_common_headers_gfxstream", 54 ], 55 static_libs: [ 56 "libmesa_vulkan_util_gfxstream", 57 "libmesa_vulkan_runtime_gfxstream", 58 "libgfxstream_guest_vulkan_entrypoints", 59 "libmesa_util_gfxstream", 60 "libdrm", 61 ], 62 shared_libs: [ 63 "libcutils", 64 ], 65 cflags: [ 66 "-DVK_NO_NIR", 67 ], 68 generated_headers: [ 69 "vk_cmd_queue_header_gfxstream", 70 "vk_physical_device_features_header_gfxstream", 71 "vk_physical_device_properties_header_gfxstream", 72 "wsi_common_entrypoints_header_gfxstream", 73 ], 74 generated_sources: [ 75 "wsi_common_entrypoints_impl_gfxstream", 76 ], 77 srcs: [ 78 "wsi_common.c", 79 "wsi_common_drm.c", 80 "wsi_common_headless.c", 81 ], 82 export_include_dirs: [ 83 ".", 84 ], 85} 86