/* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package { // See: http://go/android-license-faq default_applicable_licenses: ["external_mesa3d_license"], } filegroup { name: "mesa_u_format_yaml", srcs: ["u_format.yaml"], } python_binary_host { name: "u_format_table_gen", main: "u_format_table.py", srcs: [ "u_format_table.py", "u_format_pack.py", "u_format_parse.py", ], libs: [ "pyyaml", ], } genrule { name: "u_format_pack_header", srcs: [":mesa_u_format_yaml"], out: ["u_format_pack.h"], tools: ["u_format_table_gen"], cmd: "python3 $(location u_format_table_gen) " + "$(location :mesa_u_format_yaml) --header " + "&> $(location u_format_pack.h)", } genrule { name: "u_format_gen_header", srcs: [":mesa_u_format_yaml"], out: ["util/format/u_format_gen.h"], tools: ["u_format_table_gen"], cmd: "python3 $(location u_format_table_gen) " + "$(location :mesa_u_format_yaml) --enums " + "&> $(location util/format/u_format_gen.h)", } genrule { name: "u_format_table_impl", srcs: [":mesa_u_format_yaml"], out: ["u_format_table.c"], tools: ["u_format_table_gen"], cmd: "python3 $(location u_format_table_gen) " + "$(location :mesa_u_format_yaml) " + " &> $(location u_format_table.c)", } cc_library_static { name: "mesa_util_format", vendor: true, host_supported: true, defaults: [ "mesa_common_defaults", ], header_libs: [ "mesa_common_headers", "mesa_util_headers", ], generated_headers: [ "u_format_pack_header", "u_format_gen_header", ], generated_sources: [ "u_format_table_impl", "format_srgb_impl", ], srcs: [ "u_format.c", "u_format_bptc.c", "u_format_etc.c", "u_format_fxt1.c", "u_format_latc.c", "u_format_other.c", "u_format_rgtc.c", "u_format_s3tc.c", "u_format_tests.c", "u_format_unpack_neon.c", "u_format_yuv.c", "u_format_zs.c", ], }