build: added target directory options
[nivanova/samba-autobuild/.git] / source4 / lib / ldb / wscript
1 srcdir = '.'
2 blddir = 'build'
3
4 LIBTDB_DIR='../../../lib/tdb'
5 LIBTALLOC_DIR='../../../lib/talloc'
6
7 def set_options(opt):
8     opt.recurse(LIBTDB_DIR)
9     opt.recurse(LIBTALLOC_DIR)
10
11 def configure(conf):
12     conf.sub_config(LIBTDB_DIR)
13     conf.sub_config(LIBTALLOC_DIR)
14     conf.SAMBA_CONFIG_H()
15
16 def build(bld):
17     bld.add_subdirs(LIBTDB_DIR)
18     bld.add_subdirs(LIBTALLOC_DIR)
19
20     LDB_TDB_SRC = bld.SUBDIR('ldb_tdb',
21                              '''ldb_tdb.c ldb_pack.c ldb_search.c ldb_index.c
22                              ldb_cache.c ldb_tdb_wrap.c''')
23     print "LDB_TDB_SRC=%s" % LDB_TDB_SRC
24
25     LDB_MAP_SRC = bld.SUBDIR('ldb_map',
26                              'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c')
27
28     COMMON_SRC = bld.SUBDIR('common',
29                             '''ldb.c ldb_ldif.c ldb_parse.c ldb_msg.c ldb_utf8.c
30                             ldb_debug.c ldb_modules.c ldb_dn.c ldb_match.c
31                             ldb_attributes.c attrib_handlers.c ldb_controls.c qsort.c''')
32
33     MODULES_SRC = bld.SUBDIR('modules',
34                              'rdn_name.c asq.c paged_results.c sort.c')
35
36     bld.SAMBA_LIBRARY('ldb',
37                       LDB_TDB_SRC + ' ' + COMMON_SRC + ' ' + MODULES_SRC,
38                       'tdb talloc',
39                       'include')
40
41     bld.SAMBA_BINARY('ldbadd',
42                      'tools/ldbadd.c',
43                      'ldb')