1# Copyright © 2017 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21inc_compiler = include_directories('.') 22inc_glsl = include_directories('glsl') 23inc_spirv = include_directories('spirv') 24 25builtin_types_h = custom_target( 26 'builtin_types.h', 27 input : 'builtin_types_h.py', 28 output : 'builtin_types.h', 29 command : [prog_python, '@INPUT@', '@OUTPUT@'], 30 depend_files : files('builtin_types.py'), 31) 32 33builtin_types_c = custom_target( 34 'builtin_types.c', 35 input : 'builtin_types_c.py', 36 output : 'builtin_types.c', 37 command : [prog_python, '@INPUT@', '@OUTPUT@'], 38 depend_files : files('builtin_types.py'), 39) 40 41float64_glsl_file = files('glsl/float64.glsl') 42 43astc_decoder_glsl_file = files('glsl/astc_decoder.glsl') 44 45files_libcompiler = files( 46 'glsl_types.c', 47 'glsl_types.h', 48 'shader_enums.c', 49 'shader_enums.h', 50 'shader_info.h', 51) 52 53ir_expression_operation_h = custom_target( 54 'ir_expression_operation.h', 55 input : 'glsl/ir_expression_operation.py', 56 output : 'ir_expression_operation.h', 57 command : [prog_python, '@INPUT@', 'enum'], 58 capture : true, 59) 60 61libcompiler = static_library( 62 'compiler', 63 [files_libcompiler, ir_expression_operation_h, builtin_types_h, builtin_types_c], 64 include_directories : [inc_compiler, inc_include, inc_src], 65 c_args : [c_msvc_compat_args, no_override_init_args], 66 cpp_args : [cpp_msvc_compat_args], 67 gnu_symbol_visibility : 'hidden', 68 dependencies : [dep_valgrind], 69 build_by_default : false, 70) 71 72idep_compiler = declare_dependency( 73 sources : [ir_expression_operation_h, builtin_types_h], 74 include_directories : inc_compiler, 75 link_with : libcompiler, 76) 77 78subdir('nir') 79 80subdir('spirv') 81 82if with_clc 83 subdir('clc') 84endif 85if with_gallium 86 subdir('glsl') 87endif 88subdir('isaspec') 89