1*61046927SAndroid Build Coastguard Worker# Copyright © 2019 Google, Inc 2*61046927SAndroid Build Coastguard Worker# SPDX-License-Identifier: MIT 3*61046927SAndroid Build Coastguard Worker 4*61046927SAndroid Build Coastguard Workerxml_files = [ 5*61046927SAndroid Build Coastguard Worker 'adreno.xml', 6*61046927SAndroid Build Coastguard Worker] 7*61046927SAndroid Build Coastguard Worker 8*61046927SAndroid Build Coastguard Workerrules_file = 'rules-fd.xsd' 9*61046927SAndroid Build Coastguard Workercopyright_file = 'freedreno_copyright.xml' 10*61046927SAndroid Build Coastguard Worker 11*61046927SAndroid Build Coastguard Workerinstall_files = xml_files + [rules_file, copyright_file] 12*61046927SAndroid Build Coastguard Worker 13*61046927SAndroid Build Coastguard Workergen_header_py = files('gen_header.py') 14*61046927SAndroid Build Coastguard Workerfreedreno_schema = files(rules_file) 15*61046927SAndroid Build Coastguard Workerfreedreno_copyright = files(copyright_file) 16*61046927SAndroid Build Coastguard Worker 17*61046927SAndroid Build Coastguard Workerfreedreno_xml_header_files = [] 18*61046927SAndroid Build Coastguard Worker 19*61046927SAndroid Build Coastguard Workerforeach f : xml_files 20*61046927SAndroid Build Coastguard Worker _name = f + '.h' 21*61046927SAndroid Build Coastguard Worker freedreno_xml_header_files += custom_target( 22*61046927SAndroid Build Coastguard Worker _name, 23*61046927SAndroid Build Coastguard Worker input: [gen_header_py, f, freedreno_schema, freedreno_copyright], 24*61046927SAndroid Build Coastguard Worker output: _name, 25*61046927SAndroid Build Coastguard Worker command: [prog_python, '@INPUT0@', '--rnn', rnn_src_path, '--xml', '@INPUT1@', 'c-defines'], 26*61046927SAndroid Build Coastguard Worker capture: true, 27*61046927SAndroid Build Coastguard Worker ) 28*61046927SAndroid Build Coastguard Workerendforeach 29*61046927SAndroid Build Coastguard Worker 30*61046927SAndroid Build Coastguard Workerforeach f : install_files 31*61046927SAndroid Build Coastguard Worker _gzname = f + '.gz' 32*61046927SAndroid Build Coastguard Worker custom_target( 33*61046927SAndroid Build Coastguard Worker _gzname, 34*61046927SAndroid Build Coastguard Worker input: f, 35*61046927SAndroid Build Coastguard Worker output: _gzname, 36*61046927SAndroid Build Coastguard Worker command: [prog_gzip, '-kc', '@INPUT@'], 37*61046927SAndroid Build Coastguard Worker capture: true, 38*61046927SAndroid Build Coastguard Worker install_dir: rnn_install_path, 39*61046927SAndroid Build Coastguard Worker install: install_fd_decode_tools, 40*61046927SAndroid Build Coastguard Worker build_by_default: install_fd_decode_tools, 41*61046927SAndroid Build Coastguard Worker ) 42*61046927SAndroid Build Coastguard Workerendforeach 43*61046927SAndroid Build Coastguard Worker 44*61046927SAndroid Build Coastguard Workersubdir('adreno') 45