1b8e80941Smrg# Copyright © 2017 Intel Corporation
2b8e80941Smrg
3b8e80941Smrg# Permission is hereby granted, free of charge, to any person obtaining a copy
4b8e80941Smrg# of this software and associated documentation files (the "Software"), to deal
5b8e80941Smrg# in the Software without restriction, including without limitation the rights
6b8e80941Smrg# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7b8e80941Smrg# copies of the Software, and to permit persons to whom the Software is
8b8e80941Smrg# furnished to do so, subject to the following conditions:
9b8e80941Smrg
10b8e80941Smrg# The above copyright notice and this permission notice shall be included in
11b8e80941Smrg# all copies or substantial portions of the Software.
12b8e80941Smrg
13b8e80941Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14b8e80941Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15b8e80941Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16b8e80941Smrg# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17b8e80941Smrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18b8e80941Smrg# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19b8e80941Smrg# SOFTWARE.
20b8e80941Smrg
21b8e80941Smrglibaub = static_library(
22b8e80941Smrg  'aub',
23b8e80941Smrg  files('aub_read.c', 'aub_mem.c'),
24b8e80941Smrg  include_directories : [inc_common, inc_intel],
25b8e80941Smrg  link_with : [libintel_common, libintel_dev, libmesa_util],
26b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
27b8e80941Smrg  install : false
28b8e80941Smrg)
29b8e80941Smrg
30b8e80941Smrgaubinator = executable(
31b8e80941Smrg  'aubinator',
32b8e80941Smrg  files('aubinator.c'),
33b8e80941Smrg  dependencies : [dep_expat, dep_zlib, dep_dl, dep_thread, dep_m],
34b8e80941Smrg  include_directories : [inc_common, inc_intel],
35b8e80941Smrg  link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
36b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
37b8e80941Smrg  install : true
38b8e80941Smrg)
39b8e80941Smrg
40b8e80941Smrgaubinator_error_decode = executable(
41b8e80941Smrg  'aubinator_error_decode',
42b8e80941Smrg  files('aubinator_error_decode.c'),
43b8e80941Smrg  dependencies : [dep_zlib, dep_thread],
44b8e80941Smrg  include_directories : [inc_common, inc_intel],
45b8e80941Smrg  link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
46b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
47b8e80941Smrg  install : true
48b8e80941Smrg)
49b8e80941Smrg
50b8e80941Smrgi965_disasm = executable(
51b8e80941Smrg  'i965_disasm',
52b8e80941Smrg  files('i965_disasm.c'),
53b8e80941Smrg  dependencies : [dep_thread],
54b8e80941Smrg  include_directories : [inc_common, inc_intel],
55b8e80941Smrg  link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util],
56b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
57b8e80941Smrg  install : true
58b8e80941Smrg)
59b8e80941Smrg
60b8e80941Smrgerror2aub = executable(
61b8e80941Smrg  'intel_error2aub',
62b8e80941Smrg  files('aub_write.h', 'aub_write.c', 'error2aub.c'),
63b8e80941Smrg  dependencies : [dep_zlib, dep_dl, dep_thread, dep_m],
64b8e80941Smrg  include_directories : [inc_common, inc_intel, inc_include],
65b8e80941Smrg  link_with : [libintel_dev],
66b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
67b8e80941Smrg  install : true
68b8e80941Smrg)
69b8e80941Smrg
70b8e80941Smrgsanitize_data = configuration_data()
71b8e80941Smrgsanitize_data.set(
72b8e80941Smrg  'install_libexecdir',
73b8e80941Smrg  join_paths(get_option('prefix'), get_option('libexecdir'))
74b8e80941Smrg)
75b8e80941Smrgconfigure_file(
76b8e80941Smrg  input : 'intel_sanitize_gpu.in',
77b8e80941Smrg  output : '@BASENAME@',
78b8e80941Smrg  install_dir : get_option('bindir'),
79b8e80941Smrg  install : true,
80b8e80941Smrg  configuration : sanitize_data
81b8e80941Smrg)
82b8e80941Smrg
83b8e80941Smrglibintel_sanitize_gpu = shared_library(
84b8e80941Smrg  'intel_sanitize_gpu',
85b8e80941Smrg  files('intel_sanitize_gpu.c'),
86b8e80941Smrg  dependencies : [dep_dl, dep_thread],
87b8e80941Smrg  include_directories : [inc_common, inc_intel, inc_include],
88b8e80941Smrg  link_with : [libintel_common, libmesa_util],
89b8e80941Smrg  c_args : [c_vis_args, no_override_init_args, c_sse2_args],
90b8e80941Smrg  install_dir : get_option('libexecdir'),
91b8e80941Smrg  install : true
92b8e80941Smrg)
93b8e80941Smrg
94b8e80941Smrgconfigure_file(
95b8e80941Smrg  input : 'intel_dump_gpu.in',
96b8e80941Smrg  output : '@BASENAME@',
97b8e80941Smrg  install_dir : get_option('bindir'),
98b8e80941Smrg  configuration : sanitize_data,
99b8e80941Smrg  install : true
100b8e80941Smrg)
101b8e80941Smrg
102b8e80941Smrglibintel_dump_gpu = shared_library(
103b8e80941Smrg  'intel_dump_gpu',
104b8e80941Smrg  files(
105b8e80941Smrg    'gen_context.h', 'gen8_context.h', 'gen10_context.h', 'intel_aub.h',
106b8e80941Smrg    'aub_write.h', 'aub_write.c', 'intel_dump_gpu.c',
107b8e80941Smrg  ),
108b8e80941Smrg  dependencies : dep_dl,
109b8e80941Smrg  include_directories : [inc_common, inc_intel, inc_include],
110b8e80941Smrg  link_with : libintel_dev,
111b8e80941Smrg  c_args : [c_vis_args, no_override_init_args],
112b8e80941Smrg  install_dir : get_option('libexecdir'),
113b8e80941Smrg  install : true
114b8e80941Smrg)
115b8e80941Smrg
116b8e80941Smrgif with_tools.contains('intel-ui')
117b8e80941Smrg  subdir('imgui')
118b8e80941Smrg
119b8e80941Smrg  aubinator_viewer = executable(
120b8e80941Smrg    'aubinator_viewer',
121b8e80941Smrg    files('aubinator_viewer.cpp', 'aubinator_viewer_decoder.cpp'),
122b8e80941Smrg    dependencies : [dep_zlib, dep_dl, dep_thread, dep_m, libintel_imgui_gtk_dep],
123b8e80941Smrg    include_directories : [inc_common, inc_intel],
124b8e80941Smrg    link_with : [libintel_common, libintel_compiler, libintel_dev, libmesa_util, libaub],
125b8e80941Smrg    c_args : [c_vis_args, no_override_init_args],
126b8e80941Smrg    cpp_args : ['-fpermissive', '-Wno-parentheses', '-Wno-class-memaccess'],
127b8e80941Smrg    install : true
128b8e80941Smrg  )
129b8e80941Smrgendif
130