build: Bring DYNCONFIG into samba-util library to avoid symbol duplication
[Samba.git] / lib / util / wscript_build
blob1186cd7c102e3a225901b19bd7d925fc2bdd105a
1 #!/usr/bin/env python
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 data_blob.c
7 util_file.c time.c rbtree.c rfc1738.c select.c
8 genrand.c fsusage.c blocking.c become_daemon.c
9 signal.c system.c params.c util.c util_id.c util_net.c
10 util_strlist.c idtree.c debug.c fault.c base64.c
11 util_str_common.c''',
12 public_deps='talloc pthread LIBCRYPTO',
13 # until we get all the dependencies in this library in common
14 # we need to allow this library to be built with unresolved symbols
15 allow_undefined_symbols=True,
16 local_include=False,
17 public_headers='debug.h',
18 header_path= [('*', 'util') ],
19 private_library=True
22 if bld.env._SAMBA_BUILD_ == 4:
23 bld.SAMBA_LIBRARY('samba-util',
24 source='''dprintf.c
25 ms_fnmatch.c parmlist.c substitute.c util_str.c
26 ''',
27 deps='samba-util-common DYNCONFIG',
28 public_deps='talloc CHARSET execinfo uid_wrapper',
29 public_headers='attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h',
30 header_path= [ ('dlinklist.h util.h', '.'), ('*', 'util') ],
31 local_include=False,
32 vnum='0.0.1',
33 pc_files='samba-util.pc'
37 bld.SAMBA_LIBRARY('asn1util',
38 source='asn1.c',
39 deps='talloc samba-util-common',
40 private_library=True,
41 local_include=False)
44 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
45 source='unix_privs.c',
46 autoproto='unix_privs.h',
47 deps='replace talloc',
48 local_include=False,
52 bld.SAMBA_LIBRARY('wrap_xattr',
53 source='wrap_xattr.c',
54 public_deps='attr',
55 deps='talloc',
56 local_include=False,
57 private_library=True
61 bld.SAMBA_LIBRARY('UTIL_TDB',
62 source='util_tdb.c',
63 local_include=False,
64 public_deps='tdb talloc',
65 private_library=True
68 bld.SAMBA_SUBSYSTEM('UTIL_TEVENT',
69 source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
70 local_include=False,
71 public_deps='tevent',
72 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
73 header_path=[ ('*', 'util') ],
77 if bld.env._SAMBA_BUILD_ == 4:
78 bld.SAMBA_SUBSYSTEM('UTIL_LDB',
79 source='util_ldb.c',
80 local_include=False,
81 public_deps='ldb',
82 public_headers='util_ldb.h'
86 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
87 source='util_runcmd.c',
88 local_include=False,
89 public_deps='tevent'
92 bld.SAMBA_SUBSYSTEM('UTIL_PW',
93 source='util_pw.c',
94 local_include=False,
95 public_deps='talloc'