• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
21gen_xml_files = [
22  'gen4.xml',
23  'gen45.xml',
24  'gen5.xml',
25  'gen6.xml',
26  'gen7.xml',
27  'gen75.xml',
28  'gen8.xml',
29  'gen9.xml',
30  'gen11.xml',
31  'gen12.xml',
32]
33
34genX_xml_h = custom_target(
35  'genX_xml.h',
36  input : ['gen_zipped_file.py', gen_xml_files],
37  output : 'genX_xml.h',
38  command : [prog_python, '@INPUT@'],
39  capture : true,
40)
41
42genX_bits_h = custom_target(
43  'genX_bits.h',
44  input : ['gen_bits_header.py', gen_xml_files],
45  output : 'genX_bits.h',
46  command : [prog_python, '@INPUT@', '-o', '@OUTPUT@'],
47)
48
49gen_xml_pack = []
50foreach f : gen_xml_files
51  _name = '@0@_pack.h'.format(f.split('.')[0])
52  gen_xml_pack += custom_target(
53    _name,
54    input : ['gen_pack_header.py', f],
55    output : _name,
56    command : [prog_python, '@INPUT@'],
57    capture : true,
58  )
59endforeach
60
61gen_pack_header_py = files('gen_pack_header.py')
62
63idep_genxml = declare_dependency(sources : [gen_xml_pack, genX_bits_h, genX_xml_h])
64