util: move futex helpers into futex.h
[mesa.git] / src / util / 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 inc_util = include_directories('.')
22
23 subdir('xmlpool')
24
25 files_mesa_util = files(
26 'bitscan.c',
27 'bitscan.h',
28 'bitset.h',
29 'build_id.c',
30 'build_id.h',
31 'crc32.c',
32 'crc32.h',
33 'debug.c',
34 'debug.h',
35 'disk_cache.c',
36 'disk_cache.h',
37 'format_r11g11b10f.h',
38 'format_rgb9e5.h',
39 'format_srgb.h',
40 'futex.h',
41 'half_float.c',
42 'half_float.h',
43 'hash_table.c',
44 'hash_table.h',
45 'list.h',
46 'macros.h',
47 'mesa-sha1.c',
48 'mesa-sha1.h',
49 'sha1/sha1.c',
50 'sha1/sha1.h',
51 'ralloc.c',
52 'ralloc.h',
53 'rand_xor.c',
54 'rand_xor.h',
55 'register_allocate.c',
56 'register_allocate.h',
57 'rgtc.c',
58 'rgtc.h',
59 'rounding.h',
60 'set.c',
61 'set.h',
62 'simple_list.h',
63 'simple_mtx.h',
64 'slab.c',
65 'slab.h',
66 'string_buffer.c',
67 'string_buffer.h',
68 'strndup.h',
69 'strtod.c',
70 'strtod.h',
71 'texcompress_rgtc_tmp.h',
72 'u_atomic.c',
73 'u_atomic.h',
74 'u_dynarray.h',
75 'u_endian.h',
76 'u_queue.c',
77 'u_queue.h',
78 'u_string.h',
79 'u_thread.h',
80 'u_vector.c',
81 'u_vector.h',
82 )
83
84 install_data('drirc', install_dir : get_option('sysconfdir'))
85
86 files_xmlconfig = files(
87 'xmlconfig.c',
88 'xmlconfig.h',
89 )
90
91 format_srgb = custom_target(
92 'format_srgb',
93 input : ['format_srgb.py'],
94 output : 'format_srgb.c',
95 command : [prog_python2, '@INPUT0@'],
96 capture : true,
97 )
98
99 libmesa_util = static_library(
100 'mesa_util',
101 [files_mesa_util, format_srgb],
102 include_directories : inc_common,
103 dependencies : [dep_zlib, dep_clock],
104 c_args : [c_msvc_compat_args, c_vis_args],
105 build_by_default : false
106 )
107
108 libxmlconfig = static_library(
109 'xmlconfig',
110 files_xmlconfig,
111 include_directories : inc_common,
112 dependencies : [dep_expat, dep_m],
113 c_args : [c_msvc_compat_args, c_vis_args,
114 '-DSYSCONFDIR="@0@"'.format(get_option('sysconfdir'))],
115 build_by_default : false,
116 )
117
118 if with_tests
119 u_atomic_test = executable(
120 'u_atomic_test',
121 files('u_atomic_test.c'),
122 include_directories : inc_common,
123 link_with : libmesa_util,
124 c_args : [c_msvc_compat_args],
125 )
126
127 roundeven_test = executable(
128 'roundeven_test',
129 files('roundeven_test.c'),
130 include_directories : inc_common,
131 c_args : [c_msvc_compat_args],
132 dependencies : [dep_m],
133 )
134
135 test('u_atomic', u_atomic_test)
136 test('roundeven', roundeven_test)
137
138 subdir('tests/hash_table')
139 subdir('tests/string_buffer')
140 endif