lib: Move "iov_buf.[ch]" to lib/util
[kai/samba-autobuild/.git] / lib / util / wscript_build
1 #!/usr/bin/env python
2
3 bld.SAMBA_SUBSYSTEM('time-basic',
4                     source='time_basic.c',
5                     deps='replace',
6                     local_include=False)
7
8 bld.SAMBA_SUBSYSTEM('tini',
9                     source='tini.c',
10                     deps='',
11                     local_include=False)
12
13 bld.SAMBA_SUBSYSTEM('tiniparser',
14                     source='tiniparser.c',
15                     deps='tini',
16                     local_include=False)
17
18 bld.SAMBA_SUBSYSTEM('strv',
19                     source='strv.c',
20                     deps='talloc',
21                     local_include=False)
22
23 bld.SAMBA_SUBSYSTEM('close-low-fd',
24                     source='close_low_fd.c',
25                     deps='replace',
26                     local_include=False)
27
28 bld.SAMBA_LIBRARY('samba-debug',
29                   source='debug.c',
30                   deps='replace time-basic close-low-fd talloc socket-blocking',
31                   local_include=False,
32                   private_library=True)
33
34 bld.SAMBA_LIBRARY('socket-blocking',
35                   source='blocking.c',
36                   local_include=False,
37                   private_library=True)
38
39 bld.SAMBA_LIBRARY('iov_buf',
40                   source='iov_buf.c',
41                   local_include=False,
42                   private_library=True)
43
44 bld.SAMBA_SUBSYSTEM('samba-util-core',
45                     source='''xfile.c data_blob.c util_file.c time.c
46                               signal.c util.c idtree.c fault.c
47                               substitute.c''',
48                     deps='''time-basic samba-debug socket-blocking talloc
49                             tevent execinfo pthread''',
50                     local_include=False)
51
52 if not bld.env.SAMBA_UTIL_CORE_ONLY:
53
54     bld.env.public_headers_skip.append('charset_compat.h')
55
56     bld.SAMBA_LIBRARY('samba-util',
57                   source='''talloc_stack.c smb_threads.c
58                     rbtree.c rfc1738.c become_daemon.c system.c select.c getpass.c
59                     genrand.c fsusage.c
60                     params.c util_id.c util_net.c
61                     util_strlist.c util_paths.c idtree_random.c base64.c
62                     util_str.c util_str_common.c ms_fnmatch.c
63                     server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
64                     tevent_debug.c util_process.c memcache.c''',
65                   deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser',
66
67                   public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd-daemon',
68                   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',
69                   header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
70                   local_include=False,
71                   vnum='0.0.1',
72                   pc_files='samba-util.pc'
73                   )
74
75     bld.SAMBA_LIBRARY('samba-modules',
76                       source='modules.c',
77                       deps='errors samba-util',
78                       local_include=False,
79                       private_library=True)
80
81     bld.SAMBA_LIBRARY('asn1util',
82                       source='asn1.c',
83                       deps='talloc samba-util',
84                       private_library=True,
85                       local_include=False)
86
87
88     bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
89                         source='unix_privs.c',
90                         autoproto='unix_privs.h',
91                         deps='replace talloc',
92                         local_include=False,
93                         )
94
95
96     bld.SAMBA_LIBRARY('util_tdb',
97                       source='util_tdb.c',
98                       local_include=False,
99                       public_deps='tdb talloc',
100                       private_library=True
101                       )
102
103     bld.SAMBA_LIBRARY('talloc_report',
104                       source='talloc_report.c',
105                       local_include=False,
106                       public_deps='talloc',
107                       private_library=True
108                       )
109
110     if not bld.env.disable_ntdb:
111         bld.SAMBA_LIBRARY('util_ntdb',
112                           source='util_ntdb.c',
113                           local_include=False,
114                           public_deps='ntdb talloc samba-util samba-hostconfig',
115                           private_library=True
116                           )
117
118     bld.SAMBA_LIBRARY('tevent-util',
119                       source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
120                       local_include=False,
121                       public_deps='tevent errors',
122                       public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
123                       header_path=[ ('*', 'util') ],
124                       pc_files=[],
125                       vnum='0.0.1'
126                       )
127
128     bld.SAMBA_LIBRARY('util_setid',
129                       source='setid.c',
130                       local_include=False,
131                       private_library=True
132                       )
133
134     bld.SAMBA_SUBSYSTEM('util_ldb',
135                         source='util_ldb.c',
136                         local_include=False,
137                         public_deps='ldb',
138                         public_headers='util_ldb.h'
139                         )
140
141
142     bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
143                         source='util_runcmd.c',
144                         local_include=False,
145                         public_deps='tevent'
146                         )
147
148     bld.SAMBA_SUBSYSTEM('UTIL_PW',
149                         source='util_pw.c',
150                         local_include=False,
151                         public_deps='talloc'
152                         )
153
154     bld.SAMBA_LIBRARY('server_id_db',
155                       source='server_id_db.c',
156                       deps='talloc tdb strv util_tdb tdb-wrap samba-util',
157                       local_include=False,
158                       private_library=True)