lib: Make genrand independent
[Samba.git] / lib / util / wscript_build
blob1014c751a3aecf7b99cfdcea449453a1b3733055
1 #!/usr/bin/env python
3 # Please add any new SAMBA_SUBSYSTEM/SAMBA_LIBRARY to the bottom of the file
4 # unless they are also required to build standalone ctdb.
6 bld.SAMBA_LIBRARY('time-basic',
7 source='time_basic.c',
8 deps='replace',
9 private_library=True,
10 local_include=False)
12 bld.SAMBA_SUBSYSTEM('tini',
13 source='tini.c',
14 deps='',
15 local_include=False)
17 bld.SAMBA_SUBSYSTEM('tiniparser',
18 source='tiniparser.c',
19 deps='tini',
20 local_include=False)
22 bld.SAMBA_SUBSYSTEM('strv',
23 source='strv.c',
24 deps='talloc',
25 local_include=False)
27 bld.SAMBA_SUBSYSTEM('close-low-fd',
28 source='close_low_fd.c',
29 deps='replace',
30 local_include=False)
32 samba_debug_add_deps = ''
34 if bld.CONFIG_SET('HAVE_GPFS'):
35 bld.SAMBA_SUBSYSTEM('gpfswrap',
36 source='gpfswrap.c',
37 deps='replace',
38 local_include=False,
39 includes=bld.CONFIG_GET('CPPPATH_GPFS'))
40 samba_debug_add_deps += ' gpfswrap'
42 bld.SAMBA_LIBRARY('samba-debug',
43 source='debug.c',
44 deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps,
45 public_deps='systemd systemd-journal lttng-ust',
46 local_include=False,
47 private_library=True)
49 bld.SAMBA_LIBRARY('socket-blocking',
50 source='blocking.c',
51 local_include=False,
52 private_library=True)
54 bld.SAMBA_SUBSYSTEM('samba-util-core',
55 source='''xfile.c data_blob.c util_file.c time.c
56 signal.c util.c idtree.c fault.c
57 substitute.c''',
58 deps='''time-basic samba-debug socket-blocking talloc
59 tevent execinfo pthread''',
60 local_include=False)
62 if not bld.env.SAMBA_UTIL_CORE_ONLY:
64 bld.env.public_headers_skip.append('charset_compat.h')
66 bld.SAMBA_LIBRARY('genrand',
67 source='genrand.c',
68 deps='time-basic socket-blocking LIBCRYPTO',
69 local_include=False,
70 private_library=True)
72 bld.SAMBA_LIBRARY('samba-util',
73 source='''talloc_stack.c smb_threads.c
74 rbtree.c rfc1738.c become_daemon.c system.c select.c getpass.c
75 genrand_util.c fsusage.c
76 params.c util_id.c util_net.c
77 util_strlist.c util_paths.c idtree_random.c base64.c
78 util_str.c util_str_common.c ms_fnmatch.c
79 server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
80 tevent_debug.c util_process.c memcache.c''',
81 deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser genrand',
83 public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd systemd-daemon',
84 public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h genrand.h',
85 header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
86 local_include=False,
87 vnum='0.0.1',
88 pc_files='samba-util.pc'
91 bld.SAMBA_LIBRARY('samba-modules',
92 source='modules.c',
93 deps='errors samba-util',
94 local_include=False,
95 private_library=True)
97 bld.SAMBA_LIBRARY('asn1util',
98 source='asn1.c',
99 deps='talloc samba-util',
100 private_library=True,
101 local_include=False)
104 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
105 source='unix_privs.c',
106 autoproto='unix_privs.h',
107 deps='replace talloc',
108 local_include=False,
112 bld.SAMBA_LIBRARY('util_tdb',
113 source='util_tdb.c',
114 local_include=False,
115 public_deps='tdb talloc',
116 private_library=True
119 bld.SAMBA_LIBRARY('talloc_report',
120 source='talloc_report.c',
121 local_include=False,
122 public_deps='talloc',
123 private_library=True
126 bld.SAMBA_LIBRARY('tevent-util',
127 source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
128 local_include=False,
129 public_deps='tevent errors',
130 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
131 header_path=[ ('*', 'util') ],
132 pc_files=[],
133 vnum='0.0.1'
136 bld.SAMBA_LIBRARY('util_setid',
137 source='setid.c',
138 local_include=False,
139 private_library=True
142 bld.SAMBA_SUBSYSTEM('util_ldb',
143 source='util_ldb.c',
144 local_include=False,
145 public_deps='ldb',
146 public_headers='util_ldb.h'
150 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
151 source='util_runcmd.c',
152 local_include=False,
153 public_deps='tevent'
156 bld.SAMBA_SUBSYSTEM('UTIL_PW',
157 source='util_pw.c',
158 local_include=False,
159 public_deps='talloc'
162 bld.SAMBA_LIBRARY('server_id_db',
163 source='server_id_db.c',
164 deps='talloc tdb strv util_tdb tdb-wrap samba-util',
165 local_include=False,
166 private_library=True)
168 bld.SAMBA_LIBRARY('iov_buf',
169 source='iov_buf.c',
170 local_include=False,
171 private_library=True)