3e591a0a0d57f0af13b3f799dbc62e909735002e
[nivanova/samba-autobuild/.git] / source4 / dsdb / samdb / ldb_modules / wscript_build
1 #!/usr/bin/env python
2
3 bld.SAMBA_LIBRARY('dsdb-module',
4         source=[],
5         deps='DSDB_MODULE_HELPERS DSDB_MODULE_HELPER_RIDALLOC',
6         private_library=True,
7         grouping_library=True)
8
9 bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPERS',
10         source='util.c acl_util.c schema_util.c netlogon.c audit_util.c',
11         autoproto='util_proto.h',
12         deps='ldb ndr samdb-common samba-security audit_logging'
13         )
14
15 bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPER_RIDALLOC',
16         source='ridalloc.c',
17         autoproto='ridalloc.h',
18         deps='MESSAGING',
19         )
20
21 # Build the cmocka unit tests
22 bld.SAMBA_BINARY('test_unique_object_sids',
23         source='tests/test_unique_object_sids.c',
24         deps='''
25             talloc
26             samdb
27             cmocka
28             DSDB_MODULE_HELPERS
29         ''',
30         install=False)
31 bld.SAMBA_BINARY('test_encrypted_secrets',
32         source='tests/test_encrypted_secrets.c',
33         deps='''
34             talloc
35             samba-util
36             samdb-common
37             samdb
38             cmocka
39             gnutls
40             DSDB_MODULE_HELPERS
41         ''',
42         install=False)
43 #
44 # These tests require JANSSON, so we only build them if we are doing a selftest
45 # build.
46 #
47 if bld.CONFIG_GET('ENABLE_SELFTEST'):
48     bld.SAMBA_BINARY('test_audit_util',
49             source='tests/test_audit_util.c',
50             deps='''
51                 talloc
52                 samba-util
53                 samdb-common
54                 samdb
55                 cmocka
56                 audit_logging
57                 DSDB_MODULE_HELPERS
58             ''',
59             install=False)
60     bld.SAMBA_BINARY('test_audit_log',
61             source='tests/test_audit_log.c',
62             deps='''
63                 talloc
64                 samba-util
65                 samdb-common
66                 samdb
67                 cmocka
68                 audit_logging
69                 DSDB_MODULE_HELPERS
70             ''',
71             install=False)
72
73 if bld.AD_DC_BUILD_IS_ENABLED():
74     bld.PROCESS_SEPARATE_RULE("server")