lib:util: Move discard_const(_p) to own header for libndr.h
[Samba.git] / lib / util / wscript_build
blob9c9652b26cd8c222c76bedf97a94968d593c3134
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_SUBSYSTEM('samba-util-core',
71 source='''data_blob.c util_file.c time.c
72 signal.c util.c idtree.c fault.c
73 substitute.c util_process.c util_strlist.c
74 strv_util.c bitmap.c select.c pidfile.c
75 become_daemon.c mkdir_p.c''',
76 deps='''time-basic samba-debug socket-blocking talloc
77 tevent execinfo pthread strv tini''',
78 public_deps='systemd systemd-daemon',
79 local_include=False)
81 bld.SAMBA_LIBRARY('iov_buf',
82 source='iov_buf.c',
83 deps='talloc',
84 local_include=False,
85 private_library=True)
87 bld.SAMBA_LIBRARY('msghdr',
88 source='msghdr.c',
89 deps='replace iov_buf',
90 local_include=False,
91 private_library=True)
93 if bld.env.SAMBA_UTIL_CORE_ONLY:
95 bld.SAMBA_LIBRARY('tevent-util',
96 source='tevent_unix.c',
97 local_include=False,
98 deps='tevent',
99 private_library=True)
101 else:
103 bld.env.public_headers_skip.append('charset_compat.h')
105 bld.SAMBA_LIBRARY('genrand',
106 source='genrand.c',
107 deps='replace socket-blocking sys_rw',
108 local_include=False,
109 private_library=True)
111 bld.SAMBA_BINARY('genrandperf',
112 source='tests/genrandperf.c',
113 deps='genrand replace',
114 local_include=False,
115 install=False)
117 bld.SAMBA_LIBRARY('samba-util',
118 source='''talloc_stack.c smb_threads.c
119 rbtree.c rfc1738.c system.c getpass.c
120 genrand_util.c fsusage.c
121 params.c util_id.c util_net.c
122 util_strlist_v3.c util_paths.c
123 idtree_random.c base64.c
124 util_str.c util_str_common.c ms_fnmatch.c
125 server_id.c dprintf.c
126 tevent_debug.c memcache.c unix_match.c tfork.c''',
127 deps='samba-util-core DYNCONFIG close-low-fd tiniparser genrand util_str_hex',
128 public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid',
129 public_headers='debug.h attr.h byteorder.h data_blob.h discard.h memory.h safe_string.h time.h talloc_stack.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h genrand.h tfork.h',
130 header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
131 local_include=False,
132 vnum='0.0.1',
133 pc_files='samba-util.pc'
136 bld.SAMBA_LIBRARY('samba-modules',
137 source='modules.c',
138 deps='samba-errors samba-util',
139 local_include=False,
140 private_library=True)
142 bld.SAMBA_LIBRARY('asn1util',
143 source='asn1.c',
144 deps='talloc samba-util',
145 private_library=True,
146 local_include=False)
149 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
150 source='unix_privs.c',
151 autoproto='unix_privs.h',
152 deps='replace talloc',
153 local_include=False,
157 bld.SAMBA_LIBRARY('util_tdb',
158 source='util_tdb.c',
159 local_include=False,
160 public_deps='tdb talloc',
161 private_library=True
164 bld.SAMBA_LIBRARY('tevent-util',
165 source='''
166 tevent_unix.c
167 tevent_ntstatus.c
168 tevent_werror.c
169 tevent_req_profile.c
170 ''',
171 local_include=False,
172 public_deps='tevent samba-errors',
173 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
174 header_path=[ ('*', 'util') ],
175 pc_files=[],
176 vnum='0.0.1'
179 bld.SAMBA_LIBRARY('util_setid',
180 source='setid.c',
181 local_include=False,
182 private_library=True
185 bld.SAMBA_SUBSYSTEM('util_ldb',
186 source='util_ldb.c',
187 local_include=False,
188 public_deps='ldb',
189 public_headers='util_ldb.h'
193 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
194 source='util_runcmd.c',
195 local_include=False,
196 public_deps='tevent'
199 bld.SAMBA_SUBSYSTEM('UTIL_PW',
200 source='util_pw.c',
201 local_include=False,
202 public_deps='talloc'
205 bld.SAMBA_LIBRARY('server_id_db',
206 source='server_id_db.c',
207 deps='talloc tdb strv util_tdb tdb-wrap samba-util',
208 local_include=False,
209 private_library=True)
211 bld.SAMBA_SUBSYSTEM('access',
212 source='access.c',
213 deps='interfaces samba-util tirpc nsl',
214 local_include=False)
216 bld.SAMBA_SUBSYSTEM('util_str_escape',
217 source='util_str_escape.c',
218 deps='talloc',
219 local_include=False)
221 bld.SAMBA_SUBSYSTEM('util_str_hex',
222 source='util_str_hex.c',
223 deps='talloc',
224 local_include=False)
226 bld.SAMBA_BINARY('test_rfc1738',
227 source='tests/rfc1738.c',
228 deps='cmocka replace samba-util',
229 local_include=False,
230 install=False)
232 bld.SAMBA_BINARY('test_ms_fnmatch',
233 source='tests/test_ms_fnmatch.c',
234 deps='cmocka replace samba-util',
235 local_include=False,
236 install=False)