VERSION: Disable GIT_SNAPSHOT for the 4.12.0rc3 release.
[Samba.git] / lib / util / wscript_build
bloba827eea3ed946d3fa1ad467e948b1ba96ab7b5d9
1 #!/usr/bin/env python
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',
7 source='time_basic.c',
8 deps='replace',
9 private_library=True,
10 local_include=False)
12 bld.SAMBA_SUBSYSTEM('tini',
13 source='tini.c',
14 deps='',
15 local_include=False)
17 bld.SAMBA_SUBSYSTEM('tiniparser',
18 source='tiniparser.c',
19 deps='tini',
20 local_include=False)
22 bld.SAMBA_SUBSYSTEM('strv',
23 source='strv.c',
24 deps='talloc',
25 local_include=False)
27 bld.SAMBA_SUBSYSTEM('close-low-fd',
28 source='close_low_fd.c',
29 deps='replace',
30 local_include=False)
32 bld.SAMBA_LIBRARY('sys_rw',
33 source='sys_rw.c sys_rw_data.c',
34 deps='replace iov_buf',
35 local_include=False,
36 private_library=True)
38 samba_debug_add_deps = ''
39 samba_debug_add_inc = ''
41 if bld.CONFIG_SET('HAVE_GPFS'):
42 bld.SAMBA_SUBSYSTEM('gpfswrap',
43 source='gpfswrap.c',
44 deps='replace',
45 local_include=False,
46 includes=bld.CONFIG_GET('CPPPATH_GPFS'))
47 samba_debug_add_deps += ' gpfswrap'
48 samba_debug_add_inc += bld.CONFIG_GET('CPPPATH_GPFS')
50 bld.SAMBA_LIBRARY('samba-debug',
51 source='debug.c',
52 deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps,
53 public_deps='systemd systemd-journal lttng-ust',
54 local_include=False,
55 includes=samba_debug_add_inc,
56 private_library=True)
58 bld.SAMBA_LIBRARY('socket-blocking',
59 source='blocking.c',
60 local_include=False,
61 private_library=True)
63 bld.SAMBA_LIBRARY('talloc_report',
64 source='talloc_report.c',
65 local_include=False,
66 public_deps='talloc',
67 private_library=True
70 bld.SAMBA_LIBRARY('talloc_report_printf',
71 source='talloc_report_printf.c',
72 local_include=False,
73 public_deps='talloc',
74 private_library=True
77 bld.SAMBA_SUBSYSTEM('samba-util-core',
78 source='''data_blob.c util_file.c sys_popen.c time.c
79 signal.c util.c idtree.c fault.c
80 substitute.c util_process.c util_strlist.c
81 strv_util.c bitmap.c select.c pidfile.c
82 become_daemon.c mkdir_p.c''',
83 deps='''time-basic samba-debug socket-blocking talloc
84 tevent execinfo pthread strv tini''',
85 public_deps='systemd systemd-daemon sys_rw LIBUNWIND',
86 local_include=False)
88 bld.SAMBA_LIBRARY('iov_buf',
89 source='iov_buf.c',
90 deps='talloc',
91 local_include=False,
92 private_library=True)
94 bld.SAMBA_LIBRARY('msghdr',
95 source='msghdr.c',
96 deps='replace iov_buf',
97 local_include=False,
98 private_library=True)
100 if bld.env.SAMBA_UTIL_CORE_ONLY:
102 bld.SAMBA_LIBRARY('tevent-util',
103 source='tevent_unix.c',
104 local_include=False,
105 deps='tevent',
106 private_library=True)
108 else:
110 bld.env.public_headers_skip.append('charset_compat.h')
112 bld.SAMBA_LIBRARY('genrand',
113 source='genrand.c',
114 deps='replace gnutls',
115 local_include=False,
116 private_library=True)
118 bld.SAMBA_BINARY('genrandperf',
119 source='tests/genrandperf.c',
120 deps='genrand replace',
121 local_include=False,
122 install=False)
124 bld.SAMBA_LIBRARY('samba-util',
125 source='''
126 base64.c
127 dprintf.c
128 fsusage.c
129 genrand_util.c
130 getpass.c
131 idtree_random.c
132 memcache.c
133 ms_fnmatch.c
134 params.c
135 rbtree.c
136 rfc1738.c
137 server_id.c
138 smb_threads.c
139 system.c
140 talloc_keep_secret.c
141 talloc_stack.c
142 tevent_debug.c
143 tfork.c
144 tftw.c
145 unix_match.c
146 util_id.c
147 util_net.c
148 util_paths.c
149 util_str.c
150 util_str_common.c
151 util_strlist_v3.c
152 ''',
153 deps='samba-util-core DYNCONFIG close-low-fd tiniparser genrand util_str_hex',
154 public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid',
155 public_headers='''
156 attr.h
157 byteorder.h
158 data_blob.h
159 debug.h
160 discard.h
161 time.h
162 string_wrappers.h
163 idtree.h
164 idtree_random.h
165 blocking.h
166 signal.h
167 substitute.h
168 fault.h
169 genrand.h
170 tfork.h
171 ''',
172 header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
173 local_include=False,
174 vnum='0.0.1',
175 pc_files='samba-util.pc'
178 bld.SAMBA_LIBRARY('samba-modules',
179 source='modules.c',
180 deps='samba-errors samba-util',
181 local_include=False,
182 private_library=True)
184 bld.SAMBA_LIBRARY('asn1util',
185 source='asn1.c',
186 deps='talloc samba-util',
187 private_library=True,
188 local_include=False)
191 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
192 source='unix_privs.c',
193 autoproto='unix_privs.h',
194 deps='replace talloc',
195 local_include=False,
199 bld.SAMBA_LIBRARY('util_tdb',
200 source='util_tdb.c',
201 local_include=False,
202 public_deps='tdb talloc',
203 private_library=True
206 bld.SAMBA_LIBRARY('tevent-util',
207 source='''
208 tevent_unix.c
209 tevent_ntstatus.c
210 tevent_werror.c
211 tevent_req_profile.c
212 ''',
213 local_include=False,
214 public_deps='tevent samba-errors',
215 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
216 header_path=[ ('*', 'util') ],
217 pc_files=[],
218 vnum='0.0.1'
221 bld.SAMBA_LIBRARY('util_setid',
222 source='setid.c',
223 local_include=False,
224 private_library=True
227 bld.SAMBA_SUBSYSTEM('util_ldb',
228 source='util_ldb.c',
229 local_include=False,
230 public_deps='ldb',
231 public_headers='util_ldb.h'
235 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
236 source='util_runcmd.c',
237 local_include=False,
238 public_deps='tevent'
241 bld.SAMBA_SUBSYSTEM('UTIL_PW',
242 source='util_pw.c',
243 local_include=False,
244 public_deps='talloc'
247 bld.SAMBA_LIBRARY('server_id_db',
248 source='server_id_db.c',
249 deps='talloc tdb strv util_tdb tdb-wrap samba-util',
250 local_include=False,
251 private_library=True)
253 bld.SAMBA_SUBSYSTEM('access',
254 source='access.c',
255 deps='interfaces samba-util tirpc nsl',
256 local_include=False)
258 bld.SAMBA_SUBSYSTEM('util_str_escape',
259 source='util_str_escape.c',
260 deps='talloc',
261 local_include=False)
263 bld.SAMBA_SUBSYSTEM('util_str_hex',
264 source='util_str_hex.c',
265 deps='talloc',
266 local_include=False)
268 bld.SAMBA_BINARY('test_rfc1738',
269 source='tests/rfc1738.c',
270 deps='cmocka replace samba-util',
271 local_include=False,
272 for_selftest=True)
274 bld.SAMBA_BINARY('test_ms_fnmatch',
275 source='tests/test_ms_fnmatch.c',
276 deps='cmocka replace samba-util',
277 local_include=False,
278 for_selftest=True)
280 bld.SAMBA_BINARY('test_talloc_keep_secret',
281 source='tests/test_talloc_keep_secret.c',
282 deps='cmocka replace samba-util',
283 local_include=False,
284 for_selftest=True)
286 bld.SAMBA_BINARY('test_byteorder',
287 source='tests/test_byteorder.c',
288 deps='cmocka replace samba-util',
289 local_include=False,
290 for_selftest=True)