2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2010-03-17 13:46:38 +03:00
2018-02-02 17:34:32 +03:00
import os
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
2020-04-03 13:01:15 +03:00
from samba_utils import LOAD_ENVIRONMENT, TO_LIST
2010-10-16 21:01:18 +04:00
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
2018-02-02 17:34:32 +03:00
return os.path.normpath(os.path.join(bld.path.abspath(), hpath))
2010-10-16 19:06:41 +04:00
2010-10-16 19:08:27 +04:00
def heimdal_paths(ps):
2020-04-03 13:01:15 +03: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,
2021-12-07 06:34:54 +03:00
options='',
directory='',
option_file=None,
includes='',
template=True):
2010-10-03 18:08:13 +04:00
'''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)
2023-08-29 03:06:13 +03:00
bname = os.path.basename(source)[0:-5]
2010-10-03 18:08:13 +04:00
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([
2022-02-21 09:12:28 +03:00
"%s/asn1_%s_asn1.c" % (directory, bname),
"%s/%s_asn1.h" % (directory, bname),
"%s/%s_asn1-priv.h" % (directory, bname),
"%s/%s_asn1_oids.c" % (directory, bname),
2010-10-16 19:21:05 +04:00
])
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
2020-01-18 11:35:42 +03:00
cd_rule = 'cd "${TGT[0].parent.abspath(env)}" &&'
2019-05-06 04:12:33 +03:00
env = LOAD_ENVIRONMENT()
if env.ADDRESS_SANITIZER:
# If address sanitizer is enabled, we need to suppress leak checking
# in the asn1 tool.
2020-01-18 11:35:42 +03:00
no_leak_check = " ASAN_OPTIONS=detect_leaks=0"
2019-05-06 04:12:33 +03:00
else:
no_leak_check = ""
2021-12-07 06:34:54 +03:00
if template:
template_str = " --template "
else:
template_str = ""
asn1_rule = cd_rule + \
no_leak_check + \
' "${ASN1_COMPILE}" ${OPTION_FILE} ${ASN1OPTIONS} ' \
+ template_str \
+ ' --one-code-file "${SRC[0].abspath(env)}" ${ASN1NAME}'
2010-10-03 18:08:13 +04:00
2020-04-03 13:01:15 +03: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,
2022-02-21 09:12:28 +03:00
ext_out = '.c',
2015-10-03 23:29:15 +03:00
before = 'c',
2015-03-07 17:31:18 +03:00
update_outputs = True,
2010-10-03 18:08:13 +04:00
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:
2018-09-19 11:31:34 +03:00
t.env.OPTION_FILE = "--option-file='%s'" % \
os.path.normpath(os.path.join(bld.path.abspath(), option_file))
2010-10-03 18:08:13 +04:00
2022-02-21 09:12:28 +03:00
cfile = out_files[0]
hfile = out_files[1]
hpriv = out_files[2]
2010-10-03 18:08:13 +04:00
2010-10-04 20:05:00 +04:00
bld.set_group('main')
2010-10-03 18:08:13 +04:00
2020-04-03 13:01:15 +03:00
includes = TO_LIST(includes)
2010-10-03 18:08:13 +04:00
includes.append(os.path.dirname(out_files[0]))
2021-12-07 06:34:54 +03:00
cflags=[]
if not template:
cflags = bld.env.HEIMDAL_UNPICKY_WNO_FREE_NOHEAP_OBJECT_CFLAGS
2015-10-03 23:29:15 +03:00
t = bld(features = 'c',
2010-10-03 18:08:13 +04:00
source = cfile,
target = name,
2021-12-07 06:34:54 +03:00
samba_cflags = CURRENT_CFLAGS(bld, name, cflags),
2010-10-03 18:08:13 +04:00
depends_on = '',
2021-12-07 06:34:54 +03:00
samba_deps = TO_LIST('roken replace heimbase '
'HEIMDAL_HEIM_ASN1'),
2019-10-20 21:36:11 +03:00
samba_includes = includes,
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)
2023-08-29 03:06:13 +03:00
bname = source[0:-3] # strip off the .et suffix
2010-10-03 18:04:34 +04:00
if not SET_TARGET_TYPE(bld, name, 'ET'):
return
2021-06-15 04:50:48 +03:00
bld.set_group('hostcc_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',
2016-03-26 15:18:07 +03:00
before = 'c',
2015-03-07 17:31:18 +03:00
update_outputs = True,
2010-10-03 18:04:34 +04:00
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,
2015-03-07 17:31:18 +03:00
update_outputs=True,
2010-10-03 18:01:58 +04:00
ext_out='.c',
2016-03-26 15:18:07 +03:00
before='c')
2022-01-19 15:15:45 +03:00
t.env.HEIMDAL = os.path.join(bld.srcnode.abspath(), 'third_party/heimdal')
2010-10-03 18:01:58 +04:00
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),
2015-03-07 17:31:18 +03:00
update_outputs=True,
2018-04-20 14:01:51 +03:00
before='c',
2010-12-08 06:57:31 +03:00
ext_out='.c',
vars=[rule],
samba_type='GENERATOR',
name=name)
2021-12-23 21:29:06 +03:00
def HEIMDAL_LIBRARY(libname, source, deps, version_script=None, includes='', cflags=''):
2010-10-04 18:48:34 +04:00
'''define a Heimdal library'''
2021-08-18 18:55:25 +03:00
cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=False,
2021-11-30 19:03:06 +03:00
extra_cflags=cflags)
2021-08-18 18:55:25 +03:00
source = heimdal_paths(source)
2021-12-23 21:29:06 +03:00
if version_script is not None:
orig_vscript_map = heimdal_path(version_script, absolute=False)
else:
orig_vscript_map = None
2021-08-18 18:55:25 +03:00
bld.SAMBA_LIBRARY(libname, source,
deps=deps,
includes=includes,
cflags=cflags,
cflags_end=cflags_end,
allow_warnings=allow_warnings,
private_library=True,
orig_vscript_map=orig_vscript_map)
2010-10-04 18:48:34 +04:00
2021-06-14 02:14:06 +03:00
def HEIMDAL_CFLAGS(use_hostcc=False, extra_cflags=[]):
cflags_unpicky=[]
2021-06-16 07:51:14 +03:00
if bld.env.allow_heimdal_warnings:
2021-06-14 02:14:06 +03:00
cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS
2021-06-16 07:51:14 +03:00
cflags_unpicky += bld.env.HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS
2021-06-14 02:14:06 +03:00
# old compilers on centos7 or ubuntu1604 need this
allow_warnings = bld.env.allow_heimdal_warnings
cflags_picky = bld.env.HEIMDAL_NO_ERROR_CFLAGS
extra_cflags=TO_LIST(extra_cflags)
cflags = ''
cflags_end = cflags_picky + cflags_unpicky + extra_cflags
return (cflags, cflags_end, allow_warnings)
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'''
2021-06-14 02:14:06 +03:00
cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc,
extra_cflags=cflags)
2010-10-16 19:08:27 +04:00
source = heimdal_paths(source)
2010-10-04 18:27:16 +04:00
2021-06-14 02:14:06 +03:00
bld.SAMBA_SUBSYSTEM(modname,
source = source,
deps = deps,
includes = includes,
cflags = cflags,
cflags_end = cflags_end,
allow_warnings = allow_warnings,
group = group,
use_hostcc = use_hostcc,
use_global_deps= use_global_deps)
2010-10-04 18:27:16 +04:00
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'''
2021-11-30 19:03:06 +03:00
cflags, cflags_end, allow_warnings = HEIMDAL_CFLAGS(use_hostcc=use_hostcc,
extra_cflags=cflags)
2019-11-04 04:42:24 +03:00
source = heimdal_paths(source)
2010-10-04 19:17:00 +04:00
2021-04-19 03:57:38 +03:00
obj_target = binname + '.heimdal.objlist'
HEIMDAL_SUBSYSTEM(obj_target,
source = source,
deps = deps,
includes = includes,
cflags = cflags,
group = group,
use_hostcc = use_hostcc,
use_global_deps= use_global_deps)
2019-11-04 04:42:24 +03:00
bld.SAMBA_BINARY(binname,
2021-04-19 03:57:38 +03:00
source = '',
deps = obj_target,
2019-11-04 04:42:24 +03:00
includes = includes,
cflags = cflags,
2021-06-14 02:14:06 +03:00
cflags_end = cflags_end,
allow_warnings = allow_warnings,
2019-11-04 04:42:24 +03:00
group = group,
use_hostcc = use_hostcc,
use_global_deps= use_global_deps,
install_path = None,
2021-04-19 03:57:38 +03:00
install = install)
2010-10-04 19:17:00 +04:00
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(
2021-06-15 04:50:48 +03:00
group='hostcc_base_build_source',
2010-10-16 02:58:56 +04:00
name="HEIMDAL_ERR_H",
rule="rm -f ${TGT} && ln ${SRC} ${TGT}",
source = '../heimdal/lib/roken/err.hin',
target = '../heimdal/lib/roken/err.h',
)
s4 heimdal_build: Fix static heimdal builds with replacement closefrom()
If Samba was configured with "--nonshared-binary=winexe" to build
winexe as a static binary, and the replacement closefrom() function
was used (which is default on most GNU/Linux systems without the libbsd
development package installed), then winexe would fail to link with the
error message shown below.
[2631/3059] Linking bin/default/examples/winexe/winexe
source4/heimdal/lib/roken/closefrom.c.1.o: In function `rep_closefrom':
closefrom.c:(.text+0x0): multiple definition of `rep_closefrom'
lib/replace/closefrom.c.2.o:closefrom.c:(.text+0x292): first defined here
collect2: error: ld returned 1 exit status
The real problem here was not with the winexe build itself - that was
merely the application that I was attempting to build statically when I
encountered it. As Andrew Bartlett very helpfully pointed out to me, this
regression was introduced when "lib/replace/closefrom.c" was added in
commit 55529d0f and, more to the point, when the heimdal build started
using it in commit 3a7ebd0e. From that point on, any time that Samba's
embedded copy of heimdal was statically linked into an application, it
would fail to link because heimdal's own rep_closefrom() function in its
"roken" library would conflict with the rep_closefrom() function in the
"replace" library used elsewhere in Samba - a library which the "roken"
library itself depends on. To further compound the problem, heimdal's
own "roken" library is also compiled for the host (a necessary
distinction for cross-compiled builds) and linked into a small number of
utility applications used during the heimdal build. However, they can't
link directly against the "replace" library, unlike the main "roken"
library build which carries that dependency, because the "replace"
library is _not_ built for the host.
I solved this problem by eliminating heimdal's version of rep_closefrom()
and making it use the one from "lib/replace" everywhere. That wasn't a
problem for the main heimdal library that is built for the target because
it was already linking in "lib/replace" (that's what caused this problem
in the first place!), but to solve the aforementioned issue with
"lib/replace" not being built for the host, I added
"lib/replace/closefrom.c" to the list of "source4/heimdal/lib/roken"
sources to be built for the host to satisfy heimdal's host utilities.
Everyone wins, I think.
Signed-off-by: Karl Lenz <xorangekiller@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-05 03:27:46 +03:00
ROKEN_COMMON_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
2021-12-07 06:34:54 +03:00
lib/roken/getauxval.c
2010-10-16 18:37:11 +04:00
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
2021-12-07 06:34:54 +03:00
lib/roken/secure_getenv.c
2010-10-16 18:37:11 +04:00
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
2021-12-07 06:34:54 +03:00
lib/roken/clz.c
2010-10-16 18:37:11 +04:00
lib/roken/xfree.c
2021-12-07 06:34:54 +03:00
lib/roken/timeval.c
lib/roken/mergesort.c
lib/roken/mergesort_r.c
2010-10-16 18:37:11 +04:00
../heimdal_build/replace.c
2010-10-03 17:59:21 +04:00
'''
2010-06-23 12:09:02 +04:00
2020-09-08 13:13:20 +03:00
ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE
2010-10-16 02:58:56 +04:00
s4 heimdal_build: Fix static heimdal builds with replacement closefrom()
If Samba was configured with "--nonshared-binary=winexe" to build
winexe as a static binary, and the replacement closefrom() function
was used (which is default on most GNU/Linux systems without the libbsd
development package installed), then winexe would fail to link with the
error message shown below.
[2631/3059] Linking bin/default/examples/winexe/winexe
source4/heimdal/lib/roken/closefrom.c.1.o: In function `rep_closefrom':
closefrom.c:(.text+0x0): multiple definition of `rep_closefrom'
lib/replace/closefrom.c.2.o:closefrom.c:(.text+0x292): first defined here
collect2: error: ld returned 1 exit status
The real problem here was not with the winexe build itself - that was
merely the application that I was attempting to build statically when I
encountered it. As Andrew Bartlett very helpfully pointed out to me, this
regression was introduced when "lib/replace/closefrom.c" was added in
commit 55529d0f and, more to the point, when the heimdal build started
using it in commit 3a7ebd0e. From that point on, any time that Samba's
embedded copy of heimdal was statically linked into an application, it
would fail to link because heimdal's own rep_closefrom() function in its
"roken" library would conflict with the rep_closefrom() function in the
"replace" library used elsewhere in Samba - a library which the "roken"
library itself depends on. To further compound the problem, heimdal's
own "roken" library is also compiled for the host (a necessary
distinction for cross-compiled builds) and linked into a small number of
utility applications used during the heimdal build. However, they can't
link directly against the "replace" library, unlike the main "roken"
library build which carries that dependency, because the "replace"
library is _not_ built for the host.
I solved this problem by eliminating heimdal's version of rep_closefrom()
and making it use the one from "lib/replace" everywhere. That wasn't a
problem for the main heimdal library that is built for the target because
it was already linking in "lib/replace" (that's what caused this problem
in the first place!), but to solve the aforementioned issue with
"lib/replace" not being built for the host, I added
"lib/replace/closefrom.c" to the list of "source4/heimdal/lib/roken"
sources to be built for the host to satisfy heimdal's host utilities.
Everyone wins, I think.
Signed-off-by: Karl Lenz <xorangekiller@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-05 03:27:46 +03:00
ROKEN_SOURCE = ROKEN_COMMON_SOURCE + '''
2010-10-16 18:37:11 +04:00
lib/roken/resolve.c
lib/roken/socket.c
lib/roken/roken_gethostby.c
2021-12-07 06:34:54 +03:00
lib/roken/mkostemp.c
lib/roken/getuserinfo.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,
2019-12-02 15:21:57 +03:00
includes='../heimdal/lib/roken ../heimdal/include ../heimdal_build/include',
2010-11-12 18:22:43 +03:00
deps='resolv util replace',
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,
2019-12-02 15:21:57 +03:00
includes='../heimdal/lib/roken ../heimdal/include ../heimdal_build/include',
2021-06-15 04:50:48 +03:00
group='hostcc_base_build_main',
2010-10-16 02:58:56 +04:00
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"):
2021-12-07 06:34:54 +03:00
HEIMDAL_LIB_GSS_PREAUTH_SOURCE = '''
lib/gss_preauth/pa_client.c
lib/gss_preauth/pa_common.c
'''
HEIMDAL_LIBRARY('gss_preauth',
source=HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
includes='../heimdal/lib/gss_preauth',
deps='roken gssapi')
HEIMDAL_AUTOPROTO('lib/gss_preauth/gss-preauth-private.h',
HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
options='-q -P remove -p')
HEIMDAL_AUTOPROTO('lib/gss_preauth/gss-preauth-protos.h',
HEIMDAL_LIB_GSS_PREAUTH_SOURCE,
options='-E KRB5_LIB -q -P remove -o')
2011-01-01 04:10:05 +03:00
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
2022-02-22 05:53:34 +03:00
KDC_SOURCE='kdc/default_config.c kdc/fast.c kdc/kerberos5.c kdc/krb5tgs.c kdc/pkinit.c kdc/pkinit-ec.c kdc/mssfu.c kdc/log.c kdc/misc.c kdc/digest.c kdc/process.c kdc/kdc-plugin.c kdc/kx509.c kdc/gss_preauth.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',
2021-12-07 06:34:54 +03:00
deps='roken krb5 hdb asn1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 heimntlm hcrypto com_err wind heimbase gssapi gss_preauth',
2011-01-01 04:10:05 +03:00
version_script='kdc/version-script.map')
2022-02-22 05:30:17 +03:00
HEIMDAL_AUTOPROTO('kdc/kdc-protos.h', KDC_SOURCE, options='-E KDC_LIB -q -P comment -o')
2011-01-01 04:10:05 +03:00
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',
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',
2022-02-22 09:41:14 +03:00
option_file="lib/hdb/hdb.opt",
2021-12-07 06:34:54 +03:00
template=False,
2011-01-01 04:10:05 +03:00
includes='../heimdal/lib/asn1')
2010-06-23 12:09:02 +04:00
2017-09-25 04:00:51 +03:00
HDB_KEYS_SOURCE = 'lib/hdb/keys.c'
2011-01-01 04:10:05 +03:00
HEIMDAL_SUBSYSTEM('HEIMDAL_HDB_KEYS',
2017-09-25 04:00:51 +03:00
HDB_KEYS_SOURCE,
2011-01-01 04:10:05 +03:00
includes='../heimdal/lib/hdb',
2017-09-25 04:00:51 +03:00
deps='roken hcrypto krb5 HEIMDAL_HDB_ASN1',
2011-01-01 04:10:05 +03:00
)
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
2021-12-07 06:34:54 +03:00
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
lib/hdb/common.c
../heimdal_build/hdb-glue.c'''
2011-01-01 04:10:05 +03:00
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',
)
2017-09-25 04:00:51 +03:00
HEIMDAL_AUTOPROTO('lib/hdb/hdb-protos.h', HDB_SOURCE + " " + HDB_KEYS_SOURCE)
HEIMDAL_AUTOPROTO_PRIVATE('lib/hdb/hdb-private.h', HDB_SOURCE + " " + HDB_KEYS_SOURCE)
2011-01-01 04:10:05 +03:00
if not bld.CONFIG_SET("USING_SYSTEM_GSSAPI"):
2021-12-07 06:34:54 +03:00
HEIMDAL_ERRTABLE('HEIMDAL_NEGOEX_ERR_ET', 'lib/gssapi/spnego/negoex_err.et')
2011-01-01 04:10:05 +03:00
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',
2021-12-07 06:34:54 +03:00
template=False,
2011-01-01 04:10:05 +03:00
directory='lib/gssapi'
)
HEIMDAL_ASN1('HEIMDAL_SPNEGO_ASN1',
source='lib/gssapi/spnego/spnego.asn1',
options='--sequence=MechTypeList',
includes='../heimdal/lib/asn1',
2021-12-07 06:34:54 +03:00
template=False,
2011-01-01 04:10:05 +03:00
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
2021-12-07 06:34:54 +03:00
lib/gssapi/spnego/context_storage.c
2011-07-14 17:26:03 +04:00
lib/gssapi/spnego/accept_sec_context.c
2021-12-07 06:34:54 +03:00
lib/gssapi/spnego/negoex_ctx.c
lib/gssapi/spnego/negoex_err.c
lib/gssapi/spnego/negoex_util.c
2011-07-14 17:26:03 +04:00
'''
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
2021-12-07 06:34:54 +03:00
lib/gssapi/krb5/duplicate_cred.c
2011-07-14 17:26:03 +04:00
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
2022-02-22 04:09:52 +03:00
lib/gssapi/krb5/name_attrs.c
2011-07-14 17:26:03 +04:00
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
2021-12-07 06:34:54 +03:00
lib/gssapi/krb5/ccache_name.c
2011-07-14 17:26:03 +04:00
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
2021-12-07 06:34:54 +03:00
lib/gssapi/krb5/gkrb5_err.c
2011-07-14 17:26:03 +04:00
'''
HEIMDAL_AUTOPROTO_PRIVATE('lib/gssapi/krb5/gsskrb5-private.h',
HEIMDAL_GSSAPI_KRB5_SOURCE)
2021-12-07 06:34:54 +03:00
HEIMDAL_GSSAPI_MECH_SOURCE = '''
lib/gssapi/mech/cred.c
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_add_cred_from.c
lib/gssapi/mech/gss_acquire_cred_from.c
lib/gssapi/mech/gss_cred.c
lib/gssapi/mech/gss_store_cred_into.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_duplicate_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_duplicate_cred.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_get_neg_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_export_name_composite.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
2022-02-22 04:09:52 +03:00
lib/gssapi/mech/gss_authorize_localname.c
lib/gssapi/mech/gss_get_name_attribute.c
2021-12-07 06:34:54 +03:00
lib/gssapi/mech/gssspi_exchange_meta_data.c
lib/gssapi/mech/gssspi_query_mechanism_info.c
lib/gssapi/mech/gssspi_query_meta_data.c
../heimdal_build/gssapi-glue.c
'''
2022-10-12 03:55:51 +03:00
HEIMDAL_SUBSYSTEM('gssapi-subsystem',
2021-12-07 06:34:54 +03:00
HEIMDAL_GSSAPI_SPNEGO_SOURCE +
HEIMDAL_GSSAPI_KRB5_SOURCE +
HEIMDAL_GSSAPI_MECH_SOURCE,
2022-10-12 03:55:51 +03:00
includes='../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech ../heimdal/lib/ntlm',
deps='hcrypto asn1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 roken krb5 com_err wind heimbase',
cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
)
HEIMDAL_LIBRARY('gssapi',
'',
includes='../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech ../heimdal/lib/ntlm',
deps='gssapi-subsystem',
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'
)
2021-12-07 06:34:54 +03:00
HEIMDAL_SUBSYSTEM('HEIMDAL_IPC_CLIENT',
[os.path.join('lib/ipc', x) for x in TO_LIST(
'''client.c common.c''')],
includes='../heimdal/include ../heimdal/lib/asn1 ../heimdal/lib/ipc',
deps='roken heimbase')
2011-01-01 04:05:23 +03:00
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')
2021-12-07 06:34:54 +03:00
HEIMDAL_ERRTABLE('HEIMDAL_K5E1_ERR_ET', 'lib/krb5/k5e1_err.et')
HEIMDAL_ERRTABLE('HEIMDAL_KX509_ERR_ET', 'lib/krb5/kx509_err.et')
HEIMDAL_ERRTABLE('HEIMDAL_HEIM_ERR_ET', 'lib/base/heim_err.et')
2011-01-01 04:05:23 +03:00
2022-06-09 11:51:54 +03:00
krb5_crypto_cflags = []
if bld.CONFIG_SET('HAVE_WUSE_AFTER_FREE_1'):
krb5_crypto_cflags.append('-Werror=use-after-free=1')
HEIMDAL_SUBSYSTEM('KRB5_CRYPTO',
'lib/krb5/crypto.c',
includes='../heimdal/lib/krb5 ../heimdal/include',
deps='wind hcrypto',
cflags=krb5_crypto_cflags)
2020-04-03 13:01:15 +03:00
KRB5_SOURCE = [os.path.join('lib/krb5/', x) for x in TO_LIST(
2011-01-01 04:05:23 +03:00
'''acache.c add_et_list.c
addr_families.c appdefault.c
2021-08-13 12:44:37 +03:00
asn1_glue.c auth_context.c authdata.c
2011-01-01 04:05:23 +03:00
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
2022-06-09 11:51:54 +03:00
crypto-aes-sha1.c crypto-aes-sha2.c crypto-algs.c
2011-01-01 04:05:23 +03:00
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
2021-12-07 06:34:54 +03:00
data.c dcache.c db_plugin.c deprecated.c eai_to_heim_errno.c enomem.c
2011-01-01 04:05:23 +03:00
error_string.c expand_hostname.c
2021-12-07 06:34:54 +03:00
fast.c fcache.c free.c free_host_realm.c
2011-01-01 04:05:23 +03:00
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
2023-03-31 20:42:13 +03:00
keytab_keyfile.c krbhst.c krcache.c log.c
2011-01-01 04:05:23 +03:00
mcache.c misc.c mk_error.c mk_priv.c
mk_rep.c mk_req.c mk_req_ext.c
2021-12-07 06:34:54 +03:00
mit_glue.c net_read.c net_write.c n-fold.c padata.c pkinit.c pkinit-ec.c
2011-01-01 04:05:23 +03:00
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
2021-12-07 06:34:54 +03:00
salt.c salt-aes-sha1.c salt-aes-sha2.c salt-arcfour.c salt-des3.c salt-des.c
2011-01-01 04:05:23 +03:00
send_to_kdc.c set_default_realm.c
store.c store-int.c store_emem.c store_fd.c
2021-12-07 06:34:54 +03:00
store_mem.c store_stdio.c ticket.c time.c transited.c
version.c warn.c krb5_err.c sp800-108-kdf.c
aname_to_localname.c kuserok.c kx509.c
mk_cred.c kx509_err.c
k524_err.c krb_err.c k5e1_err.c''')] + ["../heimdal_build/krb5-glue.c"]
2011-01-01 04:05:23 +03:00
2023-03-31 20:42:13 +03:00
krb5_keyutils_dep = ''
if bld.CONFIG_SET('HAVE_KEYCTL_GET_PERSISTENT'):
krb5_keyutils_dep = ' keyutils'
2011-01-01 04:05:23 +03:00
HEIMDAL_LIBRARY('krb5', KRB5_SOURCE,
version_script='lib/krb5/version-script.map',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/include',
2023-03-31 20:42:13 +03:00
deps='roken wind asn1 hx509 HEIMDAL_KX509_ASN1 hcrypto com_err HEIMDAL_CONFIG heimbase execinfo samba_intl HEIMDAL_IPC_CLIENT KRB5_CRYPTO' + krb5_keyutils_dep,
2021-12-07 06:34:54 +03:00
cflags=['-DLOCALSTATEDIR="/2"'] + bld.dynconfig_cflags(),
2011-01-01 04:05:23 +03:00
)
2022-06-09 11:51:54 +03:00
KRB5_PROTO_SOURCE = KRB5_SOURCE + ['lib/krb5/expand_path.c', 'lib/krb5/plugin.c', 'lib/krb5/context.c', 'lib/krb5/crypto.c']
2011-01-01 04:05:23 +03:00
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"):
2021-12-07 06:34:54 +03:00
HEIMDAL_HEIM_ASN1_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
2021-12-07 06:34:54 +03:00
lib/asn1/der_print.c
lib/asn1/extra.c
lib/asn1/timegm.c
lib/asn1/template.c
lib/asn1/oid_resolution.c
2010-10-16 05:27:02 +04:00
'''
2010-10-16 19:16:44 +04:00
HEIMDAL_AUTOPROTO('lib/asn1/der-protos.h',
2021-12-07 06:34:54 +03:00
HEIMDAL_HEIM_ASN1_SOURCE,
2021-06-15 04:50:48 +03:00
group='hostcc_build_source',
2010-10-16 05:27:02 +04:00
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',
2021-12-07 06:34:54 +03:00
HEIMDAL_HEIM_ASN1_SOURCE,
2021-06-15 04:50:48 +03:00
group='hostcc_build_source',
2010-10-16 05:27:02 +04:00
options="-q -P comment -p")
2011-01-01 04:05:23 +03:00
HEIMDAL_ERRTABLE('HEIMDAL_ASN1_ERR_ET', 'lib/asn1/asn1_err.et')
2019-03-26 23:14:13 +03:00
heimdal_heim_asn1_cflags = ''
if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
heimdal_heim_asn1_cflags = '-Wno-format-truncation'
2010-10-16 05:27:02 +04:00
HEIMDAL_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
2021-12-07 06:34:54 +03:00
HEIMDAL_HEIM_ASN1_SOURCE + 'lib/asn1/asn1_err.c',
2010-06-23 12:09:02 +04:00
includes='../heimdal/lib/asn1',
2019-03-26 23:14:13 +03:00
cflags=heimdal_heim_asn1_cflags,
2021-12-07 06:34:54 +03:00
deps='''roken com_err
HEIMDAL_CMS_ASN1
HEIMDAL_DIGEST_ASN1
HEIMDAL_KRB5_ASN1
HEIMDAL_KX509_ASN1
HEIMDAL_OCSP_ASN1
HEIMDAL_PKCS10_ASN1
HEIMDAL_PKCS12_ASN1
HEIMDAL_PKCS8_ASN1
HEIMDAL_PKCS9_ASN1
HEIMDAL_PKINIT_ASN1
HEIMDAL_RFC2459_ASN1
HEIMDAL_RFC4108_ASN1
'''
)
HEIMDAL_ASN1('HEIMDAL_CRMF_ASN1',
'lib/asn1/crmf.asn1',
option_file='lib/asn1/crmf.opt',
directory='lib/asn1',
template=False
2010-10-16 05:27:02 +04:00
)
2010-12-17 23:51:21 +03:00
HEIMDAL_ASN1('HEIMDAL_RFC2459_ASN1',
'lib/asn1/rfc2459.asn1',
2021-06-15 06:24:17 +03:00
option_file='lib/asn1/rfc2459.opt',
2010-12-17 23:51:21 +03:00
directory='lib/asn1'
)
2021-12-07 06:34:54 +03:00
HEIMDAL_ASN1('HEIMDAL_RFC4108_ASN1',
'lib/asn1/rfc4108.asn1',
directory='lib/asn1'
)
2010-12-17 23:51:21 +03:00
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",
2021-08-18 16:47:33 +03:00
source='')
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"):
2021-12-07 06:34:54 +03:00
# As directly listed in lib/hcrypto/libtommath/makefile.shared
libtommath_o = "\
bn_cutoffs.o bn_deprecated.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o \
bn_mp_and.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \
bn_mp_cnt_lsb.o bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o \
bn_mp_div_2d.o bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o"
full_path_libtommath_c = \
[os.path.join('lib/hcrypto/libtommath',
x.split(".o")[0] + ".c")
for x in TO_LIST(libtommath_o)]
2010-12-22 03:25:20 +03:00
HEIMDAL_SUBSYSTEM('tommath',
2021-12-07 06:34:54 +03:00
full_path_libtommath_c,
includes='../heimdal/lib/hcrypto/libtommath'
)
2010-06-23 12:09:02 +04:00
2010-12-22 03:25:20 +03:00
HEIMDAL_LIBRARY('hcrypto',
2023-01-09 06:13:33 +03:00
'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/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-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',
2010-12-22 03:25:20 +03:00
includes='../heimdal/lib/hcrypto ../heimdal/lib ../heimdal/include',
deps='roken asn1 tommath replace',
version_script='lib/hcrypto/version-script.map',
)
2010-11-12 07:27:43 +03:00
2010-12-22 03:33:50 +03:00
if not bld.CONFIG_SET('USING_SYSTEM_HEIMBASE'):
2021-12-07 06:34:54 +03:00
HEIMBASE_SOURCE_COMMON = '''
lib/base/array.c
lib/base/bool.c
lib/base/bsearch.c
lib/base/data.c
lib/base/db.c
lib/base/dict.c
lib/base/error.c
lib/base/heimbase.c
lib/base/string.c
lib/base/number.c
lib/base/null.c
lib/base/json.c
lib/base/heim_err.c
'''
HEIMBASE_SOURCE = HEIMBASE_SOURCE_COMMON + '''
lib/base/config_file.c
lib/base/context.c
lib/base/error_string.c
lib/base/expand_path.c
lib/base/log.c
lib/base/plugin.c
lib/base/warn.c
'''
HEIMDAL_AUTOPROTO('lib/base/heimbase-protos.h',
HEIMBASE_SOURCE,
group='hostcc_build_source')
2010-12-22 03:33:50 +03:00
HEIMDAL_LIBRARY('heimbase',
2021-12-07 06:34:54 +03:00
HEIMBASE_SOURCE,
includes='../heimdal/lib/base ../heimdal/include ../heimdal/lib/krb5',
deps='roken replace com_err',
cflags=['-DLOCALSTATEDIR="/2"'] + bld.dynconfig_cflags(),
version_script='lib/base/version-script.map',
2010-12-22 03:25:20 +03:00
)
2010-06-23 12:09:02 +04:00
2021-12-07 06:34:54 +03:00
HEIMBASE_HOSTCC_SOURCE = HEIMBASE_SOURCE_COMMON + '''
lib/com_err/com_err.c
lib/com_err/error.c
'''
HEIMDAL_SUBSYSTEM('HEIMBASE_HOSTCC',
HEIMBASE_HOSTCC_SOURCE,
use_hostcc=True,
use_global_deps=False,
includes='../heimdal/lib/base ../heimdal/lib/com_err ../heimdal/include ../heimdal/lib/krb5',
group='hostcc_build_main',
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC',
)
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',
2021-12-07 06:34:54 +03:00
'lib/asn1/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',
2021-12-07 06:34:54 +03:00
'lib/asn1/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
2021-12-07 06:34:54 +03:00
lib/hx509/crypto-ec.c
2010-10-16 18:37:11 +04:00
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',
2021-11-24 01:49:37 +03:00
HEIMDAL_HX509_OBJH_SOURCE + ' lib/hx509/sel-lex.l lib/hx509/sel-gram.y',
2010-10-16 04:25:40 +04:00
includes='../heimdal/lib/hx509',
2021-12-07 06:34:54 +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 heimbase',
2021-07-07 06:23:17 +03:00
cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
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',
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-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',
2021-06-15 04:50:48 +03:00
group='hostcc_base_build_main',
2010-10-16 03:49:41 +04:00
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-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'):
2021-12-02 03:25:07 +03:00
HEIMDAL_SUBSYSTEM('HEIMDAL_ASN1_GEN_HOSTCC',
'lib/asn1/gen.c',
includes='../heimdal/lib/asn1',
group='hostcc_build_main',
cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
2021-12-07 06:34:54 +03:00
deps='ROKEN_HOSTCC HEIMBASE_HOSTCC',
2021-12-02 03:25:07 +03:00
use_global_deps=False,
use_hostcc=True)
2011-01-01 03:25:10 +03:00
# here is the asn1 compiler build rule
HEIMDAL_BINARY('asn1_compile',
2021-12-07 06:34:54 +03:00
'lib/asn1/gen_copy.c lib/asn1/gen_print.c '
2018-04-20 14:01:51 +03:00
'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 '
2021-03-29 23:39:00 +03:00
'lib/asn1/asn1parse.y lib/asn1/lex.l lib/asn1/main.c',
2018-04-20 14:01:51 +03:00
use_hostcc=True,
2010-04-12 12:55:32 +04:00
use_global_deps=False,
2010-10-16 02:58:56 +04:00
includes='../heimdal/lib/asn1',
2021-06-15 04:50:48 +03:00
group='hostcc_build_main',
2021-12-07 06:34:54 +03:00
deps='ROKEN_HOSTCC HEIMBASE_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC '
2021-07-06 03:26:17 +03:00
'HEIMDAL_ASN1_GEN_HOSTCC',
2010-06-23 12:09:02 +04:00
install=False
2010-10-03 17:59:21 +04:00
)
2018-06-26 22:16:26 +03:00
bld.env['ASN1_COMPILE'] = os.path.join(bld.bldnode.parent.abspath(), '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',
2021-03-29 23:39:00 +03:00
'lib/com_err/parse.y lib/com_err/lex.l 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',
2021-06-15 04:50:48 +03:00
group='hostcc_base_build_main',
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
)
2018-06-27 00:25:03 +03:00
bld.env['COMPILE_ET'] = os.path.join(bld.bldnode.parent.abspath(), 'compile_et')
2010-06-23 12:09:02 +04:00
2021-12-07 01:30:10 +03:00
if bld.CONFIG_SET('USING_EMBEDDED_HEIMDAL'):
HEIMDAL_BINARY('samba4kinit',
'kuser/kinit.c',
2021-12-07 06:34:54 +03:00
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto gssapi gss_preauth',
2021-12-07 01:30:10 +03:00
install=False
)
2010-06-23 12:09:02 +04:00
2021-12-07 01:30:10 +03:00
HEIMDAL_BINARY('samba4kgetcred',
'kuser/kgetcred.c',
2021-12-07 06:34:54 +03:00
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto asn1 gssapi gss_preauth',
2021-12-07 01:30:10 +03:00
install=False
)
2010-06-23 12:09:02 +04:00
2021-12-07 01:30:10 +03:00
HEIMDAL_BINARY('samba4kpasswd',
'kpasswd/kpasswd.c',
deps='krb5 heimntlm roken HEIMDAL_VERS hcrypto',
install=False
)
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')