98da7d3fc61e722ca425e985f61a07e906054095
[mesa.git] / src / gallium / drivers / swr / rasterizer / codegen / meson.build
1 # Copyright © 2017-2018 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
21 gen_knobs_cpp = custom_target(
22 'gen_knobs.cpp',
23 input : ['gen_knobs.py'],
24 output : 'gen_knobs.cpp',
25 command : [prog_python, '@INPUT0@', '--output', '@OUTPUT@', '--gen_cpp'],
26 depend_files : files(
27 'knob_defs.py', 'gen_common.py',
28 'templates/gen_knobs.cpp',
29 ),
30 )
31
32 gen_knobs_h = custom_target(
33 'gen_knobs.h',
34 input : ['gen_knobs.py'],
35 output : 'gen_knobs.h',
36 command : [prog_python, '@INPUT0@', '--output', '@OUTPUT@', '--gen_h'],
37 depend_files : files(
38 'knob_defs.py', 'gen_common.py',
39 'templates/gen_knobs.h',
40 ),
41 )
42
43
44 # The generators above this are needed individually, while the below generators
45 # are all inputs to the same lib, so they don't need unique names.
46 files_swr_common += [
47 gen_builder_hpp, gen_builder_meta_hpp, gen_knobs_h, gen_knobs_cpp
48 ]
49
50 foreach x : [[swr_context_files, 'gen_swr_context_llvm.h'],
51 [swr_state_files, 'gen_state_llvm.h']]
52 files_swr_common += custom_target(
53 x[1],
54 input : ['gen_llvm_types.py', x[0]],
55 output : x[1],
56 command : [prog_python, '@INPUT0@', '--input', '@INPUT1@', '--output', '@OUTPUT@'],
57 depend_files : files(
58 'templates/gen_llvm.hpp',
59 'gen_common.py',
60 ),
61 )
62 endforeach
63
64 ar_output_filenames = ['gen_ar_event.hpp', 'gen_ar_event.cpp', 'gen_ar_eventhandler.hpp', 'gen_ar_eventhandlerfile.hpp']
65 ar_template_filenames = []
66 foreach fname : ar_output_filenames
67 ar_template_filenames += join_paths('templates', fname)
68 endforeach
69
70 files_swr_common += custom_target(
71 'gen_archrast',
72 input : ['gen_archrast.py', swr_event_proto_files, swr_event_pproto_files],
73 output : ar_output_filenames,
74 command : [prog_python, '@INPUT0@', '--proto', '@INPUT1@', '@INPUT2@', '--output-dir', meson.current_build_dir()],
75 depend_files : files('gen_common.py', ar_template_filenames)
76 )