util: Add pidfile.* to samba-util-core
[Samba.git] / lib / util / wscript_build
blob989db362ec76986da68177c172c154a0044dec2f
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 bld.SAMBA_LIBRARY('sys_rw',
33 source='sys_rw.c sys_rw_data.c',
34 deps='replace iov_buf',
35 local_include=False,
36 private_library=True)
38 samba_debug_add_deps = ''
39 samba_debug_add_inc = ''
41 if bld.CONFIG_SET('HAVE_GPFS'):
42 bld.SAMBA_SUBSYSTEM('gpfswrap',
43 source='gpfswrap.c',
44 deps='replace',
45 local_include=False,
46 includes=bld.CONFIG_GET('CPPPATH_GPFS'))
47 samba_debug_add_deps += ' gpfswrap'
48 samba_debug_add_inc += bld.CONFIG_GET('CPPPATH_GPFS')
50 bld.SAMBA_LIBRARY('samba-debug',
51 source='debug.c',
52 deps='replace time-basic close-low-fd talloc socket-blocking' + samba_debug_add_deps,
53 public_deps='systemd systemd-journal lttng-ust',
54 local_include=False,
55 includes=samba_debug_add_inc,
56 private_library=True)
58 bld.SAMBA_LIBRARY('socket-blocking',
59 source='blocking.c',
60 local_include=False,
61 private_library=True)
63 bld.SAMBA_LIBRARY('talloc_report',
64 source='talloc_report.c',
65 local_include=False,
66 public_deps='talloc',
67 private_library=True
70 bld.SAMBA_SUBSYSTEM('samba-util-core',
71 source='''data_blob.c util_file.c time.c
72 signal.c util.c idtree.c fault.c
73 substitute.c util_process.c util_strlist.c
74 strv_util.c bitmap.c select.c pidfile.c''',
75 deps='''time-basic samba-debug socket-blocking talloc
76 tevent execinfo pthread strv''',
77 local_include=False)
79 bld.SAMBA_LIBRARY('iov_buf',
80 source='iov_buf.c',
81 deps='talloc',
82 local_include=False,
83 private_library=True)
85 bld.SAMBA_LIBRARY('msghdr',
86 source='msghdr.c',
87 deps='replace iov_buf',
88 local_include=False,
89 private_library=True)
91 if bld.env.SAMBA_UTIL_CORE_ONLY:
93 bld.SAMBA_LIBRARY('tevent-util',
94 source='tevent_unix.c',
95 local_include=False,
96 deps='tevent',
97 private_library=True)
99 else:
101 bld.env.public_headers_skip.append('charset_compat.h')
103 bld.SAMBA_LIBRARY('genrand',
104 source='genrand.c',
105 deps='replace socket-blocking sys_rw',
106 local_include=False,
107 private_library=True)
109 bld.SAMBA_BINARY('genrandperf',
110 source='tests/genrandperf.c',
111 deps='genrand replace',
112 local_include=False,
113 install=False)
115 bld.SAMBA_LIBRARY('samba-util',
116 source='''talloc_stack.c smb_threads.c
117 rbtree.c rfc1738.c become_daemon.c system.c getpass.c
118 genrand_util.c fsusage.c
119 params.c util_id.c util_net.c
120 util_strlist_v3.c util_paths.c
121 idtree_random.c base64.c
122 util_str.c util_str_common.c ms_fnmatch.c
123 server_id.c dprintf.c
124 tevent_debug.c memcache.c unix_match.c tfork.c''',
125 deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser genrand',
126 public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd systemd-daemon',
127 public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h genrand.h tfork.h',
128 header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
129 local_include=False,
130 vnum='0.0.1',
131 pc_files='samba-util.pc'
134 bld.SAMBA_LIBRARY('samba-modules',
135 source='modules.c',
136 deps='samba-errors samba-util',
137 local_include=False,
138 private_library=True)
140 bld.SAMBA_LIBRARY('asn1util',
141 source='asn1.c',
142 deps='talloc samba-util',
143 private_library=True,
144 local_include=False)
147 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
148 source='unix_privs.c',
149 autoproto='unix_privs.h',
150 deps='replace talloc',
151 local_include=False,
155 bld.SAMBA_LIBRARY('util_tdb',
156 source='util_tdb.c',
157 local_include=False,
158 public_deps='tdb talloc',
159 private_library=True
162 bld.SAMBA_LIBRARY('tevent-util',
163 source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
164 local_include=False,
165 public_deps='tevent samba-errors',
166 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
167 header_path=[ ('*', 'util') ],
168 pc_files=[],
169 vnum='0.0.1'
172 bld.SAMBA_LIBRARY('util_setid',
173 source='setid.c',
174 local_include=False,
175 private_library=True
178 bld.SAMBA_SUBSYSTEM('util_ldb',
179 source='util_ldb.c',
180 local_include=False,
181 public_deps='ldb',
182 public_headers='util_ldb.h'
186 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
187 source='util_runcmd.c',
188 local_include=False,
189 public_deps='tevent'
192 bld.SAMBA_SUBSYSTEM('UTIL_PW',
193 source='util_pw.c',
194 local_include=False,
195 public_deps='talloc'
198 bld.SAMBA_LIBRARY('server_id_db',
199 source='server_id_db.c',
200 deps='talloc tdb strv util_tdb tdb-wrap samba-util',
201 local_include=False,
202 private_library=True)
204 bld.SAMBA_SUBSYSTEM('access',
205 source='access.c',
206 deps='interfaces samba-util',
207 local_include=False)
209 bld.SAMBA_SUBSYSTEM('util_str_escape',
210 source='util_str_escape.c',
211 deps='talloc',
212 local_include=False)