1# Copyright © 2020 Google, Inc 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 21isa_depend_files = [ 22 'ir3-common.xml', 23 'ir3-cat0.xml', 24 'ir3-cat1.xml', 25 'ir3-cat2.xml', 26 'ir3-cat3.xml', 27 'ir3-cat4.xml', 28 'ir3-cat5.xml', 29 'ir3-cat6.xml', 30 'ir3-cat7.xml', 31] 32 33ir3_isa = custom_target( 34 'ir3-isa', 35 input: ['ir3.xml'], 36 output: ['isaspec-isa.h', 'ir3-isa.c', 'ir3-isa.h'], 37 command: [ 38 prog_isaspec_decode, '@INPUT@', '@OUTPUT@' 39 ], 40 depend_files: isa_depend_files, 41) 42 43decode_files = [ 44 ir3_isa, 45 'isa.h', 46] 47 48libir3decode = static_library( 49 'ir3decode', 50 decode_files, 51 dependencies: [idep_mesautil, idep_isaspec_decode], 52 include_directories: [ 53 inc_include, 54 inc_src, 55 # Hack for src/util/half_float.h indirect dependency on 56 # gallium headers: 57 inc_gallium, 58 ], 59 gnu_symbol_visibility: 'hidden', 60) 61 62ir3disasm = executable( 63 'ir3-disasm', 64 ['ir3-disasm.c'], 65 link_with: libir3decode, 66 build_by_default: with_tools.contains('freedreno'), 67 include_directories: [ 68 inc_src, 69 ], 70 install: false, 71) 72 73encode_h = custom_target( 74 'encode.h', 75 input: ['ir3.xml'], 76 output: 'encode.h', 77 command: [ 78 prog_isaspec_encode, '@INPUT@', '@OUTPUT@' 79 ], 80 depend_files: isa_depend_files, 81) 82 83encode_files = [ 84 encode_h, 85 'encode.c', 86 'isa.h', 87] 88 89libir3encode = static_library( 90 'ir3encode', 91 encode_files, 92 dependencies: [idep_mesautil, idep_nir], 93 include_directories: [ 94 inc_src, 95 inc_include, 96 inc_freedreno, 97 inc_gallium, 98 ], 99 gnu_symbol_visibility: 'hidden', 100) 101