3 bld
.RECURSE('../../librpc/idl')
4 bld
.RECURSE('../../librpc/tools')
8 bld
.SAMBA_SUBSYSTEM('NDR_WINSTATION',
9 source
='gen_ndr/ndr_winstation.c',
14 bld
.SAMBA_SUBSYSTEM('NDR_IRPC',
15 source
='gen_ndr/ndr_irpc.c',
16 public_deps
='ndr NDR_SECURITY ndr_nbt'
20 bld
.SAMBA_SUBSYSTEM('NDR_SASL_HELPERS',
21 source
='gen_ndr/ndr_sasl_helpers.c',
27 bld
.SAMBA_SUBSYSTEM('NDR_WINSIF',
28 source
='gen_ndr/ndr_winsif.c',
33 bld
.SAMBA_SUBSYSTEM('NDR_OPENDB',
34 source
='gen_ndr/ndr_opendb.c',
39 bld
.SAMBA_SUBSYSTEM('NDR_NTP_SIGND',
40 source
='gen_ndr/ndr_ntp_signd.c',
45 bld
.SAMBA_SUBSYSTEM('NDR_WINSREPL',
46 source
='gen_ndr/ndr_winsrepl.c',
47 public_deps
='ndr ndr_nbt'
51 # create a grouping library to consolidate our samba4 specific NDR code
52 bld
.SAMBA_LIBRARY('ndr-samba4',
54 deps
='NDR_WINBIND NDR_IRPC NDR_NFS4ACL NDR_OPENDB ndr-table',
59 # a grouping library for RPC_NDR subsystems that may be used by more than one target
60 bld
.SAMBA_LIBRARY('dcerpc-samba4',
62 deps
='RPC_NDR_WINBIND',
68 bld
.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c')
70 bld
.SAMBA_SUBSYSTEM('ndr-table',
71 source
='../../librpc/ndr/ndr_table.c gen_ndr/tables.c',
130 depends_on
='GEN_NDR_TABLES'
134 bld
.SAMBA_SUBSYSTEM('RPC_NDR_IRPC',
135 source
='gen_ndr/ndr_irpc_c.c',
136 public_deps
='dcerpc NDR_IRPC'
139 bld
.SAMBA_LIBRARY('dcerpc-samr',
141 pc_files
='dcerpc_samr.pc',
143 public_deps
='dcerpc ndr-standard RPC_NDR_SAMR',
144 public_headers
='../../librpc/gen_ndr/ndr_samr_c.h',
145 header_path
='gen_ndr'
148 bld
.SAMBA_SUBSYSTEM('RPC_NDR_WINSIF',
149 source
='gen_ndr/ndr_winsif_c.c',
150 public_deps
='dcerpc NDR_WINSIF'
154 bld
.SAMBA_LIBRARY('dcerpc',
155 source
='''rpc/dcerpc.c rpc/dcerpc_auth.c rpc/dcerpc_schannel.c
156 rpc/dcerpc_util.c rpc/dcerpc_smb.c rpc/dcerpc_sock.c
157 rpc/dcerpc_roh_channel_in.c rpc/dcerpc_roh_channel_out.c rpc/dcerpc_roh.c
158 rpc/dcerpc_connect.c rpc/dcerpc_secondary.c''',
159 pc_files
='dcerpc.pc',
160 deps
='samba_socket LIBCLI_RESOLVE LIBCLI_SMB LIBCLI_SMB2 ndr NDR_DCERPC RPC_NDR_EPMAPPER NDR_SCHANNEL RPC_NDR_NETLOGON RPC_NDR_MGMT gensec LIBCLI_AUTH smbclient-raw LP_RESOLVE tevent-util dcerpc-binding param_options http',
161 autoproto
='rpc/dcerpc_proto.h',
162 public_deps
='samba-credentials tevent talloc',
163 public_headers
='''rpc/dcerpc.h''',
164 # It's very important to keep this form of construction
165 # it force the sambawaf extension to put everything that match the first element
166 # (*gen_ndr*) into the dir named by the second element (gen_ndr).
167 # If we just put header_path = 'gen_ndr' then all the public_headers will go
168 # in 'gen_ndr' and for dcerpc.h (at least) it will cause a problem as
169 # we have already a dcerpc.h installed by librpc/wscript_build
170 # and one will overright the other which is not what we expect.
171 header_path
=[ ('*gen_ndr*', 'gen_ndr') ],
175 for env
in bld
.gen_python_environments():
176 pyrpc_util
= bld
.pyembed_libname('pyrpc_util')
177 pytalloc_util
= bld
.pyembed_libname('pytalloc-util')
178 pyparam_util
= bld
.pyembed_libname('pyparam_util')
180 bld
.SAMBA_SUBSYSTEM(pyrpc_util
,
181 source
='rpc/pyrpc_util.c',
182 public_deps
='%s %s dcerpc MESSAGING' % (pytalloc_util
, pyparam_util
),
184 enabled
=bld
.PYTHON_BUILD_IS_ENABLED(),
187 bld
.SAMBA_PYTHON('python_dcerpc',
188 source
='rpc/pyrpc.c',
189 public_deps
='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG %s gensec' % pyrpc_util
,
190 realname
='samba/dcerpc/base.so'
193 bld
.SAMBA_PYTHON('python_dcerpc_misc',
194 source
='../../librpc/gen_ndr/py_misc.c',
195 deps
='%s %s ndr-krb5pac' % (pytalloc_util
, pyrpc_util
),
196 realname
='samba/dcerpc/misc.so'
199 bld
.SAMBA_PYTHON('python_auth',
200 source
='../../librpc/gen_ndr/py_auth.c',
201 deps
='NDR_AUTH %s %s' % (pytalloc_util
, pyrpc_util
),
202 realname
='samba/dcerpc/auth.so'
205 bld
.SAMBA_PYTHON('python_dcerpc_security',
206 source
='../../librpc/gen_ndr/py_security.c',
207 deps
='%s %s NDR_SECURITY' % (pytalloc_util
, pyrpc_util
),
208 realname
='samba/dcerpc/security.so'
211 bld
.SAMBA_PYTHON('python_lsa',
212 source
='../../librpc/gen_ndr/py_lsa.c',
213 deps
='RPC_NDR_LSA %s %s' % (pytalloc_util
, pyrpc_util
),
214 realname
='samba/dcerpc/lsa.so'
217 bld
.SAMBA_PYTHON('python_krb5pac',
218 source
='../../librpc/gen_ndr/py_krb5pac.c',
219 deps
='ndr-krb5pac %s %s' % (pytalloc_util
, pyrpc_util
),
220 realname
='samba/dcerpc/krb5pac.so'
223 bld
.SAMBA_PYTHON('python_netlogon',
224 source
='../../librpc/gen_ndr/py_netlogon.c',
225 deps
='RPC_NDR_NETLOGON %s %s' % (pytalloc_util
, pyrpc_util
),
226 realname
='samba/dcerpc/netlogon.so'
229 bld
.SAMBA_PYTHON('python_samr',
230 source
='../../librpc/gen_ndr/py_samr.c',
231 deps
='dcerpc-samr %s %s' % (pytalloc_util
, pyrpc_util
),
232 realname
='samba/dcerpc/samr.so'
235 bld
.SAMBA_PYTHON('python_dcerpc_nbt',
236 source
='../../librpc/gen_ndr/py_nbt.c',
237 deps
='ndr_nbt RPC_NDR_NBT %s %s' % (pytalloc_util
, pyrpc_util
),
238 realname
='samba/dcerpc/nbt.so'
241 bld
.SAMBA_PYTHON('python_dcerpc_drsblobs',
242 source
='../../librpc/gen_ndr/py_drsblobs.c',
243 deps
='%s %s NDR_SECURITY RPC_NDR_DRSBLOBS' % (pytalloc_util
, pyrpc_util
),
244 realname
='samba/dcerpc/drsblobs.so'
247 bld
.SAMBA_PYTHON('python_dcerpc_ntlmssp',
248 source
='../../librpc/gen_ndr/py_ntlmssp.c',
249 deps
='%s %s RPC_NDR_NTLMSSP' % (pytalloc_util
, pyrpc_util
),
250 realname
='samba/dcerpc/ntlmssp.so'
253 bld
.SAMBA_PYTHON('python_srvsvc',
254 source
='../../librpc/gen_ndr/py_srvsvc.c',
255 deps
='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
256 realname
='samba/dcerpc/srvsvc.so'
259 bld
.SAMBA_PYTHON('python_echo',
260 source
='../../librpc/gen_ndr/py_echo.c',
261 deps
='RPC_NDR_ECHO pytalloc-util pyrpc_util',
262 realname
='samba/dcerpc/echo.so'
265 bld
.SAMBA_PYTHON('python_dns',
266 source
='../../librpc/gen_ndr/py_dns.c',
267 deps
='NDR_DNS pytalloc-util pyrpc_util',
268 realname
='samba/dcerpc/dns.so'
271 bld
.SAMBA_PYTHON('python_winreg',
272 source
='../../librpc/gen_ndr/py_winreg.c',
273 deps
='RPC_NDR_WINREG pytalloc-util pyrpc_util',
274 realname
='samba/dcerpc/winreg.so'
278 bld
.SAMBA_PYTHON('python_initshutdown',
279 source
='../../librpc/gen_ndr/py_initshutdown.c',
280 deps
='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
281 realname
='samba/dcerpc/initshutdown.so'
285 bld
.SAMBA_PYTHON('python_epmapper',
286 source
='../../librpc/gen_ndr/py_epmapper.c',
287 deps
='dcerpc pytalloc-util pyrpc_util',
288 realname
='samba/dcerpc/epmapper.so'
292 bld
.SAMBA_PYTHON('python_mgmt',
293 source
='../../librpc/gen_ndr/py_mgmt.c',
294 deps
='pytalloc-util dcerpc pyrpc_util',
295 realname
='samba/dcerpc/mgmt.so'
299 bld
.SAMBA_PYTHON('python_atsvc',
300 source
='../../librpc/gen_ndr/py_atsvc.c',
301 deps
='RPC_NDR_ATSVC pytalloc-util pyrpc_util',
302 realname
='samba/dcerpc/atsvc.so'
306 bld
.SAMBA_PYTHON('python_svcctl',
307 source
='../../librpc/gen_ndr/py_svcctl.c',
308 deps
='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
309 realname
='samba/dcerpc/svcctl.so'
313 bld
.SAMBA_PYTHON('python_wkssvc',
314 source
='../../librpc/gen_ndr/py_wkssvc.c',
315 deps
='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
316 realname
='samba/dcerpc/wkssvc.so'
320 bld
.SAMBA_PYTHON('python_dfs',
321 source
='../../librpc/gen_ndr/py_dfs.c',
322 deps
='RPC_NDR_DFS pytalloc-util pyrpc_util',
323 realname
='samba/dcerpc/dfs.so'
326 bld
.SAMBA_PYTHON('python_dcerpc_dcerpc',
327 source
='../../librpc/gen_ndr/py_dcerpc.c',
328 deps
='NDR_DCERPC pytalloc-util pyrpc_util',
329 realname
='samba/dcerpc/dcerpc.so'
332 bld
.SAMBA_PYTHON('python_unixinfo',
333 source
='../../librpc/gen_ndr/py_unixinfo.c',
334 deps
='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
335 realname
='samba/dcerpc/unixinfo.so'
339 bld
.SAMBA_PYTHON('python_irpc',
340 source
='gen_ndr/py_irpc.c',
341 deps
='RPC_NDR_IRPC %s %s' % (pytalloc_util
, pyrpc_util
),
342 realname
='samba/dcerpc/irpc.so'
345 bld
.SAMBA_PYTHON('python_server_id',
346 source
='../../librpc/gen_ndr/py_server_id.c',
347 deps
='RPC_NDR_SERVER_ID pytalloc-util pyrpc_util',
348 realname
='samba/dcerpc/server_id.so'
351 bld
.SAMBA_PYTHON('python_winbind',
352 source
='../../librpc/gen_ndr/py_winbind.c',
353 deps
='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
354 realname
='samba/dcerpc/winbind.so'
357 bld
.SAMBA_PYTHON('python_idmap',
358 source
='../../librpc/gen_ndr/py_idmap.c',
359 deps
='NDR_IDMAP pytalloc-util pyrpc_util',
360 realname
='samba/dcerpc/idmap.so'
364 bld
.SAMBA_PYTHON('python_drsuapi',
365 source
='../../librpc/gen_ndr/py_drsuapi.c',
366 deps
='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
367 realname
='samba/dcerpc/drsuapi.so'
370 bld
.SAMBA_PYTHON('python_dcerpc_dnsp',
371 source
='../../librpc/gen_ndr/py_dnsp.c',
372 deps
='pytalloc-util pyrpc_util NDR_SECURITY NDR_DNSP',
373 realname
='samba/dcerpc/dnsp.so'
377 bld
.SAMBA_PYTHON('python_dcerpc_xattr',
378 source
='../../librpc/gen_ndr/py_xattr.c',
379 deps
='pytalloc-util pyrpc_util RPC_NDR_XATTR',
380 realname
='samba/dcerpc/xattr.so'
383 bld
.SAMBA_PYTHON('python_dcerpc_idmap',
384 source
='../../librpc/gen_ndr/py_idmap.c',
385 deps
='pytalloc-util pyrpc_util RPC_NDR_XATTR',
386 realname
='samba/dcerpc/idmap.so'
389 bld
.SAMBA_PYTHON('python_dnsserver',
390 source
='../../librpc/gen_ndr/py_dnsserver.c',
391 deps
='RPC_NDR_DNSSERVER pytalloc-util pyrpc_util',
392 realname
='samba/dcerpc/dnsserver.so'
395 bld
.SAMBA_PYTHON('python_dcerpc_smb_acl',
396 source
='../../librpc/gen_ndr/py_smb_acl.c',
397 deps
='pytalloc-util pyrpc_util',
398 realname
='samba/dcerpc/smb_acl.so'
401 bld
.SAMBA_PYTHON('dcerpc_python_messaging',
402 source
='../../librpc/gen_ndr/py_messaging.c',
403 deps
='pytalloc-util pyrpc_util',
404 realname
='samba/dcerpc/messaging.so'
407 if bld
.PYTHON_BUILD_IS_ENABLED():
408 for env
in bld
.gen_python_environments():
409 bld
.SAMBA_SCRIPT('python_dcerpc_init',
410 pattern
='rpc/dcerpc.py',
411 installdir
='python/samba/dcerpc',
412 installname
='__init__.py')
414 bld
.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname
='__init__.py')