1# Copyright © 2018 Rob Clark 2# Copyright © 2019 Collabora 3 4# Permission is hereby granted, free of charge, to any person obtaining a copy 5# of this software and associated documentation files (the "Software"), to deal 6# in the Software without restriction, including without limitation the rights 7# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8# copies of the Software, and to permit persons to whom the Software is 9# furnished to do so, subject to the following conditions: 10 11# The above copyright notice and this permission notice shall be included in 12# all copies or substantial portions of the Software. 13 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20# SOFTWARE. 21 22libasahi_agx_files = files( 23 'agx_compile.c', 24 'agx_dce.c', 25 'agx_liveness.c', 26 'agx_pack.c', 27 'agx_print.c', 28 'agx_optimizer.c', 29 'agx_register_allocate.c', 30 'agx_uniforms.c', 31) 32 33agx_opcodes_h = custom_target( 34 'agx_opcodes.h', 35 input : ['agx_opcodes.h.py'], 36 output : 'agx_opcodes.h', 37 command : [prog_python, '@INPUT@'], 38 capture : true, 39 depend_files : files('agx_opcodes.py'), 40) 41 42idep_agx_opcodes_h = declare_dependency( 43 sources : [agx_opcodes_h], 44 include_directories : include_directories('.'), 45) 46 47agx_opcodes_c = custom_target( 48 'agx_opcodes.c', 49 input : ['agx_opcodes.c.py'], 50 output : 'agx_opcodes.c', 51 command : [prog_python, '@INPUT@'], 52 capture : true, 53 depend_files : files('agx_opcodes.py'), 54) 55 56agx_builder_h = custom_target( 57 'agx_builder.h', 58 input : ['agx_builder.h.py'], 59 output : 'agx_builder.h', 60 command : [prog_python, '@INPUT@'], 61 capture : true, 62 depend_files : files('agx_opcodes.py'), 63) 64 65idep_agx_builder_h = declare_dependency( 66 sources : [agx_builder_h], 67 include_directories : include_directories('.'), 68) 69 70libasahi_compiler = static_library( 71 'asahi_compiler', 72 [libasahi_agx_files, agx_opcodes_c], 73 include_directories : [inc_include, inc_src, inc_mesa, inc_gallium, inc_gallium_aux, inc_mapi], 74 dependencies: [idep_nir, idep_agx_opcodes_h, idep_agx_builder_h, idep_agx_pack], 75 c_args : [no_override_init_args], 76 gnu_symbol_visibility : 'hidden', 77 build_by_default : false, 78) 79