2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2010-03-17 13:46:38 +03:00
2010-12-17 20:42:34 +03:00
import os, Utils
2010-10-16 21:01:18 +04:00
from samba_utils import SET_TARGET_TYPE
2010-10-21 10:41:42 +04:00
from samba_autoconf import CURRENT_CFLAGS
2010-10-03 18:01:58 +04:00
2010-10-16 21:01:18 +04:00
def to_list(str):
'''Split a list, preserving quoted strings and existing lists'''
if str is None:
return []
if isinstance(str, list):
return str
return str.split(None)
2011-02-03 05:06:16 +03:00
def heimdal_path(p, absolute=False):
hpath = os.path.join("../heimdal", p)
if not absolute:
return hpath
return os.path.normpath(os.path.join(bld.curdir, hpath))
2010-10-16 19:06:41 +04:00
2010-10-16 19:08:27 +04:00
def heimdal_paths(ps):
2010-10-16 21:01:18 +04:00
return [heimdal_path(p) for p in to_list(ps)]
2010-10-16 19:08:27 +04:00
2010-10-03 18:04:34 +04:00
# waf build tool for building .et files with compile_et
2010-10-04 20:05:00 +04:00
def HEIMDAL_ASN1(name, source,
2010-10-03 18:08:13 +04:00
options='',
directory='',
option_file=None,
includes=''):
'''Build a ASN1 file using the asn1 compiler.
This will produce 2 output files'''
2010-10-16 19:21:05 +04:00
source = heimdal_path(source)
2010-10-03 18:08:13 +04:00
bname = os.path.basename(source)[0:-5];
dname = os.path.dirname(source)
asn1name = "%s_asn1" % bname
2010-10-16 19:26:24 +04:00
if option_file:
option_file = heimdal_path(option_file)
2010-10-03 18:08:13 +04:00
if not SET_TARGET_TYPE(bld, name, 'ASN1'):
return
# for ASN1 compilation, I always put it in build_source, as it doesn't make
# sense elsewhere
2010-10-04 20:05:00 +04:00
bld.set_group('build_source')
2010-10-03 18:08:13 +04:00
2010-10-16 19:21:05 +04:00
out_files = heimdal_paths([
"%s/asn1_%s_asn1.x" % (directory, bname),
"%s/%s_asn1.hx" % (directory, bname),
"%s/%s_asn1-priv.hx" % (directory, bname),
])
2010-10-03 18:08:13 +04:00
# the ${TGT[0].parent.abspath(env)} expression gives us the parent directory of
# the first target in the build directory
# SRC[0].abspath(env) gives the absolute path to the source directory for the first
# source file. Note that in the case of a option_file, we have more than
# one source file
2010-11-21 15:05:37 +03:00
cd_rule = 'cd "${TGT[0].parent.abspath(env)}"'
2011-01-01 03:25:10 +03:00
asn1_rule = cd_rule + ' && "${ASN1_COMPILE}" ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
2010-10-03 18:08:13 +04:00
2010-10-16 21:01:18 +04:00
source = to_list(source)
2010-10-03 18:08:13 +04:00
if option_file is not None:
source.append(option_file)
2011-01-01 03:25:10 +03:00
deps = ''
if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
deps = 'asn1_compile'
2010-10-03 18:08:13 +04:00
t = bld(rule=asn1_rule,
ext_out = '.x',
before = 'cc',
on_results = True,
shell = True,
source = source,
target = out_files,
2011-01-01 03:25:10 +03:00
depends_on = deps,
2010-10-03 18:08:13 +04:00
name=name + '_ASN1')
t.env.ASN1NAME = asn1name
t.env.ASN1OPTIONS = options
t.env.BLDBIN = os.path.normpath(os.path.join(bld.srcnode.abspath(bld.env), '..'))
if option_file is not None:
2010-11-21 15:05:37 +03:00
t.env.OPTION_FILE = "--option-file='%s'" % os.path.normpath(os.path.join(bld.curdir, option_file))
2010-10-03 18:08:13 +04:00
cfile = out_files[0][0:-2] + '.c'
2010-10-14 09:23:45 +04:00
hfile = out_files[1][0:-3] + '.h'
hpriv = out_files[2][0:-3] + '.h'
2010-10-03 18:08:13 +04:00
# now generate a .c file from the .x file
t = bld(rule='''( echo '#include "config.h"' && cat ${SRC} ) > ${TGT}''',
source = out_files[0],
target = cfile,
shell = True,
on_results=True,
2010-10-14 09:23:45 +04:00
ext_out = '.c',
2010-10-03 18:08:13 +04:00
ext_in = '.x',
depends_on = name + '_ASN1',
name = name + '_C')
# and generate a .h file from the .hx file
t = bld(rule='cp ${SRC} ${TGT}',
source = out_files[1],
ext_out = '.c',
ext_in = '.x',
on_results=True,
target = hfile,
depends_on = name + '_ASN1',
name = name + '_H')
# and generate a .h file from the .hx file
t = bld(rule='cp ${SRC} ${TGT}',
source = out_files[2],
ext_out = '.c',
ext_in = '.x',
on_results=True,
target = hpriv,
depends_on = name + '_ASN1',
name = name + '_PRIV_H')
2010-10-04 20:05:00 +04:00
bld.set_group('main')
2010-10-03 18:08:13 +04:00
2010-10-16 21:01:18 +04:00
includes = to_list(includes)
2010-10-03 18:08:13 +04:00
includes.append(os.path.dirname(out_files[0]))
t = bld(features = 'cc',
source = cfile,
target = name,
2014-02-26 10:35:22 +04:00
samba_cflags = CURRENT_CFLAGS(bld, name, '', allow_warnings=True),
2010-10-03 18:08:13 +04:00
depends_on = '',
2010-10-16 21:01:18 +04:00
samba_deps = to_list('roken replace'),
2010-10-16 04:15:36 +04:00
samba_includes = includes + ["/usr/include/heimdal"],
2010-10-03 18:08:13 +04:00
local_include = True)
2010-10-04 20:05:00 +04:00
def HEIMDAL_ERRTABLE(name, source):
2010-10-03 18:04:34 +04:00
'''Build a heimdal errtable from a .et file'''
2010-10-16 19:23:06 +04:00
source = heimdal_path(source)
2010-10-03 18:04:34 +04:00
bname = source[0:-3]; # strip off the .et suffix
if not SET_TARGET_TYPE(bld, name, 'ET'):
return
2010-10-04 20:05:00 +04:00
bld.set_group('build_source')
2010-10-03 18:04:34 +04:00
out_files = []
out_files.append('%s.c' % bname)
out_files.append('%s.h' % bname)
2010-10-04 17:23:24 +04:00
sources = [source, 'et_compile_wrapper.sh']
2010-11-20 17:58:30 +03:00
deps = ''
2010-10-04 17:23:24 +04:00
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
2010-11-20 17:58:30 +03:00
deps = 'compile_et'
2010-10-04 17:23:24 +04:00
2010-11-21 15:05:37 +03:00
t = bld(rule='"${SRC[1].abspath(env)}" "${TGT[0].parent.abspath(env)}" "${COMPILE_ET}" "${SRC[0].abspath(env)}" ${TGT[0].bldpath(env)}',
2010-10-03 18:04:34 +04:00
ext_out = '.c',
before = 'cc',
on_results = True,
shell = True,
2010-10-04 17:23:24 +04:00
source = sources,
2010-10-03 18:04:34 +04:00
target = out_files,
2010-11-20 17:58:30 +03:00
depends_on = deps,
2010-10-03 18:04:34 +04:00
name = name)
2010-10-04 20:05:00 +04:00
def HEIMDAL_AUTOPROTO(header, source, options=None, group='prototypes'):
2010-10-03 18:01:58 +04:00
'''rule for heimdal prototype generation'''
2010-10-16 19:16:44 +04:00
header = heimdal_path(header)
2010-10-04 20:05:00 +04:00
bld.set_group(group)
2010-10-03 18:01:58 +04:00
if options is None:
options='-q -P comment -o'
SET_TARGET_TYPE(bld, header, 'PROTOTYPE')
2010-10-16 19:08:27 +04:00
source = heimdal_paths(source)
2010-11-21 15:05:37 +03:00
t = bld(rule='${PERL} "${HEIMDAL}/cf/make-proto.pl" ${OPTIONS} "${TGT[0].abspath(env)}" ${SRC}',
2010-10-03 18:01:58 +04:00
source=source,
target=header,
on_results=True,
ext_out='.c',
before='cc')
t.env.HEIMDAL = os.path.join(bld.srcnode.abspath(), 'source4/heimdal')
t.env.OPTIONS = options
2010-10-04 20:05:00 +04:00
def HEIMDAL_AUTOPROTO_PRIVATE(header, source):
2010-10-03 18:01:58 +04:00
'''rule for private heimdal prototype generation'''
2010-10-04 20:05:00 +04:00
HEIMDAL_AUTOPROTO(header, source, options='-q -P comment -p')
2010-10-03 18:01:58 +04:00
2010-10-03 17:59:21 +04:00
2010-12-08 06:57:31 +03:00
def HEIMDAL_GENERATOR(name, rule, source='', target='',
group='generators'):
'''A generic source generator target'''
if not SET_TARGET_TYPE(bld, name, 'GENERATOR'):
return
bld.set_group(group)
return bld(
rule=rule,
source=source,
target=target,
shell=isinstance(rule, str),
on_results=True,
before='cc',
ext_out='.c',
vars=[rule],
samba_type='GENERATOR',
name=name)
2012-11-06 02:33:21 +04:00
def HEIMDAL_LIBRARY(libname, source, deps, vnum, version_script, includes=''):
2010-10-04 18:48:34 +04:00
'''define a Heimdal library'''
obj_target = libname + '.objlist'
# first create a target for building the object files for this library
# by separating in this way, we avoid recompiling the C files
# separately for the install library and the build library
2010-10-04 20:05:00 +04:00
HEIMDAL_SUBSYSTEM(obj_target,
2010-10-04 18:48:34 +04:00
source = source,
deps = deps,
includes = includes,
group = 'main')
if not SET_TARGET_TYPE(bld, libname, "LIBRARY"):
return
# the library itself will depend on that object target
2010-10-16 21:01:18 +04:00
deps = to_list(deps)
2010-10-04 18:48:34 +04:00
deps.append(obj_target)
2010-12-08 06:57:31 +03:00
ldflags = []
2010-12-17 20:42:34 +03:00
# FIXME: When building upstream heimdal, we should not be adding this
# suffix.
bundled_build = True
if bundled_build:
2010-10-04 18:48:34 +04:00
bundled_name = libname + '-samba4'
2010-12-17 20:42:34 +03:00
else:
bundled_name = libname
version = "%s_%s" % (Utils.g_module.APPNAME, Utils.g_module.VERSION)
2010-12-08 06:57:31 +03:00
2010-10-04 18:48:34 +04:00
features = 'cc cshlib symlink_lib install_lib'
build: Remove binaries and libraries build groups
Build groups are used in Samba to ensure that even if the dependency
chain for a target is not perfect, that it builds reliably. This
matters most in the early build stages, where we are building the asn1
compiler and autogenerating files.
Once we get to the main stage, dependencies between C files, libraries
and binaries are much clearer, because the C compiler and linker takes
these as inputs anyway.
Groups were added to our waf build for stability during early
development, as dependency information was first imported from the
previous autoconf/perl based build system.
I don't think we need this distinction in the main build of C files
into .o, and when linking these into binaries, because the invocation
of these tools is very well defined, and we will find any missing
inputs very quickly.
As such, I've removed the libraries and binaries targets,
consolidating them with 'main'
By making this change, a build of smbtorture only on a clean tree
drops from 3778 to 2489 targets, and much of the expensive linker
stage is skipped. The time for a null build of smbtorture only also
drops from 4.673s to as low as 2.499s on my laptop.
Andrew Bartlett
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-26 17:11:03 +04:00
bld.set_group('main')
2010-10-04 18:48:34 +04:00
t = bld(
features = features,
source = [],
target = bundled_name,
samba_deps = deps,
samba_includes = includes,
vnum = vnum,
install_path = None,
name = libname,
2010-12-17 20:42:34 +03:00
ldflags = ldflags,
vars = [version],
private_library = bundled_build,
2011-02-03 05:06:16 +03:00
version_script = heimdal_path(version_script, absolute=True),
2010-10-04 18:48:34 +04:00
)
2010-10-03 17:59:21 +04:00
2010-10-04 20:05:00 +04:00
def HEIMDAL_SUBSYSTEM(modname, source,
2010-10-04 18:27:16 +04:00
deps='',
includes='',
cflags='',
group='main',
use_hostcc=False,
2010-10-04 18:48:34 +04:00
use_global_deps=True):
2010-10-04 18:27:16 +04:00
'''define a Heimdal subsystem'''
if not SET_TARGET_TYPE(bld, modname, 'SUBSYSTEM'):
return
2010-10-16 19:08:27 +04:00
source = heimdal_paths(source)
2010-10-04 18:27:16 +04:00
2010-10-04 20:05:00 +04:00
bld.set_group(group)
2010-10-04 18:27:16 +04:00
2010-10-04 20:05:00 +04:00
return bld(
2010-10-04 18:27:16 +04:00
features = 'cc',
source = source,
target = modname,
2014-02-26 10:35:22 +04:00
samba_cflags = CURRENT_CFLAGS(bld, modname, cflags, allow_warnings=True),
2010-10-04 18:48:34 +04:00
depends_on = '',
2010-10-16 21:01:18 +04:00
samba_deps = to_list(deps),
2010-10-04 18:27:16 +04:00
samba_includes = includes,
2010-10-16 19:30:51 +04:00
local_include = True,
local_include_first = True,
2010-10-04 18:27:16 +04:00
samba_use_hostcc = use_hostcc,
samba_use_global_deps = use_global_deps
)
2010-10-04 20:05:00 +04:00
def HEIMDAL_BINARY(binname, source,
2010-10-04 19:17:00 +04:00
deps='',
includes='',
cflags='',
use_hostcc=False,
use_global_deps=True,
compiler=None,
build: Remove binaries and libraries build groups
Build groups are used in Samba to ensure that even if the dependency
chain for a target is not perfect, that it builds reliably. This
matters most in the early build stages, where we are building the asn1
compiler and autogenerating files.
Once we get to the main stage, dependencies between C files, libraries
and binaries are much clearer, because the C compiler and linker takes
these as inputs anyway.
Groups were added to our waf build for stability during early
development, as dependency information was first imported from the
previous autoconf/perl based build system.
I don't think we need this distinction in the main build of C files
into .o, and when linking these into binaries, because the invocation
of these tools is very well defined, and we will find any missing
inputs very quickly.
As such, I've removed the libraries and binaries targets,
consolidating them with 'main'
By making this change, a build of smbtorture only on a clean tree
drops from 3778 to 2489 targets, and much of the expensive linker
stage is skipped. The time for a null build of smbtorture only also
drops from 4.673s to as low as 2.499s on my laptop.
Andrew Bartlett
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-05-26 17:11:03 +04:00
group='main',
2010-10-04 19:17:00 +04:00
install=True,
2010-10-04 20:05:00 +04:00
install_path=None):
2010-10-04 19:17:00 +04:00
'''define a Samba binary'''
if not SET_TARGET_TYPE(bld, binname, 'BINARY'):
return
features = 'cc cprogram symlink_bin install_bin'
obj_target = binname + '.objlist'
2010-10-30 04:07:40 +04:00
if group == 'binaries':
subsystem_group = 'main'
else:
subsystem_group = group
2010-10-04 19:17:00 +04:00
# first create a target for building the object files for this binary
# by separating in this way, we avoid recompiling the C files
# separately for the install binary and the build binary
2010-10-04 20:05:00 +04:00
HEIMDAL_SUBSYSTEM(obj_target,
2010-10-04 19:17:00 +04:00
source = source,
deps = deps,
includes = includes,
cflags = cflags,
2010-10-30 04:07:40 +04:00
group = subsystem_group,
2010-10-04 19:17:00 +04:00
use_hostcc = use_hostcc,
use_global_deps= use_global_deps)
2010-10-04 20:05:00 +04:00
bld.set_group(group)
2010-10-04 19:17:00 +04:00
# the binary itself will depend on that object target
2010-10-16 21:01:18 +04:00
deps = to_list(deps)
2010-10-04 19:17:00 +04:00
deps.append(obj_target)
t = bld(
features = features,
source = [],
target = binname,
samba_deps = deps,
samba_includes = includes,
2010-10-16 19:30:51 +04:00
local_include = True,
2010-10-04 19:17:00 +04:00
top = True,
install_path = None,
samba_install = install
)
2010-10-16 02:58:56 +04:00
if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
if not bld.CONFIG_SET('HAVE_IFADDRS_H'):
HEIMDAL_GENERATOR(
name="HEIMDAL_IFADDRS_H",
rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
source = 'ifaddrs.hin',
target = 'ifaddrs.h',
)
if not bld.CONFIG_SET('HAVE_ERR_H'):
HEIMDAL_GENERATOR(
group='build_compiler_source',
name="HEIMDAL_ERR_H",
rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
source = '../heimdal/lib/roken/err.hin',
target = '../heimdal/lib/roken/err.h',
)
ROKEN_HOSTCC_SOURCE = '''
2010-10-16 18:37:11 +04:00
lib/roken/base64.c
lib/roken/ct.c
lib/roken/hex.c
lib/roken/bswap.c
lib/roken/dumpdata.c
lib/roken/emalloc.c
lib/roken/ecalloc.c
lib/roken/getarg.c
lib/roken/get_window_size.c
lib/roken/getdtablesize.c
lib/roken/h_errno.c
lib/roken/issuid.c
lib/roken/net_read.c
lib/roken/net_write.c
lib/roken/parse_time.c
lib/roken/parse_units.c
lib/roken/vis.c
lib/roken/strlwr.c
lib/roken/strsep_copy.c
lib/roken/strsep.c
lib/roken/strupr.c
lib/roken/strpool.c
lib/roken/estrdup.c
lib/roken/erealloc.c
lib/roken/simple_exec.c
lib/roken/strcollect.c
lib/roken/rtbl.c
2010-11-29 03:24:08 +03:00
lib/roken/rand.c
2010-10-16 18:37:11 +04:00
lib/roken/cloexec.c
lib/roken/xfree.c
../heimdal_build/replace.c
2010-10-03 17:59:21 +04:00
'''
2010-06-23 12:09:02 +04:00
2010-10-16 02:58:56 +04:00
if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
ROKEN_HOSTCC_SOURCE += '''
2010-10-16 18:37:11 +04:00
lib/roken/closefrom.c
2010-10-16 02:58:56 +04:00
'''
ROKEN_SOURCE = ROKEN_HOSTCC_SOURCE + '''
2010-10-16 18:37:11 +04:00
lib/roken/resolve.c
lib/roken/socket.c
lib/roken/roken_gethostby.c
2012-11-19 16:25:45 +04:00
lib/roken/strerror_r.c
2010-10-03 17:59:21 +04:00
'''
2010-06-23 12:09:02 +04:00
2010-10-16 02:58:56 +04:00
HEIMDAL_LIBRARY('roken',
ROKEN_SOURCE,
2010-10-24 12:49:03 +04:00
includes='../heimdal/lib/roken ../heimdal/include',
2010-11-12 18:22:43 +03:00
deps='resolv util replace',
2010-10-16 02:58:56 +04:00
vnum='19.0.1',
2010-12-17 21:51:37 +03:00
version_script='lib/roken/version-script.map',
2010-10-16 02:58:56 +04:00
)
2010-06-23 12:09:02 +04:00
2010-10-16 02:58:56 +04:00
HEIMDAL_SUBSYSTEM('ROKEN_HOSTCC',
ROKEN_HOSTCC_SOURCE,
use_hostcc=True,
use_global_deps=False,
includes='../heimdal/lib/roken',
2013-07-03 16:04:57 +04:00
cflags='-DSOCKET_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
2010-10-16 02:58:56 +04:00
group='compiler_libraries',
deps='LIBREPLACE_HOSTCC',
)
2010-06-23 12:09:02 +04:00
2011-01-01 04:10:05 +03:00
if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
HEIMDAL_ASN1('HEIMDAL_KX509_ASN1',
'lib/asn1/kx509.asn1',
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_DIGEST_ASN1',
'lib/asn1/digest.asn1',
directory='lib/asn1'
)
2010-10-16 18:46:22 +04:00
2011-01-01 04:10:05 +03:00
KDC_SOURCE='kdc/default_config.c kdc/kerberos5.c kdc/krb5tgs.c kdc/pkinit.c kdc/log.c kdc/misc.c kdc/digest.c kdc/process.c kdc/windc.c kdc/kx509.c'
2010-06-23 12:09:02 +04:00
2011-01-01 04:10:05 +03:00
HEIMDAL_LIBRARY('kdc', source=KDC_SOURCE,
includes='../heimdal/kdc',
deps='roken krb5 hdb asn1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 heimntlm hcrypto com_err wind heimbase',
vnum='2.0.0',
version_script='kdc/version-script.map')
HEIMDAL_AUTOPROTO('kdc/kdc-protos.h', KDC_SOURCE)
HEIMDAL_AUTOPROTO_PRIVATE('kdc/kdc-private.h', KDC_SOURCE)
2011-01-01 03:54:35 +03:00
if not bld.CONFIG_SET("USING_SYSTEM_HEIMNTLM"):
HEIMDAL_ERRTABLE('HEIMNTLM_ET',
'lib/ntlm/ntlm_err.et')
HEIMNTLM_SOURCE = 'lib/ntlm/ntlm.c'
HEIMDAL_LIBRARY('heimntlm',
source=HEIMNTLM_SOURCE,
includes='../heimdal/lib/ntlm',
deps='roken hcrypto krb5',
vnum='1.0.1',
version_script='lib/ntlm/version-script.map',
)
HEIMDAL_AUTOPROTO('lib/ntlm/heimntlm-protos.h', HEIMNTLM_SOURCE)
2010-06-23 12:09:02 +04:00
2011-01-01 04:10:05 +03:00
if not bld.CONFIG_SET("USING_SYSTEM_HDB"):
HEIMDAL_ASN1('HEIMDAL_HDB_ASN1', 'lib/hdb/hdb.asn1',
directory='lib/asn1',
2011-07-25 13:06:18 +04:00
options="--sequence=HDB-Ext-KeySet --sequence=Keys",
2011-01-01 04:10:05 +03:00
includes='../heimdal/lib/asn1')
2010-06-23 12:09:02 +04:00
2011-01-01 04:10:05 +03:00
HEIMDAL_SUBSYSTEM('HEIMDAL_HDB_KEYS',
'lib/hdb/keys.c',
includes='../heimdal/lib/hdb',
deps='roken hcrypto krb5 HEIMDAL_HDB_ASN1'
)
HEIMDAL_ERRTABLE('HEIMDAL_HDB_ERR_ET', 'lib/hdb/hdb_err.et')
HDB_SOURCE = '''lib/hdb/db.c lib/hdb/dbinfo.c lib/hdb/hdb.c
lib/hdb/ext.c lib/hdb/keytab.c lib/hdb/hdb-keytab.c
lib/hdb/mkey.c lib/hdb/ndbm.c lib/hdb/hdb_err.c
../heimdal_build/hdb-glue.c'''
HEIMDAL_LIBRARY('hdb',
version_script='lib/hdb/version-script.map',
source=HDB_SOURCE,
includes='../heimdal/lib/hdb',
deps='krb5 HEIMDAL_HDB_KEYS roken hcrypto com_err HEIMDAL_HDB_ASN1 wind',
vnum='11.0.2',
)
HEIMDAL_AUTOPROTO('lib/hdb/hdb-protos.h', HDB_SOURCE)
HEIMDAL_AUTOPROTO_PRIVATE('lib/hdb/hdb-private.h', HDB_SOURCE)
if not bld.CONFIG_SET("USING_SYSTEM_GSSAPI"):
HEIMDAL_ERRTABLE('HEIMDAL_GKRB5_ERR_ET', 'lib/gssapi/krb5/gkrb5_err.et')
HEIMDAL_ASN1('HEIMDAL_GSSAPI_ASN1',
'lib/gssapi/mech/gssapi.asn1',
includes='../heimdal/lib/asn1',
directory='lib/gssapi'
)
HEIMDAL_ASN1('HEIMDAL_SPNEGO_ASN1',
source='lib/gssapi/spnego/spnego.asn1',
options='--sequence=MechTypeList',
includes='../heimdal/lib/asn1',
directory='lib/gssapi'
)
2011-07-14 17:26:03 +04:00
HEIMDAL_GSSAPI_SPNEGO_SOURCE = '''
lib/gssapi/spnego/init_sec_context.c
lib/gssapi/spnego/external.c
lib/gssapi/spnego/compat.c
lib/gssapi/spnego/context_stubs.c
lib/gssapi/spnego/cred_stubs.c
lib/gssapi/spnego/accept_sec_context.c
'''
HEIMDAL_AUTOPROTO_PRIVATE('lib/gssapi/spnego/spnego-private.h',
2011-07-14 16:32:16 +04:00
HEIMDAL_GSSAPI_SPNEGO_SOURCE)
2011-07-14 17:26:03 +04:00
HEIMDAL_GSSAPI_KRB5_SOURCE = '''
lib/gssapi/krb5/copy_ccache.c
lib/gssapi/krb5/delete_sec_context.c
lib/gssapi/krb5/init_sec_context.c
lib/gssapi/krb5/context_time.c
lib/gssapi/krb5/init.c
lib/gssapi/krb5/address_to_krb5addr.c
lib/gssapi/krb5/get_mic.c
lib/gssapi/krb5/inquire_context.c
lib/gssapi/krb5/add_cred.c
lib/gssapi/krb5/inquire_cred.c
lib/gssapi/krb5/inquire_cred_by_oid.c
lib/gssapi/krb5/inquire_cred_by_mech.c
lib/gssapi/krb5/inquire_mechs_for_name.c
lib/gssapi/krb5/inquire_names_for_mech.c
lib/gssapi/krb5/indicate_mechs.c
lib/gssapi/krb5/inquire_sec_context_by_oid.c
lib/gssapi/krb5/export_sec_context.c
lib/gssapi/krb5/import_sec_context.c
lib/gssapi/krb5/duplicate_name.c
lib/gssapi/krb5/import_name.c
lib/gssapi/krb5/compare_name.c
lib/gssapi/krb5/export_name.c
lib/gssapi/krb5/canonicalize_name.c
lib/gssapi/krb5/unwrap.c
lib/gssapi/krb5/wrap.c
lib/gssapi/krb5/release_name.c
lib/gssapi/krb5/cfx.c
lib/gssapi/krb5/8003.c
lib/gssapi/krb5/arcfour.c
lib/gssapi/krb5/encapsulate.c
lib/gssapi/krb5/display_name.c
lib/gssapi/krb5/sequence.c
lib/gssapi/krb5/display_status.c
lib/gssapi/krb5/release_buffer.c
lib/gssapi/krb5/external.c
lib/gssapi/krb5/compat.c
lib/gssapi/krb5/creds.c
lib/gssapi/krb5/acquire_cred.c
lib/gssapi/krb5/release_cred.c
lib/gssapi/krb5/store_cred.c
lib/gssapi/krb5/set_cred_option.c
lib/gssapi/krb5/decapsulate.c
lib/gssapi/krb5/verify_mic.c
lib/gssapi/krb5/accept_sec_context.c
lib/gssapi/krb5/set_sec_context_option.c
lib/gssapi/krb5/process_context_token.c
lib/gssapi/krb5/prf.c
lib/gssapi/krb5/aeap.c
2011-07-14 16:32:16 +04:00
lib/gssapi/krb5/pname_to_uid.c
lib/gssapi/krb5/authorize_localname.c
2011-07-14 17:26:03 +04:00
'''
HEIMDAL_AUTOPROTO_PRIVATE('lib/gssapi/krb5/gsskrb5-private.h',
HEIMDAL_GSSAPI_KRB5_SOURCE)
2011-01-01 04:10:05 +03:00
HEIMDAL_LIBRARY('gssapi',
2011-07-14 17:26:03 +04:00
HEIMDAL_GSSAPI_SPNEGO_SOURCE + HEIMDAL_GSSAPI_KRB5_SOURCE + '''
2011-01-01 04:10:05 +03:00
lib/gssapi/mech/context.c lib/gssapi/mech/gss_krb5.c lib/gssapi/mech/gss_mech_switch.c
lib/gssapi/mech/gss_process_context_token.c lib/gssapi/mech/gss_buffer_set.c
lib/gssapi/mech/gss_aeap.c lib/gssapi/mech/gss_add_cred.c lib/gssapi/mech/gss_cred.c
lib/gssapi/mech/gss_add_oid_set_member.c lib/gssapi/mech/gss_compare_name.c lib/gssapi/mech/gss_release_oid_set.c
lib/gssapi/mech/gss_create_empty_oid_set.c lib/gssapi/mech/gss_decapsulate_token.c lib/gssapi/mech/gss_inquire_cred_by_oid.c
lib/gssapi/mech/gss_canonicalize_name.c lib/gssapi/mech/gss_inquire_sec_context_by_oid.c lib/gssapi/mech/gss_inquire_names_for_mech.c
lib/gssapi/mech/gss_inquire_mechs_for_name.c lib/gssapi/mech/gss_wrap_size_limit.c lib/gssapi/mech/gss_names.c
lib/gssapi/mech/gss_verify.c lib/gssapi/mech/gss_display_name.c
lib/gssapi/mech/gss_duplicate_oid.c lib/gssapi/mech/gss_display_status.c lib/gssapi/mech/gss_release_buffer.c
lib/gssapi/mech/gss_release_oid.c lib/gssapi/mech/gss_test_oid_set_member.c
lib/gssapi/mech/gss_release_cred.c
lib/gssapi/mech/gss_set_sec_context_option.c lib/gssapi/mech/gss_export_name.c lib/gssapi/mech/gss_seal.c
lib/gssapi/mech/gss_acquire_cred.c lib/gssapi/mech/gss_unseal.c lib/gssapi/mech/gss_verify_mic.c
lib/gssapi/mech/gss_accept_sec_context.c lib/gssapi/mech/gss_inquire_cred_by_mech.c lib/gssapi/mech/gss_indicate_mechs.c
lib/gssapi/mech/gss_delete_sec_context.c lib/gssapi/mech/gss_sign.c lib/gssapi/mech/gss_utils.c
lib/gssapi/mech/gss_init_sec_context.c lib/gssapi/mech/gss_oid_equal.c lib/gssapi/mech/gss_oid.c
lib/gssapi/mech/gss_oid_to_str.c lib/gssapi/mech/gss_mo.c
lib/gssapi/mech/gss_context_time.c lib/gssapi/mech/gss_encapsulate_token.c lib/gssapi/mech/gss_get_mic.c
lib/gssapi/mech/gss_import_sec_context.c lib/gssapi/mech/gss_inquire_cred.c lib/gssapi/mech/gss_wrap.c
lib/gssapi/mech/gss_import_name.c lib/gssapi/mech/gss_duplicate_name.c lib/gssapi/mech/gss_unwrap.c
lib/gssapi/mech/gss_export_sec_context.c lib/gssapi/mech/gss_inquire_context.c lib/gssapi/mech/gss_release_name.c
lib/gssapi/mech/gss_set_cred_option.c lib/gssapi/mech/gss_pseudo_random.c ../heimdal_build/gssapi-glue.c''',
includes='../heimdal/lib/gssapi ../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech',
deps='hcrypto asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind',
vnum='2.0.0',
version_script='lib/gssapi/version-script.map',
)
2010-06-23 12:09:02 +04:00
2011-01-01 04:05:23 +03:00
if not bld.CONFIG_SET("USING_SYSTEM_KRB5"):
# expand_path.c needs some of the install paths
HEIMDAL_SUBSYSTEM('HEIMDAL_CONFIG',
'lib/krb5/expand_path.c lib/krb5/plugin.c lib/krb5/context.c',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
cflags=bld.dynconfig_cflags('LIBDIR BINDIR LIBEXECDIR SBINDIR'),
deps='hcrypto heimbase wind hx509 com_err'
)
HEIMDAL_ERRTABLE('HEIMDAL_KRB5_ERR_ET', 'lib/krb5/krb5_err.et')
HEIMDAL_ERRTABLE('HEIMDAL_KRB_ERR_ET', 'lib/krb5/krb_err.et')
HEIMDAL_ERRTABLE('HEIMDAL_K524_ERR_ET', 'lib/krb5/k524_err.et')
HEIMDAL_ERRTABLE('HEIMDAL_HEIM_ERR_ET', 'lib/krb5/heim_err.et')
KRB5_SOURCE = [os.path.join('lib/krb5/', x) for x in to_list(
'''acache.c add_et_list.c
addr_families.c appdefault.c
asn1_glue.c auth_context.c
build_ap_req.c build_auth.c cache.c
changepw.c codec.c config_file.c
constants.c convert_creds.c
copy_host_realm.c crc.c creds.c
crypto.c crypto-aes.c crypto-algs.c
crypto-arcfour.c crypto-des3.c crypto-des.c
crypto-des-common.c crypto-evp.c
crypto-null.c crypto-pk.c crypto-rand.c
data.c eai_to_heim_errno.c
error_string.c expand_hostname.c
fcache.c free.c free_host_realm.c
generate_seq_number.c generate_subkey.c
get_addrs.c get_cred.c
get_default_principal.c
get_default_realm.c get_for_creds.c
get_host_realm.c get_in_tkt.c
get_port.c init_creds.c init_creds_pw.c
kcm.c keyblock.c keytab.c keytab_any.c
keytab_file.c keytab_memory.c
keytab_keyfile.c krbhst.c log.c
mcache.c misc.c mk_error.c mk_priv.c
mk_rep.c mk_req.c mk_req_ext.c
mit_glue.c n-fold.c padata.c pkinit.c
principal.c prog_setup.c pac.c
pcache.c prompter_posix.c rd_cred.c rd_error.c
rd_priv.c rd_rep.c rd_req.c replay.c
salt.c salt-aes.c salt-arcfour.c salt-des3.c salt-des.c
send_to_kdc.c set_default_realm.c
store.c store-int.c store_emem.c store_fd.c
store_mem.c ticket.c time.c transited.c
version.c warn.c krb5_err.c
2011-07-14 16:32:16 +04:00
aname_to_localname.c kuserok.c
2011-01-01 04:05:23 +03:00
heim_err.c k524_err.c krb_err.c''')] + ["../heimdal_build/krb5-glue.c"]
HEIMDAL_LIBRARY('krb5', KRB5_SOURCE,
version_script='lib/krb5/version-script.map',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
2013-08-02 01:00:21 +04:00
deps='roken wind asn1 hx509 hcrypto com_err HEIMDAL_CONFIG heimbase execinfo samba_intl',
2011-01-01 04:05:23 +03:00
vnum='26.0.0',
)
KRB5_PROTO_SOURCE = KRB5_SOURCE + ['lib/krb5/expand_path.c', 'lib/krb5/plugin.c', 'lib/krb5/context.c']
HEIMDAL_AUTOPROTO_PRIVATE('lib/krb5/krb5-private.h', KRB5_PROTO_SOURCE)
HEIMDAL_AUTOPROTO('lib/krb5/krb5-protos.h', KRB5_PROTO_SOURCE,
options='-E KRB5_LIB -q -P comment -o')
2010-06-23 12:09:02 +04:00
2010-10-16 05:27:02 +04:00
if not bld.CONFIG_SET("USING_SYSTEM_ASN1"):
HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
2010-10-16 18:37:11 +04:00
lib/asn1/der_get.c
lib/asn1/der_put.c
lib/asn1/der_free.c
lib/asn1/der_format.c
lib/asn1/der_length.c
lib/asn1/der_copy.c
lib/asn1/der_cmp.c
2010-10-16 05:27:02 +04:00
'''
2010-10-16 19:16:44 +04:00
HEIMDAL_AUTOPROTO('lib/asn1/der-protos.h',
2010-10-16 05:27:02 +04:00
HEIMDAL_HEIM_ASN1_DER_SOURCE,
group = 'compiler_prototypes',
options="-q -P comment -o")
2010-06-23 12:09:02 +04:00
2010-10-16 19:16:44 +04:00
HEIMDAL_AUTOPROTO('lib/asn1/der-private.h',
2010-10-16 05:27:02 +04:00
HEIMDAL_HEIM_ASN1_DER_SOURCE,
group = 'compiler_prototypes',
options="-q -P comment -p")
2011-01-01 04:05:23 +03:00
HEIMDAL_ERRTABLE('HEIMDAL_ASN1_ERR_ET', 'lib/asn1/asn1_err.et')
2010-10-16 05:27:02 +04:00
HEIMDAL_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
2010-10-16 19:13:10 +04:00
HEIMDAL_HEIM_ASN1_DER_SOURCE + 'lib/asn1/extra.c lib/asn1/timegm.c lib/asn1/asn1_err.c',
2010-06-23 12:09:02 +04:00
includes='../heimdal/lib/asn1',
2010-10-16 05:27:02 +04:00
deps='roken com_err'
)
2010-12-17 23:51:21 +03:00
HEIMDAL_ASN1('HEIMDAL_RFC2459_ASN1',
'lib/asn1/rfc2459.asn1',
options='--preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints',
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_KRB5_ASN1',
'lib/asn1/krb5.asn1',
option_file='lib/asn1/krb5.opt',
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_PKINIT_ASN1',
'lib/asn1/pkinit.asn1',
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_CMS_ASN1',
'lib/asn1/cms.asn1',
option_file='lib/asn1/cms.opt',
directory='lib/asn1'
)
2010-10-16 05:27:02 +04:00
HEIMDAL_LIBRARY('asn1',
2010-12-17 22:06:15 +03:00
version_script='lib/asn1/version-script.map',
2010-12-17 23:51:21 +03:00
deps="HEIMDAL_HEIM_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_KRB5_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_CMS_ASN1",
2010-10-16 05:27:02 +04:00
source='',
vnum='8.0.0')
2010-06-23 12:09:02 +04:00
2010-12-22 03:25:20 +03:00
if not bld.CONFIG_SET('USING_SYSTEM_HCRYPTO'):
if not bld.CONFIG_SET("USING_SYSTEM_TOMMATH"):
HEIMDAL_SUBSYSTEM('tommath',
2010-10-16 18:37:11 +04:00
'lib/hcrypto/libtommath/bncore.c lib/hcrypto/libtommath/bn_mp_init.c lib/hcrypto/libtommath/bn_mp_clear.c lib/hcrypto/libtommath/bn_mp_exch.c lib/hcrypto/libtommath/bn_mp_grow.c lib/hcrypto/libtommath/bn_mp_shrink.c lib/hcrypto/libtommath/bn_mp_clamp.c lib/hcrypto/libtommath/bn_mp_zero.c lib/hcrypto/libtommath/bn_mp_zero_multi.c lib/hcrypto/libtommath/bn_mp_set.c lib/hcrypto/libtommath/bn_mp_set_int.c lib/hcrypto/libtommath/bn_mp_init_size.c lib/hcrypto/libtommath/bn_mp_copy.c lib/hcrypto/libtommath/bn_mp_init_copy.c lib/hcrypto/libtommath/bn_mp_abs.c lib/hcrypto/libtommath/bn_mp_neg.c lib/hcrypto/libtommath/bn_mp_cmp_mag.c lib/hcrypto/libtommath/bn_mp_cmp.c lib/hcrypto/libtommath/bn_mp_cmp_d.c lib/hcrypto/libtommath/bn_mp_rshd.c lib/hcrypto/libtommath/bn_mp_lshd.c lib/hcrypto/libtommath/bn_mp_mod_2d.c lib/hcrypto/libtommath/bn_mp_div_2d.c lib/hcrypto/libtommath/bn_mp_mul_2d.c lib/hcrypto/libtommath/bn_mp_div_2.c lib/hcrypto/libtommath/bn_mp_mul_2.c lib/hcrypto/libtommath/bn_s_mp_add.c lib/hcrypto/libtommath/bn_s_mp_sub.c lib/hcrypto/libtommath/bn_fast_s_mp_mul_digs.c lib/hcrypto/libtommath/bn_s_mp_mul_digs.c lib/hcrypto/libtommath/bn_fast_s_mp_mul_high_digs.c lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c lib/hcrypto/libtommath/bn_fast_s_mp_sqr.c lib/hcrypto/libtommath/bn_s_mp_sqr.c lib/hcrypto/libtommath/bn_mp_add.c lib/hcrypto/libtommath/bn_mp_sub.c lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c lib/hcrypto/libtommath/bn_mp_mul.c lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c lib/hcrypto/libtommath/bn_mp_sqr.c lib/hcrypto/libtommath/bn_mp_div.c lib/hcrypto/libtommath/bn_mp_mod.c lib/hcrypto/libtommath/bn_mp_add_d.c lib/hcrypto/libtommath/bn_mp_sub_d.c lib/hcrypto/libtommath/bn_mp_mul_d.c lib/hcrypto/libtommath/bn_mp_div_d.c lib/hcrypto/libtommath/bn_mp_mod_d.c lib/hcrypto/libtommath/bn_mp_expt_d.c lib/hcrypto/libtommath/bn_mp_addmod.c lib/hcrypto/libtommath/bn_mp_submod.c lib/hcrypto/libtommath/bn_mp_mulmod.c lib/hcrypto/libtommath/bn_mp_sqrmod.c lib/hcrypto/libtommath/bn_mp_gcd.c lib/hcrypto/libtommath/bn_mp_lcm.c lib/hcrypto/libtommath/bn_fast_mp_invmod.c lib/hcrypto/libtommath/bn_mp_invmod.c lib/hcrypto/libtommath/bn_mp_reduce.c lib/hcrypto/libtommath/bn_mp_montgomery_setup.c lib/hcrypto/libtommath/bn_fast_mp_montgomery_reduce.c lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c lib/hcrypto/libtommath/bn_mp_exptmod_fast.c lib/hcrypto/libtommath/bn_mp_exptmod.c lib/hcrypto/libtommath/bn_mp_2expt.c lib/hcrypto/libtommath/bn_mp_n_root.c lib/hcrypto/libtommath/bn_mp_jacobi.c lib/hcrypto/libtommath/bn_reverse.c lib/hcrypto/libtommath/bn_mp_count_bits.c lib/hcrypto/libtommath/bn_mp_read_unsigned_bin.c lib/hcrypto/libtommath/bn_mp_read_signed_bin.c lib/hcrypto/libtommath/bn_mp_to_unsigned_bin.c lib/hcrypto/libtommath/bn_mp_to_signed_bin.c lib/hcrypto/libtommath/bn_mp_unsigned_bin_size.c lib/hcrypto/libtommath/bn_mp_signed_bin_size.c lib/hcrypto/libtommath/bn_mp_xor.c lib/hcrypto/libtommath/bn_mp_and.c lib/hcrypto/libtommath/bn_mp_or.c lib/hcrypto/libtommath/bn_mp_rand.c lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c lib/hcrypto/libtommath/bn_mp_prime_is_divisible.c lib/hcrypto/libtommath/bn_prime_tab.c lib/hcrypto/libtommath/bn_mp_prime_fermat.c lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c lib/hcrypto/libtommath/bn_mp_prime_is_prime.c lib/hcrypto/libtommath/bn_mp_prime_next_prime.c lib/hcrypto/libtommath/bn_mp_find_prime.c lib/hcrypto/libtommath/bn_mp_isprime.c lib/hcrypto/libtommath/bn_mp_dr_reduce.c lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c lib/hcrypto/libtommath/bn_mp_dr_setup.c lib/hcrypto/libtommath/bn_mp_reduce_setup.c lib/hcrypto/libtommath/bn_mp_toom_mul.c lib/hcrypto/libtommath/bn_mp_toom_sqr.c lib/hcrypto/libtommath/bn_mp_div_3.c lib/hcrypto/libtommath/bn_s_mp_exptmod.c lib/hcrypto/libtommath/bn_mp_reduce_2k.c lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c lib/hcrypto/libtommath/bn_mp_radix_smap.c lib/hcrypto
2010-10-16 04:48:06 +04:00
includes='../heimdal/lib/hcrypto/libtommath'
2010-12-22 03:25:20 +03:00
)
2010-06-23 12:09:02 +04:00
2010-12-22 03:25:20 +03:00
HEIMDAL_LIBRARY('hcrypto',
'lib/hcrypto/aes.c lib/hcrypto/bn.c lib/hcrypto/dh.c lib/hcrypto/dh-ltm.c lib/hcrypto/des.c lib/hcrypto/dsa.c lib/hcrypto/engine.c lib/hcrypto/md2.c lib/hcrypto/md4.c lib/hcrypto/md5.c lib/hcrypto/rsa.c lib/hcrypto/rsa-ltm.c lib/hcrypto/rc2.c lib/hcrypto/rc4.c lib/hcrypto/rijndael-alg-fst.c lib/hcrypto/rnd_keys.c lib/hcrypto/sha.c lib/hcrypto/sha256.c lib/hcrypto/sha512.c lib/hcrypto/ui.c lib/hcrypto/evp.c lib/hcrypto/evp-hcrypto.c lib/hcrypto/pkcs5.c lib/hcrypto/pkcs12.c lib/hcrypto/rand.c lib/hcrypto/rand-egd.c lib/hcrypto/rand-unix.c lib/hcrypto/rand-fortuna.c lib/hcrypto/rand-timer.c lib/hcrypto/hmac.c lib/hcrypto/camellia.c lib/hcrypto/camellia-ntt.c lib/hcrypto/common.c lib/hcrypto/validate.c',
includes='../heimdal/lib/hcrypto ../heimdal/lib ../heimdal/include',
deps='roken asn1 tommath replace',
version_script='lib/hcrypto/version-script.map',
vnum='5.0.1',
)
2010-11-12 07:27:43 +03:00
2010-12-22 03:33:50 +03:00
if not bld.CONFIG_SET('USING_SYSTEM_HEIMBASE'):
HEIMDAL_LIBRARY('heimbase',
2010-12-22 03:25:20 +03:00
'base/array.c base/bool.c base/dict.c base/heimbase.c base/string.c base/number.c base/null.c',
includes='../heimdal/base ../heimdal/include',
deps='roken replace',
version_script='base/version-script.map',
vnum='1.0.0',
)
2010-06-23 12:09:02 +04:00
2010-10-16 04:25:40 +04:00
if not bld.CONFIG_SET("USING_SYSTEM_HX509"):
HEIMDAL_ASN1('HEIMDAL_OCSP_ASN1',
2010-10-16 19:21:05 +04:00
'lib/hx509/ocsp.asn1',
2010-10-16 04:25:40 +04:00
options='--preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData',
2010-10-16 18:37:11 +04:00
includes='../heimdal/lib/asn1',
2010-10-16 04:25:40 +04:00
directory='lib/hx509'
)
HEIMDAL_ASN1('HEIMDAL_PKCS8_ASN1',
2010-10-16 19:21:05 +04:00
'lib/asn1/pkcs8.asn1',
2010-10-16 04:25:40 +04:00
directory='lib/asn1'
)
2010-06-23 12:09:02 +04:00
2010-10-16 04:25:40 +04:00
HEIMDAL_ASN1('HEIMDAL_PKCS9_ASN1',
2010-10-16 19:21:05 +04:00
'lib/asn1/pkcs9.asn1',
2010-10-16 04:25:40 +04:00
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_PKCS12_ASN1',
2010-10-16 19:21:05 +04:00
'lib/asn1/pkcs12.asn1',
2010-10-16 04:25:40 +04:00
directory='lib/asn1'
)
HEIMDAL_ASN1('HEIMDAL_PKCS10_ASN1',
2010-10-16 19:21:05 +04:00
'lib/hx509/pkcs10.asn1',
2010-10-16 04:25:40 +04:00
options='--preserve-binary=CertificationRequestInfo',
2010-10-16 18:37:11 +04:00
includes='../heimdal/lib/asn1',
2010-10-16 04:25:40 +04:00
directory='lib/hx509'
)
2010-10-16 05:07:40 +04:00
HEIMDAL_ERRTABLE('HEIMDAL_HX509_ERR_ET',
2010-10-16 19:23:06 +04:00
'lib/hx509/hx509_err.et')
2010-10-16 05:07:40 +04:00
HEIMDAL_HX509_OBJH_SOURCE = '''
2010-10-16 18:37:11 +04:00
lib/hx509/ca.c
lib/hx509/cert.c
lib/hx509/cms.c
lib/hx509/collector.c
lib/hx509/crypto.c
lib/hx509/error.c
lib/hx509/env.c
lib/hx509/file.c
lib/hx509/keyset.c
lib/hx509/ks_dir.c
lib/hx509/ks_file.c
lib/hx509/ks_keychain.c
lib/hx509/ks_mem.c
lib/hx509/ks_null.c
lib/hx509/ks_p11.c
lib/hx509/ks_p12.c
lib/hx509/lock.c
lib/hx509/name.c
lib/hx509/peer.c
lib/hx509/print.c
lib/hx509/req.c
lib/hx509/revoke.c
lib/hx509/sel.c
lib/hx509/hx509_err.c
2010-10-16 05:07:40 +04:00
'''
2010-10-16 19:16:44 +04:00
HEIMDAL_AUTOPROTO('lib/hx509/hx509-protos.h',
2010-10-16 05:07:40 +04:00
HEIMDAL_HX509_OBJH_SOURCE,
options="-R '^(_|^C)' -E HX509_LIB -q -P comment -o")
2010-10-16 19:16:44 +04:00
HEIMDAL_AUTOPROTO('lib/hx509/hx509-private.h',
2010-10-16 05:07:40 +04:00
HEIMDAL_HX509_OBJH_SOURCE,
options="-q -P comment -p")
2010-10-16 04:25:40 +04:00
HEIMDAL_LIBRARY('hx509',
2010-10-16 18:37:11 +04:00
'lib/hx509/ca.c lib/hx509/cert.c lib/hx509/cms.c lib/hx509/collector.c lib/hx509/crypto.c lib/hx509/error.c lib/hx509/env.c lib/hx509/file.c lib/hx509/keyset.c lib/hx509/ks_dir.c lib/hx509/ks_file.c lib/hx509/ks_keychain.c lib/hx509/ks_mem.c lib/hx509/ks_null.c lib/hx509/ks_p11.c lib/hx509/ks_p12.c lib/hx509/lock.c lib/hx509/name.c lib/hx509/peer.c lib/hx509/print.c lib/hx509/req.c lib/hx509/revoke.c lib/hx509/sel.c lib/hx509/hx509_err.c lib/hx509/sel-lex.c lib/hx509/sel-gram.c',
2010-10-16 04:25:40 +04:00
includes='../heimdal/lib/hx509',
2010-12-17 23:51:21 +03:00
deps='roken com_err asn1 hcrypto asn1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKCS10_ASN1 wind',
2010-10-16 04:25:40 +04:00
vnum='5.0.0',
2010-12-17 23:51:21 +03:00
version_script='lib/hx509/version-script.map',
2010-10-16 04:25:40 +04:00
)
2010-10-16 02:31:10 +04:00
if not bld.CONFIG_SET('USING_SYSTEM_WIND'):
HEIMDAL_ERRTABLE('WIND_ERR_ET',
2010-10-16 19:23:06 +04:00
'lib/wind/wind_err.et')
2010-10-16 02:31:10 +04:00
HEIMDAL_GENERATOR(
name="HEIMDAL_ERRORLIST",
2010-11-21 15:05:37 +03:00
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
2010-10-16 02:31:10 +04:00
source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py',
target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h'
)
HEIMDAL_GENERATOR(
name = 'HEIMDAL_NORMALIZE_TABLE',
2010-11-21 15:05:37 +03:00
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[2].abspath()}' '${SRC[1].parent.abspath(env)}'",
2010-10-16 02:31:10 +04:00
source = '../heimdal/lib/wind/gen-normalize.py ../heimdal/lib/wind/UnicodeData.txt ../heimdal/lib/wind/CompositionExclusions-3.2.0.txt',
target = '../heimdal/lib/wind/normalize_table.h ../heimdal/lib/wind/normalize_table.c'
2010-10-03 17:59:21 +04:00
)
2010-06-23 12:09:02 +04:00
2010-10-16 02:31:10 +04:00
HEIMDAL_GENERATOR(
name = 'HEIMDAL_COMBINING_TABLE',
2010-11-21 15:05:37 +03:00
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
2010-10-16 02:31:10 +04:00
source = '../heimdal/lib/wind/gen-combining.py ../heimdal/lib/wind/UnicodeData.txt',
target = '../heimdal/lib/wind/combining_table.h ../heimdal/lib/wind/combining_table.c'
)
HEIMDAL_GENERATOR(
name = 'HEIMDAL_BIDI_TABLE',
2010-11-21 15:05:37 +03:00
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[1].abspath()}' '${SRC[1].parent.abspath(env)}'",
2010-10-16 02:31:10 +04:00
source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt',
target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c'
)
HEIMDAL_GENERATOR(
name = 'HEIMDAL_MAP_TABLE',
2010-11-21 15:05:37 +03:00
rule="${PYTHON} '${SRC[0].abspath()}' '${SRC[2].abspath()}' '${SRC[2].parent.abspath(env)}'",
2010-10-16 02:31:10 +04:00
source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt',
target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c'
)
HEIMDAL_LIBRARY('wind',
2010-10-16 19:13:10 +04:00
'lib/wind/wind_err.c lib/wind/stringprep.c lib/wind/errorlist.c lib/wind/errorlist_table.c lib/wind/normalize.c lib/wind/normalize_table.c lib/wind/combining.c lib/wind/combining_table.c lib/wind/utf8.c lib/wind/bidi.c lib/wind/bidi_table.c lib/wind/ldap.c lib/wind/map.c lib/wind/map_table.c',
2010-10-16 02:31:10 +04:00
includes='../heimdal/lib/wind',
deps='roken com_err',
vnum='0.0.0',
2010-12-17 21:55:54 +03:00
version_script='lib/wind/version-script.map',
2010-10-16 02:31:10 +04:00
)
2010-10-04 16:13:24 +04:00
if not bld.CONFIG_SET('USING_SYSTEM_COM_ERR'):
2010-10-04 20:05:00 +04:00
HEIMDAL_LIBRARY('com_err',
2010-10-16 19:13:10 +04:00
'lib/com_err/com_err.c lib/com_err/error.c',
2010-10-04 16:13:24 +04:00
includes='../heimdal/lib/com_err',
2013-08-02 01:00:21 +04:00
deps='roken samba_intl',
2010-10-13 23:18:05 +04:00
vnum='0.25',
2010-12-17 21:50:52 +03:00
version_script='lib/com_err/version-script.map',
2010-10-04 16:13:24 +04:00
)
2010-06-23 12:09:02 +04:00
2010-10-16 03:49:41 +04:00
HEIMDAL_SUBSYSTEM('HEIMDAL_VERS_HOSTCC',
2010-10-16 18:37:11 +04:00
'lib/vers/print_version.c ../heimdal_build/version.c',
2010-10-16 03:49:41 +04:00
group='build_compilers',
deps='LIBREPLACE_HOSTCC ROKEN_HOSTCC',
use_global_deps=False,
use_hostcc=True)
HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
2010-10-16 18:37:11 +04:00
'lib/vers/print_version.c ../heimdal_build/version.c',
2010-10-16 03:49:41 +04:00
group='build_compilers',
2010-11-12 18:12:14 +03:00
deps='roken replace')
2010-10-16 03:49:41 +04:00
2011-01-01 03:25:10 +03:00
if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
# here is the asn1 compiler build rule
HEIMDAL_BINARY('asn1_compile',
2010-10-16 19:25:19 +04:00
'lib/asn1/main.c lib/asn1/gen.c lib/asn1/gen_copy.c lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c lib/asn1/asn1parse.c lib/asn1/lex.c',
2010-10-03 17:59:21 +04:00
use_hostcc=True,
2010-04-12 12:55:32 +04:00
use_global_deps=False,
2013-07-03 16:04:57 +04:00
cflags='-DSOCKET_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
2010-10-16 02:58:56 +04:00
includes='../heimdal/lib/asn1',
2010-06-23 12:09:02 +04:00
group='build_compilers',
2012-02-19 19:06:01 +04:00
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
2010-06-23 12:09:02 +04:00
install=False
2010-10-03 17:59:21 +04:00
)
2011-01-01 03:25:10 +03:00
bld.env['ASN1_COMPILE'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'asn1_compile')
2010-06-23 12:09:02 +04:00
2010-10-04 17:23:24 +04:00
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
2010-10-04 20:05:00 +04:00
HEIMDAL_BINARY('compile_et',
2010-10-16 19:25:19 +04:00
'lib/com_err/parse.c lib/com_err/lex.c lib/com_err/compile_et.c',
2010-10-04 17:23:24 +04:00
use_hostcc=True,
2010-06-23 12:09:02 +04:00
use_global_deps=False,
2010-10-04 17:23:24 +04:00
includes='../heimdal/lib/com_err',
2010-06-23 12:09:02 +04:00
group='build_compilers',
2013-07-03 16:04:57 +04:00
cflags='-DSOCKET_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
2012-02-19 19:06:01 +04:00
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
2010-06-23 12:09:02 +04:00
install=False
2010-10-04 17:23:24 +04:00
)
bld.env['COMPILE_ET'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'compile_et')
2010-06-23 12:09:02 +04:00
2010-10-04 20:05:00 +04:00
HEIMDAL_BINARY('samba4kinit',
2010-10-16 19:25:19 +04:00
'kuser/kinit.c',
2011-01-01 05:56:27 +03:00
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto',
2010-10-16 04:15:36 +04:00
install=False
2010-10-03 17:59:21 +04:00
)
2010-06-23 12:09:02 +04:00
2011-07-25 01:09:19 +04:00
HEIMDAL_BINARY('samba4kgetcred',
'kuser/kgetcred.c',
2013-06-16 08:02:57 +04:00
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto asn1',
2011-07-25 01:09:19 +04:00
install=False
)
2010-06-23 12:09:02 +04:00
2010-10-04 20:05:00 +04:00
HEIMDAL_BINARY('samba4kpasswd',
2010-10-16 19:25:19 +04:00
'kpasswd/kpasswd.c',
2011-01-01 05:56:27 +03:00
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto',
2010-10-16 04:15:36 +04:00
install=False
2010-10-03 17:59:21 +04:00
)
2011-07-14 17:55:32 +04:00
# Alias subsystem to allow common kerberos code that will
# otherwise link against MIT's gssapi_krb5 and k5crypto
#
# Note: that we also need this if we use system heimdal libraries
HEIMDAL_SUBSYSTEM('gssapi_krb5', '', deps='gssapi')
HEIMDAL_SUBSYSTEM('k5crypto', '', deps='krb5')