s4-waf: split out wscript_build for ndrdump binary.
[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_SECURITY',
8         source='../../librpc/gen_ndr/ndr_security.c ../../librpc/ndr/ndr_sec_helper.c gen_ndr/ndr_server_id.c',
9         deps='ndr security',
10         public_headers='../../librpc/gen_ndr/security.h gen_ndr/server_id.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'
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
77 bld.SAMBA_LIBRARY('ndr-standard',
78         source='../../librpc/gen_ndr/ndr_atsvc.c ../../librpc/gen_ndr/ndr_eventlog6.c',
79         vnum='0.0.1',
80         pc_files='../../librpc/ndr_standard.pc',
81         deps='''NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS
82         NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG
83         NDR_ECHO security NDR_DNS''',
84         public_deps='ndr',
85         public_headers='../../librpc/gen_ndr/samr.h ../../librpc/gen_ndr/ndr_samr.h ../../librpc/gen_ndr/lsa.h ../../librpc/gen_ndr/netlogon.h ../../librpc/gen_ndr/atsvc.h ../../librpc/gen_ndr/ndr_atsvc.h ../../librpc/gen_ndr/ndr_svcctl.h ../../librpc/gen_ndr/svcctl.h',
86         header_path='gen_ndr'
87         )
88
89 # create a grouping library to consolidate our samba4 specific NDR code
90 bld.SAMBA_LIBRARY('ndr-samba4',
91         source=[],
92         deps='NDR_WINBIND NDR_IRPC NDR_NFS4ACL NDR_OPENDB NDR_NOTIFY ndr-table',
93         private_library=True,
94         grouping_library=True
95         )
96
97 # a grouping library for RPC_NDR subsystems that may be used by more than one target
98 bld.SAMBA_LIBRARY('dcerpc-samba4',
99         source=[],
100         deps='RPC_NDR_WINBIND',
101         private_library=True,
102         grouping_library=True
103         )
104
105
106 bld.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c')
107
108 bld.SAMBA_SUBSYSTEM('ndr-table',
109         source='../../librpc/ndr/ndr_table.c gen_ndr/tables.c',
110         public_deps='''ndr-standard NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS
111         NDR_DRSUAPI NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS NDR_EPMAPPER
112         NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINSIF NDR_MGMT
113         NDR_OXIDRESOLVER NDR_REMACT NDR_WZCSVC
114         NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC
115         NDR_XATTR NDR_SCHANNEL NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL
116         NDR_SECURITY NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB
117         NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI
118         NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI
119         NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP
120         NDR_NTPRINTING NDR_DNS NDR_BACKUPKEY''',
121         depends_on='GEN_NDR_TABLES'
122         )
123
124
125 bld.SAMBA_SUBSYSTEM('RPC_NDR_IRPC',
126         source='gen_ndr/ndr_irpc_c.c',
127         public_deps='dcerpc NDR_IRPC'
128         )
129
130 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINBIND',
131         source='gen_ndr/ndr_winbind_c.c',
132         public_deps='dcerpc NDR_WINBIND'
133         )
134
135
136 bld.SAMBA_LIBRARY('dcerpc-samr',
137         source='../../librpc/gen_ndr/ndr_samr_c.c',
138         pc_files='dcerpc_samr.pc',
139         vnum='0.0.1',
140         public_deps='dcerpc ndr-standard',
141         public_headers='../../librpc/gen_ndr/ndr_samr_c.h',
142         header_path='gen_ndr'
143         )
144
145
146 bld.SAMBA_LIBRARY('dcerpc-atsvc',
147         source='../../librpc/gen_ndr/ndr_atsvc_c.c',
148         pc_files='dcerpc_atsvc.pc',
149         vnum='0.0.1',
150         public_deps='dcerpc ndr-standard',
151         public_headers='../../librpc/gen_ndr/ndr_atsvc_c.h',
152         header_path='gen_ndr'
153         )
154
155
156 bld.SAMBA_SUBSYSTEM('RPC_NDR_WINSIF',
157         source='gen_ndr/ndr_winsif_c.c',
158         public_deps='dcerpc NDR_WINSIF'
159         )
160
161
162 bld.SAMBA_SUBSYSTEM('NDR_DCERPC',
163         source='../../librpc/gen_ndr/ndr_dcerpc.c',
164         public_deps='ndr',
165         public_headers='rpc/dcerpc.h ../../librpc/gen_ndr/ndr_dcerpc.h ../../librpc/gen_ndr/dcerpc.h',
166         header_path= [ ('*gen_ndr*', 'gen_ndr') ],
167         )
168
169 bld.SAMBA_LIBRARY('dcerpc',
170         source='''rpc/dcerpc.c rpc/dcerpc_auth.c rpc/dcerpc_schannel.c
171         rpc/dcerpc_util.c rpc/dcerpc_smb.c rpc/dcerpc_smb2.c rpc/dcerpc_sock.c
172         rpc/dcerpc_connect.c rpc/dcerpc_secondary.c ../../librpc/rpc/binding.c
173         ../../librpc/rpc/dcerpc_error.c ../../librpc/rpc/dcerpc_util.c
174         ../../librpc/rpc/binding_handle.c''',
175         pc_files='dcerpc.pc',
176         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',
177         autoproto='rpc/dcerpc_proto.h',
178         public_deps='credentials tevent talloc',
179         public_headers='../../librpc/gen_ndr/mgmt.h ../../librpc/gen_ndr/ndr_mgmt.h ../../librpc/gen_ndr/ndr_mgmt_c.h ../../librpc/gen_ndr/epmapper.h ../../librpc/gen_ndr/ndr_epmapper.h ../../librpc/gen_ndr/ndr_epmapper_c.h',
180         header_path='gen_ndr',
181         vnum='0.0.1'
182         )
183
184 bld.SAMBA_SUBSYSTEM('pyrpc_util',
185         source='rpc/pyrpc_util.c',
186         public_deps='pytalloc-util pyparam_util dcerpc',
187         pyext=True,
188         )
189
190
191 bld.SAMBA_PYTHON('python_dcerpc',
192         source='rpc/pyrpc.c',
193         public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG pyrpc_util',
194         realname='samba/dcerpc/base.so'
195         )
196
197 bld.SAMBA_PYTHON('python_srvsvc',
198     source='../../librpc/gen_ndr/py_srvsvc.c',
199     deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
200     realname='samba/dcerpc/srvsvc.so'
201     )
202
203 bld.SAMBA_PYTHON('python_echo',
204         source='../../librpc/gen_ndr/py_echo.c',
205         deps='RPC_NDR_ECHO pytalloc-util pyrpc_util',
206         realname='samba/dcerpc/echo.so'
207         )
208
209
210 bld.SAMBA_PYTHON('python_winreg',
211         source='../../librpc/gen_ndr/py_winreg.c',
212         deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
213         realname='samba/dcerpc/winreg.so'
214         )
215
216
217 bld.SAMBA_PYTHON('python_dcerpc_misc',
218         source='../../librpc/gen_ndr/py_misc.c',
219         deps='pytalloc-util pyrpc_util NDR_KRB5PAC',
220         realname='samba/dcerpc/misc.so'
221         )
222
223
224 bld.SAMBA_PYTHON('python_initshutdown',
225         source='../../librpc/gen_ndr/py_initshutdown.c',
226         deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
227         realname='samba/dcerpc/initshutdown.so'
228         )
229
230
231 bld.SAMBA_PYTHON('python_epmapper',
232         source='../../librpc/gen_ndr/py_epmapper.c',
233         deps='dcerpc pytalloc-util pyrpc_util',
234         realname='samba/dcerpc/epmapper.so'
235         )
236
237
238 bld.SAMBA_PYTHON('python_mgmt',
239         source='../../librpc/gen_ndr/py_mgmt.c',
240         deps='pytalloc-util dcerpc pyrpc_util',
241         realname='samba/dcerpc/mgmt.so'
242         )
243
244
245 bld.SAMBA_PYTHON('python_atsvc',
246         source='../../librpc/gen_ndr/py_atsvc.c',
247         deps='dcerpc-atsvc pytalloc-util pyrpc_util',
248         realname='samba/dcerpc/atsvc.so'
249         )
250
251
252 bld.SAMBA_PYTHON('python_dcerpc_nbt',
253         source='../../librpc/gen_ndr/py_nbt.c',
254         deps='NDR_NBT RPC_NDR_NBT pytalloc-util pyrpc_util',
255         realname='samba/dcerpc/nbt.so'
256         )
257
258
259 bld.SAMBA_PYTHON('python_samr',
260         source='../../librpc/gen_ndr/py_samr.c',
261         deps='dcerpc-samr pytalloc-util pyrpc_util',
262         realname='samba/dcerpc/samr.so'
263         )
264
265
266 bld.SAMBA_PYTHON('python_svcctl',
267         source='../../librpc/gen_ndr/py_svcctl.c',
268         deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
269         realname='samba/dcerpc/svcctl.so'
270         )
271
272
273 bld.SAMBA_PYTHON('python_lsa',
274         source='../../librpc/gen_ndr/py_lsa.c',
275         deps='RPC_NDR_LSA pytalloc-util pyrpc_util',
276         realname='samba/dcerpc/lsa.so'
277         )
278
279
280 bld.SAMBA_PYTHON('python_wkssvc',
281         source='../../librpc/gen_ndr/py_wkssvc.c',
282         deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
283         realname='samba/dcerpc/wkssvc.so'
284         )
285
286
287 bld.SAMBA_PYTHON('python_dfs',
288         source='../../librpc/gen_ndr/py_dfs.c',
289         deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
290         realname='samba/dcerpc/dfs.so'
291         )
292
293
294 bld.SAMBA_PYTHON('python_unixinfo',
295         source='../../librpc/gen_ndr/py_unixinfo.c',
296         deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
297         realname='samba/dcerpc/unixinfo.so'
298         )
299
300
301 bld.SAMBA_PYTHON('python_irpc',
302         source='gen_ndr/py_irpc.c',
303         deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
304         realname='samba/dcerpc/irpc.so'
305         )
306
307 bld.SAMBA_PYTHON('python_winbind',
308         source='gen_ndr/py_winbind.c',
309         deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
310         realname='samba/dcerpc/winbind.so'
311         )
312
313 bld.SAMBA_PYTHON('python_idmap',
314         source='../../librpc/gen_ndr/py_idmap.c',
315         deps='NDR_IDMAP pytalloc-util pyrpc_util',
316         realname='samba/dcerpc/idmap.so'
317         )
318
319
320 bld.SAMBA_PYTHON('python_drsuapi',
321         source='../../librpc/gen_ndr/py_drsuapi.c',
322         deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
323         realname='samba/dcerpc/drsuapi.so'
324         )
325
326 bld.SAMBA_PYTHON('python_dcerpc_security',
327         source='../../librpc/gen_ndr/py_security.c',
328         deps='pytalloc-util pyrpc_util NDR_SECURITY',
329         realname='samba/dcerpc/security.so'
330         )
331
332 bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
333         source='../../librpc/gen_ndr/py_drsblobs.c',
334         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS',
335         realname='samba/dcerpc/drsblobs.so'
336         )
337
338
339 bld.SAMBA_PYTHON('python_dcerpc_xattr',
340         source='../../librpc/gen_ndr/py_xattr.c',
341         deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
342         realname='samba/dcerpc/xattr.so'
343         )
344
345 bld.SAMBA_PYTHON('python_netlogon',
346         source='../../librpc/gen_ndr/py_netlogon.c',
347         deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util',
348         realname='samba/dcerpc/netlogon.so'
349         )
350
351 bld.SAMBA_SCRIPT('python_dcerpc_init',
352                  pattern='rpc/dcerpc.py',
353                  installdir='python/samba/dcerpc',
354                  installname='__init__.py')
355
356 bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')