librpc/rpc: move dcerpc_binding_handle stuff to rpc_common.h
[samba.git] / source4 / librpc / wscript_build
1 #!/usr/bin/env python
2
3 bld.RECURSE('../../librpc/idl')
4 bld.RECURSE('../../librpc/tools')
5 bld.RECURSE('idl')
6
7 bld.SAMBA_SUBSYSTEM('NDR_SERVER_ID4',
8         source='gen_ndr/ndr_server_id4.c',
9         deps='ndr',
10         public_headers='gen_ndr/server_id4.h',
11         header_path='gen_ndr'
12         )
13
14
15 bld.SAMBA_SUBSYSTEM('NDR_WINSTATION',
16         source='gen_ndr/ndr_winstation.c',
17         public_deps='ndr'
18         )
19
20
21 bld.SAMBA_SUBSYSTEM('NDR_IRPC',
22         source='gen_ndr/ndr_irpc.c',
23         public_deps='ndr NDR_SECURITY NDR_NBT'
24         )
25
26
27 bld.SAMBA_SUBSYSTEM('NDR_SASL_HELPERS',
28         source='gen_ndr/ndr_sasl_helpers.c',
29         public_deps='ndr'
30         )
31
32
33
34 bld.SAMBA_SUBSYSTEM('NDR_NFS4ACL',
35         source='gen_ndr/ndr_nfs4acl.c',
36         public_deps='ndr NDR_SECURITY'
37         )
38
39
40
41 bld.SAMBA_SUBSYSTEM('NDR_WINSIF',
42         source='gen_ndr/ndr_winsif.c',
43         public_deps='ndr'
44         )
45
46
47 bld.SAMBA_SUBSYSTEM('NDR_OPENDB',
48         source='gen_ndr/ndr_opendb.c',
49         public_deps='ndr'
50         )
51
52
53 bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
54         source='gen_ndr/ndr_s4_notify.c',
55         public_deps='ndr NDR_SERVER_ID4'
56         )
57
58
59 bld.SAMBA_SUBSYSTEM('NDR_NTP_SIGND',
60         source='gen_ndr/ndr_ntp_signd.c',
61         public_deps='ndr'
62         )
63
64
65 bld.SAMBA_SUBSYSTEM('NDR_WINSREPL',
66         source='gen_ndr/ndr_winsrepl.c',
67         public_deps='ndr NDR_NBT'
68         )
69
70
71 bld.SAMBA_SUBSYSTEM('NDR_WINBIND',
72         source='gen_ndr/ndr_winbind.c',
73         public_deps='NDR_IDMAP ndr ndr-standard'
74         )
75
76 # create a grouping library to consolidate our samba4 specific NDR code
77 bld.SAMBA_LIBRARY('ndr-samba4',
78         source=[],
79         deps='NDR_WINBIND NDR_IRPC NDR_NFS4ACL NDR_OPENDB NDR_NOTIFY ndr-table',
80         private_library=True,
81         grouping_library=True
82         )
83
84 # a grouping library for RPC_NDR subsystems that may be used by more than one target
85 bld.SAMBA_LIBRARY('dcerpc-samba4',
86         source=[],
87         deps='RPC_NDR_WINBIND',
88         private_library=True,
89         grouping_library=True
90         )
91
92
93 bld.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c')
94
95 if bld.env.enable_s3build:
96     s3_ndr = "NDR_WBINT"
97 else:
98     s3_ndr = ""
99
100 bld.SAMBA_SUBSYSTEM('ndr-table',
101         source='../../librpc/ndr/ndr_table.c gen_ndr/tables.c',
102         public_deps='''ndr-standard NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS
103         NDR_DRSUAPI NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS NDR_EPMAPPER
104         NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINSIF NDR_MGMT
105         NDR_OXIDRESOLVER NDR_REMACT NDR_WZCSVC
106         NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC ndr-krb5pac
107         NDR_XATTR NDR_SCHANNEL NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL
108         NDR_SECURITY NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB
109         NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI
110         NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI
111         NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP
112         NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY NDR_PREG ''' + s3_ndr,
113         depends_on='GEN_NDR_TABLES'
114         )
115
116
117 bld.SAMBA_SUBSYSTEM('RPC_NDR_IRPC',
118         source='gen_ndr/ndr_irpc_c.c',
119         public_deps='dcerpc NDR_IRPC'
120         )
121
122 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND',
123         source='gen_ndr/ndr_winbind_c.c',
124         public_deps='dcerpc NDR_WINBIND'
125         )
126
127
128 bld.SAMBA_LIBRARY('dcerpc-samr',
129         source='',
130         pc_files='dcerpc_samr.pc',
131         vnum='0.0.1',
132         public_deps='dcerpc ndr-standard RPC_NDR_SAMR',
133         public_headers='../../librpc/gen_ndr/ndr_samr_c.h',
134         header_path='gen_ndr'
135         )
136
137
138 bld.SAMBA_LIBRARY('dcerpc-atsvc',
139         source='',
140         pc_files='dcerpc_atsvc.pc',
141         vnum='0.0.1',
142         public_deps='dcerpc ndr-standard RPC_NDR_ATSVC',
143         public_headers='../../librpc/gen_ndr/ndr_atsvc_c.h',
144         header_path='gen_ndr'
145         )
146
147
148 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINSIF',
149         source='gen_ndr/ndr_winsif_c.c',
150         public_deps='dcerpc NDR_WINSIF'
151         )
152
153
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_smb2.c rpc/dcerpc_sock.c
157         rpc/dcerpc_connect.c rpc/dcerpc_secondary.c''',
158         pc_files='dcerpc.pc',
159         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 LIBCLI_RAW LP_RESOLVE UTIL_TEVENT rpccommon',
160         autoproto='rpc/dcerpc_proto.h',
161         public_deps='credentials tevent talloc',
162         public_headers='''rpc/dcerpc.h ../../librpc/gen_ndr/mgmt.h
163         ../../librpc/gen_ndr/ndr_mgmt.h ../../librpc/gen_ndr/ndr_mgmt_c.h
164         ../../librpc/gen_ndr/epmapper.h ../../librpc/gen_ndr/ndr_epmapper.h
165         ../../librpc/gen_ndr/ndr_epmapper_c.h ../../librpc/rpc/rpc_common.h''',
166         # It's very important to keep this form of construction
167         # it force the sambawaf extension to put everything that match the first element
168         # (*gen_ndr*) into the dir named by the second element (gen_ndr).
169         # If we just put header_path = 'gen_ndr' then all the public_headers will go
170         # in 'gen_ndr' and for dcerpc.h (at least) it will cause a problem as
171         # we have already a dcerpc.h installed by librpc/wscript_build
172         # and one will overright the other which is not what we expect.
173         header_path=[ ('*gen_ndr*', 'gen_ndr') ],
174         vnum='0.0.1'
175         )
176
177 bld.SAMBA_SUBSYSTEM('pyrpc_util',
178         source='rpc/pyrpc_util.c',
179         public_deps='pytalloc-util pyparam_util dcerpc',
180         pyext=True,
181         )
182
183
184 bld.SAMBA_PYTHON('python_dcerpc',
185         source='rpc/pyrpc.c',
186         public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG pyrpc_util',
187         realname='samba/dcerpc/base.so'
188         )
189
190 bld.SAMBA_PYTHON('python_srvsvc',
191     source='../../librpc/gen_ndr/py_srvsvc.c',
192     deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
193     realname='samba/dcerpc/srvsvc.so'
194     )
195
196 bld.SAMBA_PYTHON('python_echo',
197         source='../../librpc/gen_ndr/py_echo.c',
198         deps='RPC_NDR_ECHO pytalloc-util pyrpc_util',
199         realname='samba/dcerpc/echo.so'
200         )
201
202
203 bld.SAMBA_PYTHON('python_winreg',
204         source='../../librpc/gen_ndr/py_winreg.c',
205         deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
206         realname='samba/dcerpc/winreg.so'
207         )
208
209
210 bld.SAMBA_PYTHON('python_dcerpc_misc',
211         source='../../librpc/gen_ndr/py_misc.c',
212         deps='pytalloc-util pyrpc_util ndr-krb5pac',
213         realname='samba/dcerpc/misc.so'
214         )
215
216
217 bld.SAMBA_PYTHON('python_initshutdown',
218         source='../../librpc/gen_ndr/py_initshutdown.c',
219         deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
220         realname='samba/dcerpc/initshutdown.so'
221         )
222
223
224 bld.SAMBA_PYTHON('python_epmapper',
225         source='../../librpc/gen_ndr/py_epmapper.c',
226         deps='dcerpc pytalloc-util pyrpc_util',
227         realname='samba/dcerpc/epmapper.so'
228         )
229
230
231 bld.SAMBA_PYTHON('python_mgmt',
232         source='../../librpc/gen_ndr/py_mgmt.c',
233         deps='pytalloc-util dcerpc pyrpc_util',
234         realname='samba/dcerpc/mgmt.so'
235         )
236
237
238 bld.SAMBA_PYTHON('python_atsvc',
239         source='../../librpc/gen_ndr/py_atsvc.c',
240         deps='dcerpc-atsvc pytalloc-util pyrpc_util',
241         realname='samba/dcerpc/atsvc.so'
242         )
243
244
245 bld.SAMBA_PYTHON('python_dcerpc_nbt',
246         source='../../librpc/gen_ndr/py_nbt.c',
247         deps='NDR_NBT RPC_NDR_NBT pytalloc-util pyrpc_util',
248         realname='samba/dcerpc/nbt.so'
249         )
250
251
252 bld.SAMBA_PYTHON('python_samr',
253         source='../../librpc/gen_ndr/py_samr.c',
254         deps='dcerpc-samr pytalloc-util pyrpc_util',
255         realname='samba/dcerpc/samr.so'
256         )
257
258
259 bld.SAMBA_PYTHON('python_svcctl',
260         source='../../librpc/gen_ndr/py_svcctl.c',
261         deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
262         realname='samba/dcerpc/svcctl.so'
263         )
264
265
266 bld.SAMBA_PYTHON('python_lsa',
267         source='../../librpc/gen_ndr/py_lsa.c',
268         deps='RPC_NDR_LSA pytalloc-util pyrpc_util',
269         realname='samba/dcerpc/lsa.so'
270         )
271
272
273 bld.SAMBA_PYTHON('python_wkssvc',
274         source='../../librpc/gen_ndr/py_wkssvc.c',
275         deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
276         realname='samba/dcerpc/wkssvc.so'
277         )
278
279
280 bld.SAMBA_PYTHON('python_dfs',
281         source='../../librpc/gen_ndr/py_dfs.c',
282         deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
283         realname='samba/dcerpc/dfs.so'
284         )
285
286
287 bld.SAMBA_PYTHON('python_unixinfo',
288         source='../../librpc/gen_ndr/py_unixinfo.c',
289         deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
290         realname='samba/dcerpc/unixinfo.so'
291         )
292
293
294 bld.SAMBA_PYTHON('python_irpc',
295         source='gen_ndr/py_irpc.c',
296         deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
297         realname='samba/dcerpc/irpc.so'
298         )
299
300 bld.SAMBA_PYTHON('python_winbind',
301         source='gen_ndr/py_winbind.c',
302         deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
303         realname='samba/dcerpc/winbind.so'
304         )
305
306 bld.SAMBA_PYTHON('python_idmap',
307         source='../../librpc/gen_ndr/py_idmap.c',
308         deps='NDR_IDMAP pytalloc-util pyrpc_util',
309         realname='samba/dcerpc/idmap.so'
310         )
311
312
313 bld.SAMBA_PYTHON('python_drsuapi',
314         source='../../librpc/gen_ndr/py_drsuapi.c',
315         deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
316         realname='samba/dcerpc/drsuapi.so'
317         )
318
319 bld.SAMBA_PYTHON('python_dcerpc_security',
320         source='../../librpc/gen_ndr/py_security.c',
321         deps='pytalloc-util pyrpc_util NDR_SECURITY',
322         realname='samba/dcerpc/security.so'
323         )
324
325 bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
326         source='../../librpc/gen_ndr/py_drsblobs.c',
327         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS',
328         realname='samba/dcerpc/drsblobs.so'
329         )
330
331 bld.SAMBA_PYTHON('python_dcerpc_dnsp',
332         source='../../librpc/gen_ndr/py_dnsp.c',
333         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DNSP',
334         realname='samba/dcerpc/dnsp.so'
335         )
336
337
338 bld.SAMBA_PYTHON('python_dcerpc_xattr',
339         source='../../librpc/gen_ndr/py_xattr.c',
340         deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
341         realname='samba/dcerpc/xattr.so'
342         )
343
344 bld.SAMBA_PYTHON('python_netlogon',
345         source='../../librpc/gen_ndr/py_netlogon.c',
346         deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util',
347         realname='samba/dcerpc/netlogon.so'
348         )
349
350 bld.SAMBA_SCRIPT('python_dcerpc_init',
351                  pattern='rpc/dcerpc.py',
352                  installdir='python/samba/dcerpc',
353                  installname='__init__.py')
354
355 bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')