3 # Please add any new SAMBA_SUBSYSTEM/SAMBA_LIBRARY to the bottom of the file
4 # unless they are also required to build standalone ctdb.
6 bld
.SAMBA_LIBRARY('time-basic',
12 bld
.SAMBA_SUBSYSTEM('tini',
14 provide_builtin_linking
=True,
17 bld
.SAMBA_SUBSYSTEM('tiniparser',
18 source
='tiniparser.c',
20 provide_builtin_linking
=True,
23 bld
.SAMBA_SUBSYSTEM('strv',
28 bld
.SAMBA_SUBSYSTEM('close-low-fd',
29 source
='close_low_fd.c',
33 bld
.SAMBA_LIBRARY('sys_rw',
34 source
='sys_rw.c sys_rw_data.c',
35 deps
='replace iov_buf',
39 samba_debug_add_deps
= ''
40 samba_debug_add_inc
= ''
42 if bld
.CONFIG_SET('HAVE_GPFS'):
43 bld
.SAMBA_SUBSYSTEM('gpfswrap',
47 includes
=bld
.CONFIG_GET('CPPPATH_GPFS'))
48 samba_debug_add_deps
+= ' gpfswrap'
49 samba_debug_add_inc
+= bld
.CONFIG_GET('CPPPATH_GPFS')
51 bld
.SAMBA_LIBRARY('samba-debug',
53 deps
='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps
,
54 public_deps
='systemd systemd-journal lttng-ust',
56 includes
='lib/util/debug-classes ' + samba_debug_add_inc
,
59 bld
.SAMBA_LIBRARY('socket-blocking',
64 bld
.SAMBA_LIBRARY('talloc_report',
65 source
='talloc_report.c',
71 bld
.SAMBA_LIBRARY('talloc_report_printf',
72 source
='talloc_report_printf.c',
78 bld
.SAMBA_SUBSYSTEM('smb-panic',
91 bld
.SAMBA_SUBSYSTEM('samba-util-core',
123 public_deps
='systemd systemd-daemon sys_rw',
126 bld
.SAMBA_SUBSYSTEM('smb_strtox',
127 source
='smb_strtox.c',
128 provide_builtin_linking
=True,
132 bld
.SAMBA_LIBRARY('iov_buf',
136 private_library
=True)
138 bld
.SAMBA_LIBRARY('msghdr',
140 deps
='replace iov_buf',
142 private_library
=True)
144 bld
.SAMBA_LIBRARY('genrand',
146 deps
='replace gnutls smb-panic',
148 private_library
=True)
150 bld
.SAMBA_LIBRARY('stable_sort',
151 source
='stable_sort.c',
153 public_deps
='talloc',
155 private_library
=True)
157 if bld
.env
.SAMBA_UTIL_CORE_ONLY
:
159 bld
.SAMBA_LIBRARY('tevent-util',
160 source
='tevent_unix.c',
163 private_library
=True)
167 bld
.env
.public_headers_skip
.append('charset_compat.h')
169 bld
.SAMBA_BINARY('genrandperf',
170 source
='tests/genrandperf.c',
171 deps
='genrand replace',
175 # TODO: Rewrite ms_fnmatch_core() for a better API.
177 if bld
.CONFIG_SET('HAVE_WNO_ERROR_ARRAY_BOUNDS'):
178 ms_fnmatch_cflags
='-Wno-error=array-bounds'
179 bld
.SAMBA_SUBSYSTEM('SAMBA_UTIL_MS_FNMATCH',
180 source
='ms_fnmatch.c',
182 cflags
=ms_fnmatch_cflags
,
185 bld
.SAMBA_LIBRARY('samba-util',
220 SAMBA_UTIL_MS_FNMATCH
222 public_deps
='talloc tevent execinfo pthread LIBCRYPTO charset util_setid',
238 header_path
= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
241 pc_files
='samba-util.pc'
244 bld
.SAMBA_LIBRARY('samba-modules',
246 deps
='samba-errors samba-util',
248 private_library
=True)
250 bld
.SAMBA_LIBRARY('asn1util',
252 deps
='talloc samba-util',
253 private_library
=True,
257 bld
.SAMBA_SUBSYSTEM('UNIX_PRIVS',
258 source
='unix_privs.c',
259 autoproto
='unix_privs.h',
260 deps
='replace talloc',
265 bld
.SAMBA_LIBRARY('util_tdb',
268 public_deps
='tdb talloc',
272 bld
.SAMBA_LIBRARY('tevent-util',
280 public_deps
='tevent samba-errors',
281 public_headers
='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
282 header_path
=[ ('*', 'util') ],
287 bld
.SAMBA_LIBRARY('util_setid',
293 bld
.SAMBA_SUBSYSTEM('util_ldb',
297 public_headers
='util_ldb.h'
301 bld
.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
302 source
='util_runcmd.c',
307 bld
.SAMBA_SUBSYSTEM('UTIL_PW',
313 bld
.SAMBA_LIBRARY('server_id_db',
314 source
='server_id_db.c',
315 deps
='talloc tdb strv util_tdb tdb-wrap samba-util',
317 private_library
=True)
319 bld
.SAMBA_SUBSYSTEM('access',
321 deps
='interfaces samba-util',
324 bld
.SAMBA_SUBSYSTEM('util_str_escape',
325 source
='util_str_escape.c',
329 bld
.SAMBA_SUBSYSTEM('util_str_hex',
330 source
='util_str_hex.c',
334 bld
.SAMBA_BINARY('test_rfc1738',
335 source
='tests/rfc1738.c',
336 deps
='cmocka replace samba-util',
340 bld
.SAMBA_BINARY('test_ms_fnmatch',
341 source
='tests/test_ms_fnmatch.c',
342 deps
='cmocka replace samba-util',
346 bld
.SAMBA_BINARY('test_talloc_keep_secret',
347 source
='tests/test_talloc_keep_secret.c',
348 deps
='cmocka replace samba-util',
352 bld
.SAMBA_BINARY('test_byteorder',
353 source
='tests/test_byteorder.c',
354 deps
='cmocka replace samba-util',
358 bld
.SAMBA_BINARY('test_bytearray',
359 source
='tests/test_bytearray.c',
360 deps
='cmocka replace samba-util',
364 bld
.SAMBA_BINARY('test_byteorder_verify',
365 source
='tests/test_byteorder_verify.c',
366 deps
='cmocka replace samba-util',
370 bld
.SAMBA_BINARY('test_util_paths',
371 source
='tests/test_util_paths.c',
372 deps
='cmocka replace talloc samba-util',
376 bld
.SAMBA_BINARY('test_util',
377 source
='tests/test_util.c',
378 deps
='cmocka replace talloc samba-util',
382 bld
.SAMBA_BINARY('test_memcache',
383 source
='tests/test_memcache.c',
384 deps
='cmocka replace talloc samba-util',
388 bld
.SAMBA_BINARY('test_sys_rw',
389 source
='tests/test_sys_rw.c',
390 deps
='cmocka replace samba-util',
394 bld
.SAMBA_BINARY('test_s4_logging',
395 source
='tests/test_logging.c',
396 deps
=' '.join(['CMDLINE_S4',
402 bld
.SAMBA_BINARY('test_s3_logging',
403 source
='tests/test_logging.c',
404 deps
=' '.join(['CMDLINE_S3',
407 cflags
="-D USING_CMDLINE_S3",
411 bld
.SAMBA_BINARY('test_stable_sort',
412 source
='tests/test_stable_sort.c',
413 deps
='cmocka replace talloc stable_sort',