-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
80 lines (70 loc) · 1.88 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
project('ksim', 'c')
c = meson.get_compiler('c')
opcodes = c.find_library('opcodes')
libpng16 = dependency('libpng16')
threads = dependency('threads')
# This is the portable way of using mathlib, it does
# not exist on all platforms.
mathlib = c.find_library('m', required : false)
conf = configuration_data()
conf.set('prefix', get_option('prefix'))
conf.set('exec_prefix', '${prefix}')
conf.set('libdir', '${exec_prefix}/' + get_option('libdir'))
configure_file(input : 'ksim.in',
output : 'ksim',
install_dir : get_option('bindir'),
configuration : conf)
disasm_files = files(
'external/brw_context.h',
'external/brw_defines.h',
'external/brw_disasm.c',
'external/brw_eu_compact.c',
'external/brw_eu.h',
'external/brw_eu.c',
'external/brw_inst.h',
'external/brw_packed_float.c',
'external/brw_reg.h',
'external/gen_device_info.h')
ksim_files = files(
'avx-builder.c',
'avx-builder.h',
'command-streamer.c',
'compute.c',
'eu.h',
'eu.c',
'kir.h',
'kir.c',
'formats.c',
'gen9_pack.h',
'ksim.h',
'pipe.c',
'render-cache.c',
'sampler.c',
'dataport.c',
'gem.c',
'surface.c',
'tessellation.c',
'geometry.c',
'thread.c',
'urb.c',
'wm.c',
'blitter.c')
shared_library('ksim-stub',
ksim_files, disasm_files,
c_args : [ '-fvisibility=hidden', '-march=core-avx2', '-D_GNU_SOURCE',
'-DKSIM_BUILD_' + get_option('buildtype').to_upper() ],
dependencies : [ libpng16, opcodes, threads, mathlib ],
link_args : [ '-ldl' ],
name_prefix : '',
install : true)
executable('cs-runner',
files('test/cs-runner.c'),
c_args : [ '-fvisibility=hidden', '-march=native', '-mrtm' ],
dependencies : [ mathlib ],
install : false)
avxbuilder_test = executable('test-avx-builder',
files('avx-builder.c'),
c_args : [ '-march=native', '-mrtm', '-DTEST_AVX_BUILDER' ],
dependencies : [ opcodes ],
install : false)
test('avx-builder', avxbuilder_test)