ce015ccaa52785763f41fa86401aeb9592827025
[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 bld.SAMBA_PYTHON('python_auth',
203         source='../../librpc/gen_ndr/py_auth.c',
204         deps='NDR_AUTH pytalloc-util pyrpc_util',
205         realname='samba/dcerpc/auth.so'
206         )
207
208 bld.SAMBA_PYTHON('python_krb5pac',
209         source='../../librpc/gen_ndr/py_krb5pac.c',
210         deps='ndr-krb5pac pytalloc-util pyrpc_util',
211         realname='samba/dcerpc/krb5pac.so'
212         )
213
214 bld.SAMBA_PYTHON('python_winreg',
215         source='../../librpc/gen_ndr/py_winreg.c',
216         deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
217         realname='samba/dcerpc/winreg.so'
218         )
219
220
221 bld.SAMBA_PYTHON('python_dcerpc_misc',
222         source='../../librpc/gen_ndr/py_misc.c',
223         deps='pytalloc-util pyrpc_util ndr-krb5pac',
224         realname='samba/dcerpc/misc.so'
225         )
226
227
228 bld.SAMBA_PYTHON('python_initshutdown',
229         source='../../librpc/gen_ndr/py_initshutdown.c',
230         deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
231         realname='samba/dcerpc/initshutdown.so'
232         )
233
234
235 bld.SAMBA_PYTHON('python_epmapper',
236         source='../../librpc/gen_ndr/py_epmapper.c',
237         deps='dcerpc pytalloc-util pyrpc_util',
238         realname='samba/dcerpc/epmapper.so'
239         )
240
241
242 bld.SAMBA_PYTHON('python_mgmt',
243         source='../../librpc/gen_ndr/py_mgmt.c',
244         deps='pytalloc-util dcerpc pyrpc_util',
245         realname='samba/dcerpc/mgmt.so'
246         )
247
248
249 bld.SAMBA_PYTHON('python_atsvc',
250         source='../../librpc/gen_ndr/py_atsvc.c',
251         deps='dcerpc-atsvc pytalloc-util pyrpc_util',
252         realname='samba/dcerpc/atsvc.so'
253         )
254
255
256 bld.SAMBA_PYTHON('python_dcerpc_nbt',
257         source='../../librpc/gen_ndr/py_nbt.c',
258         deps='NDR_NBT RPC_NDR_NBT pytalloc-util pyrpc_util',
259         realname='samba/dcerpc/nbt.so'
260         )
261
262
263 bld.SAMBA_PYTHON('python_samr',
264         source='../../librpc/gen_ndr/py_samr.c',
265         deps='dcerpc-samr pytalloc-util pyrpc_util',
266         realname='samba/dcerpc/samr.so'
267         )
268
269
270 bld.SAMBA_PYTHON('python_svcctl',
271         source='../../librpc/gen_ndr/py_svcctl.c',
272         deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
273         realname='samba/dcerpc/svcctl.so'
274         )
275
276
277 bld.SAMBA_PYTHON('python_lsa',
278         source='../../librpc/gen_ndr/py_lsa.c',
279         deps='RPC_NDR_LSA pytalloc-util pyrpc_util',
280         realname='samba/dcerpc/lsa.so'
281         )
282
283
284 bld.SAMBA_PYTHON('python_wkssvc',
285         source='../../librpc/gen_ndr/py_wkssvc.c',
286         deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
287         realname='samba/dcerpc/wkssvc.so'
288         )
289
290
291 bld.SAMBA_PYTHON('python_dfs',
292         source='../../librpc/gen_ndr/py_dfs.c',
293         deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
294         realname='samba/dcerpc/dfs.so'
295         )
296
297
298 bld.SAMBA_PYTHON('python_unixinfo',
299         source='../../librpc/gen_ndr/py_unixinfo.c',
300         deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
301         realname='samba/dcerpc/unixinfo.so'
302         )
303
304
305 bld.SAMBA_PYTHON('python_irpc',
306         source='gen_ndr/py_irpc.c',
307         deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
308         realname='samba/dcerpc/irpc.so'
309         )
310
311 bld.SAMBA_PYTHON('python_winbind',
312         source='gen_ndr/py_winbind.c',
313         deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
314         realname='samba/dcerpc/winbind.so'
315         )
316
317 bld.SAMBA_PYTHON('python_idmap',
318         source='../../librpc/gen_ndr/py_idmap.c',
319         deps='NDR_IDMAP pytalloc-util pyrpc_util',
320         realname='samba/dcerpc/idmap.so'
321         )
322
323
324 bld.SAMBA_PYTHON('python_drsuapi',
325         source='../../librpc/gen_ndr/py_drsuapi.c',
326         deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
327         realname='samba/dcerpc/drsuapi.so'
328         )
329
330 bld.SAMBA_PYTHON('python_dcerpc_security',
331         source='../../librpc/gen_ndr/py_security.c',
332         deps='pytalloc-util pyrpc_util NDR_SECURITY',
333         realname='samba/dcerpc/security.so'
334         )
335
336 bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
337         source='../../librpc/gen_ndr/py_drsblobs.c',
338         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS',
339         realname='samba/dcerpc/drsblobs.so'
340         )
341
342 bld.SAMBA_PYTHON('python_dcerpc_dnsp',
343         source='../../librpc/gen_ndr/py_dnsp.c',
344         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DNSP',
345         realname='samba/dcerpc/dnsp.so'
346         )
347
348
349 bld.SAMBA_PYTHON('python_dcerpc_xattr',
350         source='../../librpc/gen_ndr/py_xattr.c',
351         deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
352         realname='samba/dcerpc/xattr.so'
353         )
354
355 bld.SAMBA_PYTHON('python_netlogon',
356         source='../../librpc/gen_ndr/py_netlogon.c',
357         deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util',
358         realname='samba/dcerpc/netlogon.so'
359         )
360
361 bld.SAMBA_SCRIPT('python_dcerpc_init',
362                  pattern='rpc/dcerpc.py',
363                  installdir='python/samba/dcerpc',
364                  installname='__init__.py')
365
366 bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')