s4-dsdb: make SAMDB_COMMON into a private library
[abartlet/samba.git/.git] / source4 / dsdb / wscript_build
index dbe1f483a58bcf1ea53968b604f62877a1557c7d..6955eb49d364baafebcbc21dbe6d279747ffcb84 100644 (file)
@@ -2,30 +2,33 @@
 
 bld.RECURSE('samdb/ldb_modules')
 
-bld.SAMBA_SUBSYSTEM('SAMDB',
+bld.SAMBA_LIBRARY('SAMDB',
        source='samdb/samdb.c samdb/samdb_privilege.c samdb/cracknames.c repl/replicated_objects.c',
        autoproto='samdb/samdb_proto.h',
-       public_deps='HEIMDAL_KRB5',
-       deps='LIBNDR NDR_DRSUAPI NDR_DRSBLOBS NSS_WRAPPER auth_system_session LIBCLI_AUTH LIBNDR SAMDB_SCHEMA LDB_WRAP SAMDB_COMMON LIBCLI_DRSUAPI LIBCLI_LDAP_NDR LIBSAMBA-UTIL'
+       public_deps='krb5',
+       deps='LIBNDR NDR_DRSUAPI NDR_DRSBLOBS NSS_WRAPPER auth_system_session LIBCLI_AUTH LIBNDR SAMDB_SCHEMA LDBSAMBA SAMDB_COMMON LIBCLI_DRSUAPI LIBCLI_LDAP_NDR LIBSAMBA-UTIL com_err KERBEROS CREDENTIALS CREDENTIALS_SECRETS',
+       vnum='0.0.1'
        )
 
 
-bld.SAMBA_SUBSYSTEM('SAMDB_COMMON',
-       source='common/util.c common/dsdb_dn.c common/dsdb_access.c ../../libds/common/flag_mapping.c',
-       autoproto='common/proto.h',
-       deps='ldb NDR_DRSBLOBS LIBCLI_LDAP_NDR UTIL_LDB LIBCLI_AUTH DSDB_MODULE_HELPERS'
-       )
+bld.SAMBA_LIBRARY('SAMDB_COMMON',
+                  source='common/util.c common/util_samr.c common/dsdb_dn.c common/dsdb_access.c ../../libds/common/flag_mapping.c',
+                  autoproto='common/proto.h',
+                  private_library=True,
+                  deps='ldb NDR_DRSBLOBS UTIL_LDB LIBCLI_AUTH LIBSAMBA-HOSTCONFIG'
+                  )
 
 
 bld.SAMBA_SUBSYSTEM('SAMDB_SCHEMA',
-       source='schema/schema_init.c schema/schema_set.c schema/schema_query.c schema/schema_syntax.c schema/schema_description.c schema/schema_convert_to_ol.c schema/schema_inferiors.c schema/schema_prefixmap.c schema/schema_info_attr.c',
+       source='schema/schema_init.c schema/schema_set.c schema/schema_query.c schema/schema_syntax.c schema/schema_description.c schema/schema_convert_to_ol.c schema/schema_inferiors.c schema/schema_prefixmap.c schema/schema_info_attr.c schema/schema_filtered.c schema/dsdb_dn.c',
        autoproto='schema/proto.h',
-       deps='SAMDB_COMMON NDR_DRSUAPI NDR_DRSBLOBS LDBSAMBA tevent'
+       # FIXME: Why does this use DSDB_MODULE_HELPERS?
+       deps='SAMDB_COMMON NDR_DRSUAPI NDR_DRSBLOBS LDBSAMBA tevent DSDB_MODULE_HELPERS'
        )
 
 
 bld.SAMBA_MODULE('DREPL_SRV',
-       source='repl/drepl_service.c repl/drepl_periodic.c repl/drepl_partitions.c repl/drepl_out_pull.c repl/drepl_out_helpers.c repl/drepl_notify.c repl/drepl_ridalloc.c',
+       source='repl/drepl_service.c repl/drepl_periodic.c repl/drepl_partitions.c repl/drepl_out_pull.c repl/drepl_out_helpers.c repl/drepl_notify.c repl/drepl_ridalloc.c repl/drepl_extended.c repl/drepl_fsmo.c repl/drepl_secret.c repl/drepl_replica.c',
        autoproto='repl/drepl_service_proto.h',
        subsystem='service',
        init_function='server_service_drepl_init',
@@ -38,7 +41,7 @@ bld.SAMBA_MODULE('KCC_SRV',
        autoproto='kcc/kcc_service_proto.h',
        subsystem='service',
        init_function='server_service_kcc_init',
-       deps='SAMDB process_model RPC_NDR_DRSUAPI'
+       deps='SAMDB process_model RPC_NDR_IRPC RPC_NDR_DRSUAPI'
        )
 
 
@@ -51,6 +54,9 @@ bld.SAMBA_MODULE('DNS_UPDATE_SRV',
 
 bld.SAMBA_PYTHON('python_dsdb',
                  source='pydsdb.c',
-                 deps='SAMDB pyldb',
+                                # the dependency on dcerpc here is because gensec
+                                # depends on dcerpc but the waf circular dependency finder
+                                # removes it so we end up with unresolved symbols.
+                 deps='SAMDB pyldb_util dcerpc com_err',
                  realname='samba/dsdb.so'
                  )