intel: don't build tools without -Dtools=intel
[mesa.git] / src / intel / tools / meson.build
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
21 aubinator = executable(
22 'aubinator',
23 files('aubinator.c', 'intel_aub.h'),
24 dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
25 include_directories : [inc_common, inc_intel],
26 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
27 c_args : [c_vis_args, no_override_init_args],
28 build_by_default : true,
29 install : true
30 )
31
32 aubinator_error_decode = executable(
33 'aubinator_error_decode',
34 files('aubinator_error_decode.c'),
35 dependencies : [dep_zlib, dep_thread],
36 include_directories : [inc_common, inc_intel],
37 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
38 c_args : [c_vis_args, no_override_init_args],
39 build_by_default : true,
40 install : true
41 )
42
43 error2aub = executable(
44 'intel_error2aub',
45 files('aub_write.h', 'aub_write.c', 'error2aub.c'),
46 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
47 include_directories : [inc_common, inc_intel, inc_drm_uapi],
48 link_with : [libintel_dev],
49 c_args : [c_vis_args, no_override_init_args],
50 build_by_default : true,
51 install : true
52 )
53
54 sanitize_data = configuration_data()
55 sanitize_data.set(
56 'install_libexecdir',
57 join_paths(get_option('prefix'), get_option('libexecdir'))
58 )
59 configure_file(
60 input: 'intel_sanitize_gpu.in',
61 output: '@BASENAME@',
62 install_dir: get_option('bindir'),
63 install: true,
64 configuration: sanitize_data
65 )
66
67 libintel_sanitize_gpu = shared_library(
68 'intel_sanitize_gpu',
69 files('intel_sanitize_gpu.c'),
70 dependencies : [dep_dl, dep_thread],
71 include_directories : [inc_common, inc_intel, inc_drm_uapi],
72 link_with : [libintel_common, libmesa_util],
73 c_args : [c_vis_args, no_override_init_args],
74 build_by_default : true,
75 install_dir: get_option('libexecdir'),
76 install: true
77 )
78
79 configure_file(
80 input : 'intel_dump_gpu.in',
81 output : '@BASENAME@',
82 install_dir: get_option('bindir'),
83 configuration: sanitize_data,
84 install: true
85 )
86
87 libintel_dump_gpu = shared_library(
88 'intel_dump_gpu',
89 files('gen_context.h', 'gen8_context.h', 'gen10_context.h',
90 'intel_aub.h', 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c'),
91 dependencies : dep_dl,
92 include_directories : [inc_common, inc_intel, inc_drm_uapi],
93 link_with : libintel_dev,
94 c_args : [c_vis_args, no_override_init_args],
95 build_by_default : true,
96 install_dir: get_option('libexecdir'),
97 install: true
98 )