util: rb-tree: A simple, invasive, red-black tree
[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 'os_time.c',
50 'os_time.h',
51 'process.c',
52 'process.h',
53 'sha1/sha1.c',
54 'sha1/sha1.h',
55 'ralloc.c',
56 'ralloc.h',
57 'rand_xor.c',
58 'rand_xor.h',
59 'rb_tree.c',
60 'rb_tree.h',
61 'register_allocate.c',
62 'register_allocate.h',
63 'rgtc.c',
64 'rgtc.h',
65 'rounding.h',
66 'set.c',
67 'set.h',
68 'simple_list.h',
69 'simple_mtx.h',
70 'slab.c',
71 'slab.h',
72 'string_buffer.c',
73 'string_buffer.h',
74 'strndup.h',
75 'strtod.c',
76 'strtod.h',
77 'texcompress_rgtc_tmp.h',
78 'u_atomic.c',
79 'u_atomic.h',
80 'u_dynarray.h',
81 'u_endian.h',
82 'u_queue.c',
83 'u_queue.h',
84 'u_string.h',
85 'u_thread.h',
86 'u_vector.c',
87 'u_vector.h',
88 'vma.c',
89 'vma.h',
90 )
91
92 install_data('drirc', install_dir : get_option('sysconfdir'))
93
94 files_xmlconfig = files(
95 'xmlconfig.c',
96 'xmlconfig.h',
97 )
98
99 format_srgb = custom_target(
100 'format_srgb',
101 input : ['format_srgb.py'],
102 output : 'format_srgb.c',
103 command : [prog_python2, '@INPUT0@'],
104 capture : true,
105 )
106
107 libmesa_util = static_library(
108 'mesa_util',
109 [files_mesa_util, format_srgb],
110 include_directories : inc_common,
111 dependencies : [dep_zlib, dep_clock, dep_thread, dep_atomic],
112 c_args : [c_msvc_compat_args, c_vis_args],
113 build_by_default : false
114 )
115
116 libxmlconfig = static_library(
117 'xmlconfig',
118 files_xmlconfig,
119 include_directories : inc_common,
120 dependencies : [dep_expat, dep_m],
121 c_args : [
122 c_msvc_compat_args, c_vis_args,
123 '-DSYSCONFDIR="@0@"'.format(
124 join_paths(get_option('prefix'), get_option('sysconfdir'))
125 ),
126 ],
127 build_by_default : false,
128 )
129
130 if with_tests
131 test(
132 'u_atomic',
133 executable(
134 'u_atomic_test',
135 files('u_atomic_test.c'),
136 include_directories : inc_common,
137 link_with : libmesa_util,
138 c_args : [c_msvc_compat_args],
139 )
140 )
141
142 test(
143 'roundeven',
144 executable(
145 'roundeven_test',
146 files('roundeven_test.c'),
147 include_directories : inc_common,
148 c_args : [c_msvc_compat_args],
149 dependencies : [dep_m],
150 )
151 )
152
153 test(
154 'mesa-sha1',
155 executable(
156 'mesa-sha1_test',
157 files('mesa-sha1_test.c'),
158 include_directories : inc_common,
159 link_with : libmesa_util,
160 c_args : [c_msvc_compat_args],
161 )
162 )
163
164 subdir('tests/hash_table')
165 subdir('tests/string_buffer')
166 subdir('tests/vma')
167 endif