1/* 2 * Copyright (C) 2024 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 22cc_library_headers { 23 name: "mesa_compiler_headers", 24 vendor: true, 25 host_supported: true, 26 export_include_dirs: [ 27 ".", 28 ], 29} 30 31filegroup { 32 name: "mesa_float64_glsl", 33 srcs: ["glsl/float64.glsl"], 34} 35 36python_binary_host { 37 name: "ir_expression_operation_gen", 38 main: "glsl/ir_expression_operation.py", 39 srcs: [ 40 "glsl/ir_expression_operation.py", 41 ], 42 libs: [ 43 "mako", 44 ], 45} 46 47genrule { 48 name: "ir_expression_operation_header", 49 out: ["ir_expression_operation.h"], 50 tools: ["ir_expression_operation_gen"], 51 cmd: "python3 $(location ir_expression_operation_gen) enum" + 52 "&> $(location ir_expression_operation.h)", 53} 54 55python_binary_host { 56 name: "builtin_types_header_gen", 57 main: "builtin_types_h.py", 58 srcs: [ 59 "builtin_types_h.py", 60 "builtin_types.py", 61 ], 62 libs: [ 63 "mako", 64 ], 65 version: { 66 py3: { 67 embedded_launcher: false, 68 }, 69 }, 70} 71 72python_binary_host { 73 name: "builtin_types_impl_gen", 74 main: "builtin_types_c.py", 75 srcs: [ 76 "builtin_types_c.py", 77 "builtin_types.py", 78 ], 79 libs: [ 80 "mako", 81 ], 82 version: { 83 py3: { 84 embedded_launcher: false, 85 }, 86 }, 87} 88 89genrule { 90 name: "builtin_types_header", 91 out: ["builtin_types.h"], 92 tools: ["builtin_types_header_gen"], 93 cmd: "python3 $(location builtin_types_header_gen) " + 94 "$(location builtin_types.h)", 95} 96 97genrule { 98 name: "builtin_types_impl", 99 out: ["builtin_types.c"], 100 tools: ["builtin_types_impl_gen"], 101 cmd: "python3 $(location builtin_types_impl_gen) " + 102 "$(location builtin_types.c)", 103} 104 105cc_library_static { 106 name: "mesa_compiler", 107 vendor: true, 108 host_supported: true, 109 defaults: [ 110 "mesa_common_defaults", 111 ], 112 static_libs: [ 113 "mesa_util_c11", 114 ], 115 generated_headers: [ 116 "ir_expression_operation_header", 117 "builtin_types_header", 118 "u_format_gen_header", 119 ], 120 generated_sources: [ 121 "builtin_types_impl", 122 ], 123 header_libs: [ 124 "mesa_gallium_auxiliary_headers", 125 "mesa_gallium_headers", 126 "mesa_src_headers", 127 "mesa_compiler_headers", 128 "mesa_common_headers", 129 ], 130 srcs: [ 131 "glsl_types.c", 132 "shader_enums.c", 133 ], 134} 135