build: move idtree.c into samba-util-common
[samba.git] / lib / util / wscript_build
1 #!/usr/bin/env python
2
3 # as we move files into common between samba-util and samba-util3, move them here.
4 # Both samba-util and samba-util3 depend on this private library
5 bld.SAMBA_LIBRARY('samba-util-common',
6                   source='''talloc_stack.c smb_threads.c xfile.c
7                   util_file.c time.c rbtree.c rfc1738.c select.c
8                   genrand.c fsusage.c blocking.c become_daemon.c
9                   data_blob.c signal.c system.c params.c util.c util_id.c util_net.c
10                   util_strlist.c idtree.c''',
11                   public_deps='talloc pthread',
12                   # until we get all the dependencies in this library in common
13                   # we need to allow this library to be built with unresolved symbols
14                   allow_undefined_symbols=True,
15                   local_include=False,
16                   private_library=True
17                   )
18
19 if bld.env._SAMBA_BUILD_ == 4:
20     bld.SAMBA_LIBRARY('samba-util',
21                       source='''debug.c dprintf.c fault.c
22                       ms_fnmatch.c parmlist.c substitute.c util_str.c
23                       ''',
24                       deps='samba-util-common',
25                       public_deps='talloc LIBCRYPTO CHARSET execinfo uid_wrapper',
26                       public_headers='attr.h byteorder.h data_blob.h debug.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h',
27                       header_path= [ ('dlinklist.h util.h', '.'), ('*', 'util') ],
28                       local_include=False,
29                       vnum='0.0.1',
30                       pc_files='samba-util.pc'
31                       )
32
33
34 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
35                     source='asn1.c',
36                     deps='talloc',
37                     local_include=False)
38
39
40 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
41         source='unix_privs.c',
42         autoproto='unix_privs.h',
43         deps='replace talloc',
44         local_include=False,
45         )
46
47
48 bld.SAMBA_LIBRARY('wrap_xattr',
49         source='wrap_xattr.c',
50         public_deps='attr',
51         deps='talloc',
52         local_include=False,
53         private_library=True
54         )
55
56
57 bld.SAMBA_SUBSYSTEM('UTIL_TDB',
58         source='util_tdb.c',
59         local_include=False,
60         public_deps='tdb talloc'
61         )
62
63 bld.SAMBA_SUBSYSTEM('UTIL_TEVENT',
64         source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
65         local_include=False,
66         public_deps='tevent',
67         public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
68         header_path=[ ('*', 'util') ],
69         )
70
71
72 if bld.env._SAMBA_BUILD_ == 4:
73     bld.SAMBA_SUBSYSTEM('UTIL_LDB',
74         source='util_ldb.c',
75         local_include=False,
76         public_deps='ldb',
77         public_headers='util_ldb.h'
78         )
79
80
81 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
82         source='util_runcmd.c',
83         local_include=False,
84         public_deps='tevent'
85         )
86