1# Copyright © 2024 Imagination Technologies Ltd. 2# SPDX-License-Identifier: MIT 3 4inc_powervr_compiler = include_directories(['.']) 5 6libpowervr_compiler_files = files( 7 'pco.c', 8 'pco_binary.c', 9 'pco_const_imms.c', 10 'pco_debug.c', 11 'pco_end.c', 12 'pco_group_instrs.c', 13 'pco_index.c', 14 'pco_ir.c', 15 'pco_nir.c', 16 'pco_nir_pvfio.c', 17 'pco_opt.c', 18 'pco_print.c', 19 'pco_ra.c', 20 'pco_schedule.c', 21 'pco_trans_nir.c', 22 'pco_validate.c', 23) 24 25pco_pygen_dep_files = files('pco_pygen_common.py', 'pco_isa.py', 'pco_ops.py', 'pco_map.py') 26 27pco_builder_ops_h = custom_target( 28 'pco_builder_ops.h', 29 input : ['pco_builder_ops.h.py'], 30 output : 'pco_builder_ops.h', 31 command : [prog_python, '@INPUT@'], 32 capture : true, 33 depend_files : pco_pygen_dep_files, 34) 35 36pco_common_h = custom_target( 37 'pco_common.h', 38 input : ['pco_common.h.py'], 39 output : 'pco_common.h', 40 command : [prog_python, '@INPUT@'], 41 capture : true, 42 depend_files : pco_pygen_dep_files, 43) 44 45pco_info_c = custom_target( 46 'pco_info.c', 47 input : ['pco_info.c.py'], 48 output : 'pco_info.c', 49 command : [prog_python, '@INPUT@'], 50 capture : true, 51 depend_files : pco_pygen_dep_files, 52) 53 54pco_isa_h = custom_target( 55 'pco_isa.h', 56 input : ['pco_isa.h.py'], 57 output : 'pco_isa.h', 58 command : [prog_python, '@INPUT@'], 59 capture : true, 60 depend_files : pco_pygen_dep_files, 61) 62 63pco_map_h = custom_target( 64 'pco_map.h', 65 input : ['pco_map.h.py'], 66 output : 'pco_map.h', 67 command : [prog_python, '@INPUT@'], 68 capture : true, 69 depend_files : pco_pygen_dep_files, 70) 71 72pco_ops_h = custom_target( 73 'pco_ops.h', 74 input : ['pco_ops.h.py'], 75 output : 'pco_ops.h', 76 command : [prog_python, '@INPUT@'], 77 capture : true, 78 depend_files : pco_pygen_dep_files, 79) 80 81idep_pco_pygen = declare_dependency( 82 sources : [ 83 pco_builder_ops_h, 84 pco_common_h, 85 pco_info_c, 86 pco_isa_h, 87 pco_map_h, 88 pco_ops_h, 89 ], 90 include_directories : inc_powervr_compiler, 91) 92 93pco_pygen_c_files = [pco_info_c] 94 95libpowervr_compiler = static_library( 96 'powervr_compiler', 97 [libpowervr_compiler_files, pco_pygen_c_files], 98 include_directories : [ 99 inc_imagination, 100 inc_powervr_compiler, 101 inc_include, 102 inc_compiler, 103 inc_src, 104 ], 105 # Suppress 'parameter passing for argument of type ... changed in GCC ...' warnings. 106 c_args : [imagination_c_args, no_override_init_args, '-Wno-psabi'], 107 dependencies : [idep_mesautil, idep_nir, idep_pco_pygen], 108 gnu_symbol_visibility : 'hidden', 109 install : false, 110) 111