build: moved librpc/rpc/*.c into a rpccommon library
[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 ../../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',
163         # It's very important to keep this form of construction
164         # it force the sambawaf extension to put everything that match the first element
165         # (*gen_ndr*) into the dir named by the second element (gen_ndr).
166         # If we just put header_path = 'gen_ndr' then all the public_headers will go
167         # in 'gen_ndr' and for dcerpc.h (at least) it will cause a problem as
168         # we have already a dcerpc.h installed by librpc/wscript_build
169         # and one will overright the other which is not what we expect.
170         header_path=[ ('*gen_ndr*', 'gen_ndr') ],
171         vnum='0.0.1'
172         )
173
174 bld.SAMBA_SUBSYSTEM('pyrpc_util',
175         source='rpc/pyrpc_util.c',
176         public_deps='pytalloc-util pyparam_util dcerpc',
177         pyext=True,
178         )
179
180
181 bld.SAMBA_PYTHON('python_dcerpc',
182         source='rpc/pyrpc.c',
183         public_deps='LIBCLI_SMB samba-util samba-hostconfig dcerpc-samr RPC_NDR_LSA DYNCONFIG pyrpc_util',
184         realname='samba/dcerpc/base.so'
185         )
186
187 bld.SAMBA_PYTHON('python_srvsvc',
188     source='../../librpc/gen_ndr/py_srvsvc.c',
189     deps='RPC_NDR_SRVSVC pytalloc-util pyrpc_util',
190     realname='samba/dcerpc/srvsvc.so'
191     )
192
193 bld.SAMBA_PYTHON('python_echo',
194         source='../../librpc/gen_ndr/py_echo.c',
195         deps='RPC_NDR_ECHO pytalloc-util pyrpc_util',
196         realname='samba/dcerpc/echo.so'
197         )
198
199
200 bld.SAMBA_PYTHON('python_winreg',
201         source='../../librpc/gen_ndr/py_winreg.c',
202         deps='RPC_NDR_WINREG pytalloc-util pyrpc_util',
203         realname='samba/dcerpc/winreg.so'
204         )
205
206
207 bld.SAMBA_PYTHON('python_dcerpc_misc',
208         source='../../librpc/gen_ndr/py_misc.c',
209         deps='pytalloc-util pyrpc_util ndr-krb5pac',
210         realname='samba/dcerpc/misc.so'
211         )
212
213
214 bld.SAMBA_PYTHON('python_initshutdown',
215         source='../../librpc/gen_ndr/py_initshutdown.c',
216         deps='RPC_NDR_INITSHUTDOWN pytalloc-util pyrpc_util',
217         realname='samba/dcerpc/initshutdown.so'
218         )
219
220
221 bld.SAMBA_PYTHON('python_epmapper',
222         source='../../librpc/gen_ndr/py_epmapper.c',
223         deps='dcerpc pytalloc-util pyrpc_util',
224         realname='samba/dcerpc/epmapper.so'
225         )
226
227
228 bld.SAMBA_PYTHON('python_mgmt',
229         source='../../librpc/gen_ndr/py_mgmt.c',
230         deps='pytalloc-util dcerpc pyrpc_util',
231         realname='samba/dcerpc/mgmt.so'
232         )
233
234
235 bld.SAMBA_PYTHON('python_atsvc',
236         source='../../librpc/gen_ndr/py_atsvc.c',
237         deps='dcerpc-atsvc pytalloc-util pyrpc_util',
238         realname='samba/dcerpc/atsvc.so'
239         )
240
241
242 bld.SAMBA_PYTHON('python_dcerpc_nbt',
243         source='../../librpc/gen_ndr/py_nbt.c',
244         deps='NDR_NBT RPC_NDR_NBT pytalloc-util pyrpc_util',
245         realname='samba/dcerpc/nbt.so'
246         )
247
248
249 bld.SAMBA_PYTHON('python_samr',
250         source='../../librpc/gen_ndr/py_samr.c',
251         deps='dcerpc-samr pytalloc-util pyrpc_util',
252         realname='samba/dcerpc/samr.so'
253         )
254
255
256 bld.SAMBA_PYTHON('python_svcctl',
257         source='../../librpc/gen_ndr/py_svcctl.c',
258         deps='RPC_NDR_SVCCTL pytalloc-util pyrpc_util',
259         realname='samba/dcerpc/svcctl.so'
260         )
261
262
263 bld.SAMBA_PYTHON('python_lsa',
264         source='../../librpc/gen_ndr/py_lsa.c',
265         deps='RPC_NDR_LSA pytalloc-util pyrpc_util',
266         realname='samba/dcerpc/lsa.so'
267         )
268
269
270 bld.SAMBA_PYTHON('python_wkssvc',
271         source='../../librpc/gen_ndr/py_wkssvc.c',
272         deps='RPC_NDR_WKSSVC pytalloc-util pyrpc_util',
273         realname='samba/dcerpc/wkssvc.so'
274         )
275
276
277 bld.SAMBA_PYTHON('python_dfs',
278         source='../../librpc/gen_ndr/py_dfs.c',
279         deps='RPC_NDR_DFS pytalloc-util pyrpc_util',
280         realname='samba/dcerpc/dfs.so'
281         )
282
283
284 bld.SAMBA_PYTHON('python_unixinfo',
285         source='../../librpc/gen_ndr/py_unixinfo.c',
286         deps='RPC_NDR_UNIXINFO pytalloc-util pyrpc_util',
287         realname='samba/dcerpc/unixinfo.so'
288         )
289
290
291 bld.SAMBA_PYTHON('python_irpc',
292         source='gen_ndr/py_irpc.c',
293         deps='RPC_NDR_IRPC pytalloc-util pyrpc_util',
294         realname='samba/dcerpc/irpc.so'
295         )
296
297 bld.SAMBA_PYTHON('python_winbind',
298         source='gen_ndr/py_winbind.c',
299         deps='RPC_NDR_WINBIND pytalloc-util pyrpc_util python_netlogon',
300         realname='samba/dcerpc/winbind.so'
301         )
302
303 bld.SAMBA_PYTHON('python_idmap',
304         source='../../librpc/gen_ndr/py_idmap.c',
305         deps='NDR_IDMAP pytalloc-util pyrpc_util',
306         realname='samba/dcerpc/idmap.so'
307         )
308
309
310 bld.SAMBA_PYTHON('python_drsuapi',
311         source='../../librpc/gen_ndr/py_drsuapi.c',
312         deps='RPC_NDR_DRSUAPI pytalloc-util pyrpc_util',
313         realname='samba/dcerpc/drsuapi.so'
314         )
315
316 bld.SAMBA_PYTHON('python_dcerpc_security',
317         source='../../librpc/gen_ndr/py_security.c',
318         deps='pytalloc-util pyrpc_util NDR_SECURITY',
319         realname='samba/dcerpc/security.so'
320         )
321
322 bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
323         source='../../librpc/gen_ndr/py_drsblobs.c',
324         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DRSBLOBS',
325         realname='samba/dcerpc/drsblobs.so'
326         )
327
328 bld.SAMBA_PYTHON('python_dcerpc_dnsp',
329         source='../../librpc/gen_ndr/py_dnsp.c',
330         deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DNSP',
331         realname='samba/dcerpc/dnsp.so'
332         )
333
334
335 bld.SAMBA_PYTHON('python_dcerpc_xattr',
336         source='../../librpc/gen_ndr/py_xattr.c',
337         deps='pytalloc-util pyrpc_util RPC_NDR_XATTR',
338         realname='samba/dcerpc/xattr.so'
339         )
340
341 bld.SAMBA_PYTHON('python_netlogon',
342         source='../../librpc/gen_ndr/py_netlogon.c',
343         deps='RPC_NDR_NETLOGON pytalloc-util pyrpc_util',
344         realname='samba/dcerpc/netlogon.so'
345         )
346
347 bld.SAMBA_SCRIPT('python_dcerpc_init',
348                  pattern='rpc/dcerpc.py',
349                  installdir='python/samba/dcerpc',
350                  installname='__init__.py')
351
352 bld.INSTALL_FILES('${PYTHONARCHDIR}/samba/dcerpc', 'rpc/dcerpc.py', destname='__init__.py')