2011-02-03 13:08:37 +11:00
#!/usr/bin/env python
# top level waf build script for samba4
2018-02-02 16:34:33 +02:00
from waflib import Options
2011-02-03 13:08:37 +11:00
import os
srcdir = "."
import samba_version
2011-02-21 11:18:21 +11:00
bld.env.suffix3 = "3"
2012-05-30 13:01:18 +02:00
bld.env.suffix4 = "4"
2011-02-21 11:18:21 +11:00
2011-02-03 13:08:37 +11:00
# create separate build groups for building the asn1 and et compiler, then
# building the C from ASN1 and IDL, and finally the main build process
bld.SETUP_BUILD_GROUPS()
bld.AUTOCLEANUP_STALE_FILES()
2011-02-28 15:48:25 +11:00
# enable building of public headers in the build tree
bld.env.build_public_headers = 'include/public'
2011-03-03 16:34:57 +11:00
# these are includes which appear in public headers, but with #ifdef conditional
# compilation, so they are safe
2014-01-15 17:18:13 +13:00
bld.env.public_headers_skip = ['lib/param/param_proto.h', 'lib/param/param_functions.h']
2011-03-03 16:34:57 +11:00
2017-12-12 11:01:51 +01:00
version=samba_version.load_version(bld.env, is_install=bld.is_install)
2011-02-03 13:08:37 +11:00
bld.SAMBA_MKVERSION('version.h')
# bld.ENABLE_MAGIC_ORDERING()
2014-01-15 18:11:41 +13:00
bld.env.ABS_TOP_SRCDIR = bld.srcnode.abspath() + '/docs-xml'
2019-01-29 08:45:26 -05:00
bld.env.ABS_TOP_BUILDDIR = bld.bldnode.abspath() + '/docs-xml'
2014-01-15 18:11:41 +13:00
bld.CONFIGURE_FILE('docs-xml/build/catalog.xml',
ABS_TOP_BUILDDIR = bld.env.ABS_TOP_BUILDDIR,
ABS_TOP_SRCDIR=bld.env.ABS_TOP_SRCDIR)
2017-12-12 11:01:51 +01:00
bld.env.DOC_VERSION=version.STRING
bld.CONFIGURE_FILE('docs-xml/build/DTD/samba.build.version',
DOC_VERSION=bld.env.DOC_VERSION)
2014-01-15 18:11:41 +13:00
bld.RECURSE('docs-xml')
2019-10-31 16:28:28 +13:00
# This needs to be earlier than anything containing IDL
# That in turn allows the build rules for fuzz_ndr_X to be
# near the code
bld.RECURSE('lib/fuzzing')
2011-02-03 13:08:37 +11:00
bld.RECURSE('lib/replace')
2011-05-02 13:02:17 +10:00
bld.RECURSE('lib/socket')
2011-02-03 13:08:37 +11:00
bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tevent')
2014-08-25 19:38:12 +02:00
bld.RECURSE('lib/texpect')
2011-09-01 12:45:38 +10:00
bld.RECURSE('lib/addns')
2011-07-05 10:01:32 +10:00
bld.RECURSE('lib/ldb')
2011-07-08 09:19:43 +10:00
bld.RECURSE('lib/param')
2018-10-08 11:14:37 -04:00
bld.RECURSE('lib/printer_driver')
2018-04-10 06:45:47 +12:00
bld.RECURSE('lib/audit_logging')
2019-06-28 23:05:43 +10:00
bld.RECURSE('lib/messaging')
2011-06-21 12:48:22 +10:00
bld.RECURSE('dynconfig')
2011-02-03 13:08:37 +11:00
bld.RECURSE('lib/util/charset')
2012-12-28 15:37:14 +01:00
bld.RECURSE('python')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/param')
bld.RECURSE('source4/librpc')
bld.RECURSE('source4/dsdb')
2020-11-20 15:27:17 +01:00
bld.RECURSE('source4/samba')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/cluster')
bld.RECURSE('source4/libnet')
bld.RECURSE('source4/auth')
2011-02-09 16:05:54 +11:00
bld.RECURSE('auth')
2011-04-16 15:41:50 +10:00
bld.RECURSE('auth/kerberos')
2011-02-03 13:08:37 +11:00
bld.RECURSE('nsswitch')
bld.RECURSE('nsswitch/libwbclient')
bld.RECURSE('source4/lib/samba3')
bld.RECURSE('source4/lib/socket')
2011-07-05 10:01:32 +10:00
bld.RECURSE('lib/ldb-samba')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/lib/tls')
bld.RECURSE('source4/lib/registry')
bld.RECURSE('source4/lib/messaging')
bld.RECURSE('source4/lib/events')
2014-07-17 18:04:35 -04:00
if bld.CHECK_FOR_THIRD_PARTY():
2014-10-17 00:48:20 -07:00
bld.RECURSE('third_party')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/lib/stream')
2014-04-14 22:11:12 +02:00
bld.RECURSE('lib/afs')
2011-02-03 13:08:37 +11:00
bld.RECURSE('lib/util')
2012-03-10 21:33:11 +01:00
bld.RECURSE('lib/tdb_wrap')
2011-02-03 13:08:37 +11:00
bld.RECURSE('lib/tdr')
bld.RECURSE('lib/tsocket')
bld.RECURSE('lib/crypto')
bld.RECURSE('lib/torture')
2014-02-07 15:57:14 +13:00
bld.RECURSE('libgpo')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/lib/com')
bld.RECURSE('source4/dns_server')
bld.RECURSE('source4/echo_server')
bld.RECURSE('source4/smb_server')
bld.RECURSE('source4/rpc_server')
bld.RECURSE('source4/ldap_server')
bld.RECURSE('source4/winbind')
bld.RECURSE('source4/nbt_server')
bld.RECURSE('source4/wrepl_server')
bld.RECURSE('source4/cldap_server')
bld.RECURSE('source4/ntp_signd')
2019-03-23 02:57:06 +01:00
bld.RECURSE('source4/utils/oLschema2ldif')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/ntvfs')
bld.RECURSE('source4/torture')
bld.RECURSE('librpc')
2011-09-15 12:52:49 +02:00
bld.RECURSE('source4')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/libcli')
bld.RECURSE('libcli/smb')
2011-04-29 16:57:41 +10:00
bld.RECURSE('libcli/util')
2011-02-03 13:08:37 +11:00
bld.RECURSE('libcli/cldap')
bld.RECURSE('lib/smbconf')
bld.RECURSE('lib/async_req')
2012-05-11 22:11:42 +02:00
bld.RECURSE('lib/dbwrap')
2011-02-03 13:08:37 +11:00
bld.RECURSE('libcli/security')
bld.RECURSE('libcli/ldap')
bld.RECURSE('libcli/nbt')
bld.RECURSE('libcli/netlogon')
bld.RECURSE('libcli/auth')
2011-12-07 16:03:04 +11:00
bld.RECURSE('libcli/lsarpc')
2011-02-03 13:08:37 +11:00
bld.RECURSE('libcli/drsuapi')
bld.RECURSE('libcli/echo')
2012-03-11 10:13:51 +01:00
bld.RECURSE('libcli/dns')
2011-02-03 13:08:37 +11:00
bld.RECURSE('libcli/samsync')
2011-02-24 13:01:27 +11:00
bld.RECURSE('libcli/registry')
2019-04-02 18:34:24 +02:00
bld.RECURSE('libcli/http')
2016-12-20 08:52:14 +01:00
bld.RECURSE('lib/mscat')
2020-07-16 15:15:07 +02:00
bld.RECURSE('lib/cmdline')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/lib/policy')
bld.RECURSE('libcli/named_pipe_auth')
2017-07-05 10:08:49 +02:00
if bld.CONFIG_GET('ENABLE_SELFTEST'):
bld.RECURSE('testsuite/unittests')
2012-04-13 17:53:04 +03:00
2012-04-20 12:53:11 +03:00
if bld.CONFIG_GET('KRB5_VENDOR') in (None, 'heimdal'):
if bld.CONFIG_GET("HEIMDAL_KRB5_CONFIG") and bld.CONFIG_GET("USING_SYSTEM_KRB5"):
# When both HEIMDAL_KRB5_CONFIG and KRB5_CONFIG are set and not equal,
# it means one is Heimdal-specific (krb5-config.heimdal, for example)
# and there is system heimdal
bld.PROCESS_SEPARATE_RULE('system_heimdal')
2012-04-13 17:53:04 +03:00
else:
2012-04-20 12:53:11 +03:00
bld.PROCESS_SEPARATE_RULE('embedded_heimdal')
2012-04-13 17:53:04 +03:00
else:
2012-04-20 12:53:11 +03:00
bld.PROCESS_SEPARATE_RULE('system_mitkrb5')
2012-04-13 17:53:04 +03:00
2011-02-03 13:08:37 +11:00
bld.RECURSE('libcli/smbreadline')
2012-05-21 12:45:12 +03:00
if bld.AD_DC_BUILD_IS_ENABLED():
bld.RECURSE('source4/setup')
2015-07-23 13:48:50 +02:00
bld.RECURSE('source4/kdc')
2014-08-25 14:05:48 +10:00
if bld.env.with_ctdb:
bld.RECURSE('ctdb')
2011-02-03 13:08:37 +11:00
bld.RECURSE('source4/scripting')
bld.RECURSE('pidl')
bld.RECURSE('lib')
2011-02-24 11:23:53 +11:00
bld.RECURSE('libds/common')
2017-02-03 15:13:49 -08:00
bld.RECURSE('lib/pthreadpool')
2011-05-09 11:00:18 +02:00
bld.RECURSE('source3')
2011-10-04 13:08:50 +02:00
bld.RECURSE('dfs_server')
2011-05-03 09:35:07 +10:00
bld.RECURSE('file_server')
2012-04-21 17:26:18 -04:00
bld.RECURSE('lib/krb5_wrap')
2017-12-14 16:47:49 +01:00
bld.RECURSE('packaging')
2011-02-03 13:08:37 +11:00
2011-02-28 18:57:25 +11:00
bld.RECURSE('testsuite/headers')
2011-02-03 13:08:37 +11:00
bld.SYMBOL_CHECK()
2011-09-08 19:07:47 +10:00
bld.DUP_SYMBOL_CHECK()
2012-09-06 12:14:46 +02:00