• 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
21libaub = static_library(
22  'aub',
23  files('aub_read.c', 'aub_mem.c'),
24  include_directories : [inc_include, inc_src, inc_intel],
25  dependencies : [idep_mesautil, idep_intel_dev, idep_intel_decoder_brw, idep_intel_decoder_elk],
26  link_with : [libintel_common],
27  c_args : [no_override_init_args],
28  gnu_symbol_visibility : 'hidden',
29  install : false
30)
31
32aubinator = executable(
33  'aubinator',
34  files('aubinator.c'),
35  dependencies : [idep_mesautil, dep_expat, dep_zlib, dep_dl, dep_thread, dep_m, idep_intel_dev,
36                  idep_intel_decoder_brw, idep_intel_decoder_elk],
37  include_directories : [inc_include, inc_src, inc_intel],
38  link_with : [libintel_common, libintel_compiler_brw, libintel_compiler_elk, libaub],
39  c_args : [no_override_init_args],
40  gnu_symbol_visibility : 'hidden',
41  install : true
42)
43
44aubinator_error_decode = executable(
45  'aubinator_error_decode',
46  files('aubinator_error_decode.c',
47        'aubinator_error_decode_lib.c',
48        'aubinator_error_decode_lib.h',
49        'aubinator_error_decode_xe.c',
50        'aubinator_error_decode_xe.h'),
51  dependencies : [idep_mesautil, dep_zlib, dep_thread, idep_intel_dev,
52                  idep_intel_decoder_brw, idep_intel_decoder_elk],
53  include_directories : [inc_include, inc_src, inc_intel],
54  link_with : [libintel_common, libintel_compiler_brw, libintel_compiler_elk],
55  c_args : [no_override_init_args],
56  gnu_symbol_visibility : 'hidden',
57  install : true
58)
59
60error2aub = executable(
61  'intel_error2aub',
62  files('aub_write.h', 'aub_write.c', 'error2aub.c'),
63  dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, idep_intel_dev],
64  include_directories : [inc_include, inc_src, inc_intel],
65  c_args : [no_override_init_args],
66  gnu_symbol_visibility : 'hidden',
67  install : true
68)
69
70error2hangdump = executable(
71  'intel_error2hangdump',
72  files('error2hangdump.c'),
73  dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, idep_intel_dev],
74  include_directories : [inc_include, inc_src, inc_intel],
75  c_args : [no_override_init_args],
76  gnu_symbol_visibility : 'hidden',
77  install : true
78)
79
80intel_hang_replay = executable(
81  'intel_hang_replay',
82  files('intel_hang_replay.c'),
83  dependencies : [idep_intel_dev, idep_libintel_common, dep_libdrm, dep_dl, dep_thread, dep_m],
84  include_directories : [inc_include, inc_src, inc_intel],
85  link_with : [libintel_compiler_brw, libintel_compiler_elk],
86  c_args : [no_override_init_args],
87  gnu_symbol_visibility : 'hidden',
88  install : true
89)
90
91sanitize_data = configuration_data()
92sanitize_data.set(
93  'install_libexecdir',
94  join_paths(get_option('prefix'), get_option('libexecdir'))
95)
96sanitize_data.set(
97  'install_libdir',
98  join_paths(get_option('prefix'), get_option('libdir'))
99)
100configure_file(
101  input : 'intel_sanitize_gpu.in',
102  output : '@BASENAME@',
103  install_dir : get_option('bindir'),
104  install : true,
105  configuration : sanitize_data
106)
107
108libintel_sanitize_gpu = shared_library(
109  'intel_sanitize_gpu',
110  files('intel_sanitize_gpu.c'),
111  dependencies : [idep_mesautil, dep_dl, dep_thread, idep_intel_dev],
112  include_directories : [inc_include, inc_src, inc_intel],
113  link_with : libintel_common,
114  c_args : [no_override_init_args, sse2_args],
115  gnu_symbol_visibility : 'hidden',
116  install_dir : get_option('libexecdir'),
117  install : true
118)
119
120configure_file(
121  input : 'intel_dump_gpu.in',
122  output : '@BASENAME@',
123  install_dir : get_option('bindir'),
124  configuration : sanitize_data,
125  install : true
126)
127
128libintel_dump_gpu = shared_library(
129  'intel_dump_gpu',
130  files(
131    'intel_context.h', 'gfx8_context.h', 'gfx10_context.h', 'intel_aub.h',
132    'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c',
133  ),
134  dependencies : [dep_dl, idep_mesautil, idep_intel_dev],
135  include_directories : [inc_include, inc_src, inc_intel],
136  link_with : [libintel_common],
137  c_args : [no_override_init_args],
138  gnu_symbol_visibility : 'hidden',
139  install_dir : get_option('libexecdir'),
140  install : true
141)
142
143if with_tools.contains('drm-shim')
144  configure_file(
145    input : 'intel_stub_gpu.in',
146    output : '@BASENAME@',
147    install_dir : get_option('bindir'),
148    configuration : sanitize_data,
149    install : true
150  )
151
152  libintel_stub_gpu = shared_library(
153    'intel_noop_drm_shim',
154    ['intel_noop_drm_shim.c', intel_dev_serialize_src],
155    include_directories: [inc_include, inc_src, inc_intel],
156    dependencies: [dep_libdrm, dep_drm_shim, idep_mesautil, idep_libintel_common, idep_intel_dev, idep_parson],
157    gnu_symbol_visibility : 'hidden',
158    install : true,
159  )
160endif
161
162if with_tools.contains('intel-ui')
163  subdir('imgui')
164
165  aubinator_viewer = executable(
166    'aubinator_viewer',
167    files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
168    dependencies : [idep_mesautil, dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep, idep_intel_dev],
169    include_directories : [inc_include, inc_src, inc_intel],
170    link_with : [libintel_common, libintel_compiler_brw, libintel_compiler_elk, libaub],
171    c_args : [no_override_init_args],
172    gnu_symbol_visibility : 'hidden',
173    cpp_args : ['-fpermissive', '-Wno-parentheses'],
174    install : true
175  )
176
177  intel_hang_viewer = executable(
178    'intel_hang_viewer',
179    files('intel_hang_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
180    dependencies : [
181      idep_mesautil,
182      dep_zlib,
183      dep_dl,
184      dep_thread,
185      dep_m,
186      libintel_imgui_gtk_dep,
187      idep_intel_dev,
188      idep_libintel_common,
189      idep_intel_decoder_brw,
190      idep_intel_decoder_elk,
191    ],
192    include_directories : [inc_include, inc_src, inc_intel],
193    link_with : [libintel_compiler_brw, libintel_compiler_elk],
194    c_args : [no_override_init_args],
195    gnu_symbol_visibility : 'hidden',
196    cpp_args : ['-fpermissive', '-Wno-parentheses'],
197    install : true
198  )
199endif
200
201if with_intel_tools
202  intel_dev_info = executable(
203    'intel_dev_info',
204    [files('intel_dev_info.c'), [intel_dev_serialize_src]],
205    dependencies : [dep_libdrm, dep_dl, dep_thread, dep_m, idep_intel_dev, idep_parson, idep_nir],
206    link_with : [libintel_compiler_brw],
207    include_directories : [inc_include, inc_src, inc_intel],
208    c_args : [no_override_init_args],
209    gnu_symbol_visibility : 'hidden',
210    install : true
211  )
212endif
213