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