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: ["external_mesa3d_license"], 20} 21 22genrule { 23 name: "wsi_common_entrypoints_header", 24 srcs: [":mesa_vulkan_xml"], 25 out: ["wsi_common_entrypoints.h"], 26 tools: ["vk_entrypoints_gen"], 27 cmd: "python3 $(location vk_entrypoints_gen) --xml " + 28 "$(location :mesa_vulkan_xml) --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", 35 srcs: [":mesa_vulkan_xml"], 36 out: ["wsi_common_entrypoints.c"], 37 tools: ["vk_entrypoints_gen"], 38 cmd: "python3 $(location vk_entrypoints_gen) --xml " + 39 "$(location :mesa_vulkan_xml) --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: "mesa_vulkan_wsi", 47 host_supported: true, 48 vendor: true, 49 defaults: [ 50 "mesa_common_defaults", 51 ], 52 header_libs: [ 53 "mesa_common_headers", 54 ], 55 static_libs: [ 56 "mesa_vulkan_util", 57 "mesa_vulkan_runtime", 58 "mesa_gfxstream_vulkan_entrypoints", 59 "mesa_util", 60 "libdrm", 61 ], 62 shared_libs: [ 63 "libcutils", 64 ], 65 generated_headers: [ 66 "vk_cmd_queue_header", 67 "vk_physical_device_features_header", 68 "vk_physical_device_properties_header", 69 "wsi_common_entrypoints_header", 70 "u_format_gen_header", 71 "spirv_info_header", 72 ], 73 generated_sources: [ 74 "wsi_common_entrypoints_impl", 75 ], 76 srcs: [ 77 "wsi_common.c", 78 "wsi_common_drm.c", 79 "wsi_common_headless.c", 80 ], 81 export_include_dirs: [ 82 ".", 83 ], 84 target: { 85 android: { 86 shared_libs: [ 87 "libsync", 88 ], 89 }, 90 }, 91} 92