i965/tools: 32bit compilation with meson
[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 libaub = static_library(
22 'aub',
23 files('aub_read.c', 'aub_mem.c'),
24 include_directories : [inc_common, inc_intel],
25 link_with : [libintel_common, libintel_dev, libmesa_util],
26 c_args : [c_vis_args, no_override_init_args],
27 install : false
28 )
29
30 aubinator = executable(
31 'aubinator',
32 files('aubinator.c'),
33 dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
34 include_directories : [inc_common, inc_intel],
35 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
36 c_args : [c_vis_args, no_override_init_args],
37 build_by_default : true,
38 install : true
39 )
40
41 aubinator_error_decode = executable(
42 'aubinator_error_decode',
43 files('aubinator_error_decode.c'),
44 dependencies : [dep_zlib, dep_thread],
45 include_directories : [inc_common, inc_intel],
46 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
47 c_args : [c_vis_args, no_override_init_args],
48 build_by_default : true,
49 install : true
50 )
51
52 i965_disasm = executable(
53 'i965_disasm',
54 files('i965_disasm.c'),
55 dependencies : [dep_thread],
56 include_directories : [inc_common, inc_intel],
57 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
58 c_args : [c_vis_args, no_override_init_args],
59 build_by_default : true,
60 install : true
61 )
62
63 error2aub = executable(
64 'intel_error2aub',
65 files('aub_write.h', 'aub_write.c', 'error2aub.c'),
66 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
67 include_directories : [inc_common, inc_intel, inc_drm_uapi],
68 link_with : [libintel_dev],
69 c_args : [c_vis_args, no_override_init_args],
70 build_by_default : true,
71 install : true
72 )
73
74 sanitize_data = configuration_data()
75 sanitize_data.set(
76 'install_libexecdir',
77 join_paths(get_option('prefix'), get_option('libexecdir'))
78 )
79 configure_file(
80 input: 'intel_sanitize_gpu.in',
81 output: '@BASENAME@',
82 install_dir: get_option('bindir'),
83 install: true,
84 configuration: sanitize_data
85 )
86
87 libintel_sanitize_gpu = shared_library(
88 'intel_sanitize_gpu',
89 files('intel_sanitize_gpu.c'),
90 dependencies : [dep_dl, dep_thread],
91 include_directories : [inc_common, inc_intel, inc_drm_uapi],
92 link_with : [libintel_common, libmesa_util],
93 c_args : [c_vis_args, no_override_init_args, c_sse2_args],
94 build_by_default : true,
95 install_dir: get_option('libexecdir'),
96 install: true
97 )
98
99 configure_file(
100 input : 'intel_dump_gpu.in',
101 output : '@BASENAME@',
102 install_dir: get_option('bindir'),
103 configuration: sanitize_data,
104 install: true
105 )
106
107 libintel_dump_gpu = shared_library(
108 'intel_dump_gpu',
109 files('gen_context.h', 'gen8_context.h', 'gen10_context.h',
110 'intel_aub.h', 'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c'),
111 dependencies : dep_dl,
112 include_directories : [inc_common, inc_intel, inc_drm_uapi],
113 link_with : libintel_dev,
114 c_args : [c_vis_args, no_override_init_args],
115 build_by_default : true,
116 install_dir: get_option('libexecdir'),
117 install: true
118 )
119
120 if with_tools.contains('intel-ui')
121 subdir('imgui')
122
123 aubinator_viewer = executable(
124 'aubinator_viewer',
125 files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
126 dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep],
127 include_directories : [inc_common, inc_intel],
128 link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
129 c_args : [c_vis_args, no_override_init_args],
130 cpp_args : [ '-fpermissive', '-std=c++11', '-Wno-parentheses', '-Wno-class-memaccess' ],
131 build_by_default : true,
132 install : true
133 )
134 endif