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
21b8e80941Smrgsid_tables_h = custom_target(
22b8e80941Smrg  'sid_tables_h',
23b8e80941Smrg  input : ['sid_tables.py', 'sid.h', 'gfx9d.h'],
24b8e80941Smrg  output : 'sid_tables.h',
25b8e80941Smrg  command : [prog_python, '@INPUT@'],
26b8e80941Smrg  capture : true,
27b8e80941Smrg)
28b8e80941Smrg
29b8e80941Smrgamd_common_files = files(
30b8e80941Smrg  'ac_binary.c',
31b8e80941Smrg  'ac_binary.h',
32b8e80941Smrg  'ac_exp_param.h',
33b8e80941Smrg  'ac_llvm_build.c',
34b8e80941Smrg  'ac_llvm_build.h',
35b8e80941Smrg  'ac_llvm_helper.cpp',
36b8e80941Smrg  'ac_llvm_util.c',
37b8e80941Smrg  'ac_llvm_util.h',
38b8e80941Smrg  'ac_shader_abi.h',
39b8e80941Smrg  'ac_shader_util.c',
40b8e80941Smrg  'ac_shader_util.h',
41b8e80941Smrg  'ac_nir_to_llvm.c',
42b8e80941Smrg  'ac_nir_to_llvm.h',
43b8e80941Smrg  'ac_gpu_info.c',
44b8e80941Smrg  'ac_gpu_info.h',
45b8e80941Smrg  'ac_surface.c',
46b8e80941Smrg  'ac_surface.h',
47b8e80941Smrg  'ac_debug.c',
48b8e80941Smrg  'ac_debug.h',
49b8e80941Smrg)
50b8e80941Smrg
51b8e80941Smrglibamd_common = static_library(
52b8e80941Smrg  'amd_common',
53b8e80941Smrg  [amd_common_files, sid_tables_h],
54b8e80941Smrg  include_directories : [
55b8e80941Smrg    inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd,
56b8e80941Smrg  ],
57b8e80941Smrg  dependencies : [
58b8e80941Smrg    dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
59b8e80941Smrg    idep_nir_headers,
60b8e80941Smrg  ],
61b8e80941Smrg  c_args : [c_vis_args],
62b8e80941Smrg  cpp_args : [cpp_vis_args],
63b8e80941Smrg)
64