meson: inline `inc_common`
[mesa.git] / src / freedreno / computerator / meson.build
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
21 ir3_parser = custom_target(
22 'ir3_parser.[ch]',
23 input: 'ir3_parser.y',
24 output: ['ir3_parser.c', 'ir3_parser.h'],
25 command: [
26 prog_bison, '@INPUT@', '--name-prefix=ir3_yy', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'
27 ]
28 )
29
30 ir3_lexer = custom_target(
31 'ir3_lexer.c',
32 input: 'ir3_lexer.l',
33 output: 'ir3_lexer.c',
34 command: [
35 prog_flex, '-o', '@OUTPUT@', '@INPUT@'
36 ]
37 )
38
39 computerator_files = [
40 'a6xx.c',
41 'ir3_asm.c',
42 'main.c',
43 freedreno_xml_header_files,
44 ir3_parser[0],
45 ir3_parser[1],
46 ir3_lexer
47 ]
48
49 computerator = executable(
50 'computerator',
51 computerator_files,
52 include_directories : [
53 inc_freedreno,
54 inc_include,
55 inc_src,
56 inc_mapi,
57 inc_mesa,
58 inc_gallium,
59 inc_gallium_aux,
60 ],
61 link_with : [
62 libfreedreno_drm,
63 libfreedreno_ir3,
64 libfreedreno_perfcntrs,
65 ],
66 dependencies : [
67 dep_libdrm,
68 idep_mesautil,
69 # We don't actually use nir, but ir3 wants some nir headers:
70 idep_nir,
71 ],
72 build_by_default : with_tools.contains('freedreno'),
73 install : with_tools.contains('freedreno'),
74 )