summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-04 16:27:16 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-05 00:38:34 +0200
commit6c81caedf618b742faed822c38c7c653fe95a37e (patch)
tree44f0a1951b8d64da6570dcee9ea9338380744f1b
parent017196ad8501bd44bbfedfff9c8e24d801426df7 (diff)
downloadsamba-6c81caedf618b742faed822c38c7c653fe95a37e.tar.gz
samba-6c81caedf618b742faed822c38c7c653fe95a37e.tar.bz2
samba-6c81caedf618b742faed822c38c7c653fe95a37e.zip
heimdal-build: Add heimdal specific subsystem function.
-rw-r--r--source4/heimdal_build/wscript_build62
1 files changed, 52 insertions, 10 deletions
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index 2f58a8f207..ace937878d 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -164,13 +164,12 @@ Build.BuildContext.HEIMDAL_AUTOPROTO_PRIVATE = HEIMDAL_AUTOPROTO_PRIVATE
def HEIMDAL_LIBRARY(bld, libname, source, deps,
includes='',
- public_deps='',
cflags='',
heimdal_autoproto=None,
heimdal_autoproto_options=None,
heimdal_autoproto_private=None):
bld.SAMBA_LIBRARY(libname=libname, source=source, deps=deps,
- public_deps=public_deps, cflags=cflags, includes=includes,
+ cflags=cflags, includes=includes,
is_bundled=True)
if heimdal_autoproto is not None:
bld.HEIMDAL_AUTOPROTO(heimdal_autoproto, source,
@@ -205,6 +204,50 @@ def HEIMDAL_GENERATOR(bld, name, rule, source='', target='',
return t
Build.BuildContext.HEIMDAL_GENERATOR = HEIMDAL_GENERATOR
+def HEIMDAL_SUBSYSTEM(bld, modname, source,
+ deps='',
+ includes='',
+ cflags='',
+ group='main',
+ depends_on='',
+ local_include=True,
+ local_include_first=True,
+ enabled=True,
+ use_hostcc=False,
+ use_global_deps=True,
+ vars=None):
+ '''define a Heimdal subsystem'''
+
+ if not enabled:
+ SET_TARGET_TYPE(bld, modname, 'DISABLED')
+ return
+
+ if not SET_TARGET_TYPE(bld, modname, 'SUBSYSTEM'):
+ return
+
+ source = bld.EXPAND_VARIABLES(source, vars=vars)
+ source = TO_LIST(source)
+
+ bld.SET_BUILD_GROUP(group)
+
+ t = bld(
+ features = 'cc',
+ source = source,
+ target = modname,
+ samba_cflags = CURRENT_CFLAGS(bld, modname, cflags),
+ depends_on = depends_on,
+ samba_deps = TO_LIST(deps),
+ samba_includes = includes,
+ local_include = local_include,
+ local_include_first = local_include_first,
+ samba_use_hostcc = use_hostcc,
+ samba_use_global_deps = use_global_deps
+ )
+
+ return t
+
+Build.BuildContext.HEIMDAL_SUBSYSTEM = HEIMDAL_SUBSYSTEM
+
bld.HEIMDAL_GENERATOR(
name="HEIMDAL_ERRORLIST",
rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
@@ -445,7 +488,7 @@ bld.HEIMDAL_LIBRARY('heimntlm',
)
-bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB_KEYS',
+bld.HEIMDAL_SUBSYSTEM('HEIMDAL_HDB_KEYS',
'../heimdal/lib/hdb/keys.c',
includes='../heimdal/lib/hdb',
deps='roken HEIMDAL_HCRYPTO krb5 HEIMDAL_HDB_ASN1'
@@ -561,33 +604,32 @@ bld.HEIMDAL_LIBRARY('krb5',
v4_glue.c version.c warn.c krb5_err.c
heim_err.c k524_err.c krb_err.c''') + ' krb5-glue.c',
includes='../heimdal/lib/krb5 ../heimdal/lib/asn1',
- public_deps='com_err',
heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h',
heimdal_autoproto_options='-E KRB5_LIB -q -P comment -o',
heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h',
cflags = bld.dynconfig_cflags(),
- deps='roken HEIMDAL_PKINIT_ASN1 wind HEIMDAL_KRB5_ASN1 hx509 HEIMDAL_HCRYPTO LIBSAMBA-HOSTCONFIG intl',
+ deps='roken HEIMDAL_PKINIT_ASN1 wind HEIMDAL_KRB5_ASN1 hx509 HEIMDAL_HCRYPTO LIBSAMBA-HOSTCONFIG intl com_err',
)
-bld.SAMBA_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
+bld.HEIMDAL_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
'../heimdal/lib/asn1/der_get.c ../heimdal/lib/asn1/der_put.c ../heimdal/lib/asn1/der_free.c ../heimdal/lib/asn1/der_format.c ../heimdal/lib/asn1/der_length.c ../heimdal/lib/asn1/der_copy.c ../heimdal/lib/asn1/der_cmp.c ../heimdal/lib/asn1/extra.c ../heimdal/lib/asn1/timegm.c ../heimdal/lib/asn1/asn1_err.c',
includes='../heimdal/lib/asn1',
deps='roken com_err'
)
-bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO_IMATH',
+bld.HEIMDAL_SUBSYSTEM('HEIMDAL_HCRYPTO_IMATH',
'../heimdal/lib/hcrypto/imath/imath.c ../heimdal/lib/hcrypto/imath/iprime.c',
includes='../heimdal/lib/hcrypto/imath',
deps='roken'
)
-bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO_LTM',
+bld.HEIMDAL_SUBSYSTEM('HEIMDAL_HCRYPTO_LTM',
'../heimdal/lib/hcrypto/libtommath/bncore.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init.c ../heimdal/lib/hcrypto/libtommath/bn_mp_clear.c ../heimdal/lib/hcrypto/libtommath/bn_mp_exch.c ../heimdal/lib/hcrypto/libtommath/bn_mp_grow.c ../heimdal/lib/hcrypto/libtommath/bn_mp_shrink.c ../heimdal/lib/hcrypto/libtommath/bn_mp_clamp.c ../heimdal/lib/hcrypto/libtommath/bn_mp_zero.c ../heimdal/lib/hcrypto/libtommath/bn_mp_zero_multi.c ../heimdal/lib/hcrypto/libtommath/bn_mp_set.c ../heimdal/lib/hcrypto/libtommath/bn_mp_set_int.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init_size.c ../heimdal/lib/hcrypto/libtommath/bn_mp_copy.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init_copy.c ../heimdal/lib/hcrypto/libtommath/bn_mp_abs.c ../heimdal/lib/hcrypto/libtommath/bn_mp_neg.c ../heimdal/lib/hcrypto/libtommath/bn_mp_cmp_mag.c ../heimdal/lib/hcrypto/libtommath/bn_mp_cmp.c ../heimdal/lib/hcrypto/libtommath/bn_mp_cmp_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_rshd.c ../heimdal/lib/hcrypto/libtommath/bn_mp_lshd.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mod_2d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_div_2d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mul_2d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_div_2.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mul_2.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_add.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_sub.c ../heimdal/lib/hcrypto/libtommath/bn_fast_s_mp_mul_digs.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_digs.c ../heimdal/lib/hcrypto/libtommath/bn_fast_s_mp_mul_high_digs.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c ../heimdal/lib/hcrypto/libtommath/bn_fast_s_mp_sqr.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_sqr.c ../heimdal/lib/hcrypto/libtommath/bn_mp_add.c ../heimdal/lib/hcrypto/libtommath/bn_mp_sub.c ../heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mul.c ../heimdal/lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c ../heimdal/lib/hcrypto/libtommath/bn_mp_sqr.c ../heimdal/lib/hcrypto/libtommath/bn_mp_div.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_add_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_sub_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mul_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_div_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mod_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_expt_d.c ../heimdal/lib/hcrypto/libtommath/bn_mp_addmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_submod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_mulmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_sqrmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_gcd.c ../heimdal/lib/hcrypto/libtommath/bn_mp_lcm.c ../heimdal/lib/hcrypto/libtommath/bn_fast_mp_invmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_invmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce.c ../heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_setup.c ../heimdal/lib/hcrypto/libtommath/bn_fast_mp_montgomery_reduce.c ../heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c ../heimdal/lib/hcrypto/libtommath/bn_mp_exptmod_fast.c ../heimdal/lib/hcrypto/libtommath/bn_mp_exptmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_2expt.c ../heimdal/lib/hcrypto/libtommath/bn_mp_n_root.c ../heimdal/lib/hcrypto/libtommath/bn_mp_jacobi.c ../heimdal/lib/hcrypto/libtommath/bn_reverse.c ../heimdal/lib/hcrypto/libtommath/bn_mp_count_bits.c ../heimdal/lib/hcrypto/libtommath/bn_mp_read_unsigned_bin.c ../heimdal/lib/hcrypto/libtommath/bn_mp_read_signed_bin.c ../heimdal/lib/hcrypto/libtommath/bn_mp_to_unsigned_bin.c ../heimdal/lib/hcrypto/libtommath/bn_mp_to_signed_bin.c ../heimdal/lib/hcrypto/libtommath/bn_mp_unsigned_bin_size.c ../heimdal/lib/hcrypto/libtommath/bn_mp_signed_bin_size.c ../heimdal/lib/hcrypto/libtommath/bn_mp_xor.c ../heimdal/lib/hcrypto/libtommath/bn_mp_and.c ../heimdal/lib/hcrypto/libtommath/bn_mp_or.c ../heimdal/lib/hcrypto/libtommath/bn_mp_rand.c ../heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_is_divisible.c ../heimdal/lib/hcrypto/libtommath/bn_prime_tab.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_fermat.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_is_prime.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c ../heimdal/lib/hcrypto/libtommath/bn_mp_find_prime.c ../heimdal/lib/hcrypto/libtommath/bn_mp_isprime.c ../heimdal/lib/hcrypto/libtommath/bn_mp_dr_reduce.c ../heimdal/lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c ../heimdal/lib/hcrypto/libtommath/bn_mp_dr_setup.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_setup.c ../heimdal/lib/hcrypto/libtommath/bn_mp_toom_mul.c ../heimdal/lib/hcrypto/libtommath/bn_mp_toom_sqr.c ../heimdal/lib/hcrypto/libtommath/bn_mp_div_3.c ../heimdal/lib/hcrypto/libtommath/bn_s_mp_exptmod.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c ../heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c ../heimdal/lib/hcrypto/libtommath/bn_mp_radix_smap.c ../heimdal/lib/hcrypto/libtommath/bn_mp_read_radix.c ../heimdal/lib/hcrypto/libtommath/bn_mp_toradix.c ../heimdal/lib/hcrypto/libtommath/bn_mp_radix_size.c ../heimdal/lib/hcrypto/libtommath/bn_mp_fread.c ../heimdal/lib/hcrypto/libtommath/bn_mp_fwrite.c ../heimdal/lib/hcrypto/libtommath/bn_mp_cnt_lsb.c ../heimdal/lib/hcrypto/libtommath/bn_error.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init_multi.c ../heimdal/lib/hcrypto/libtommath/bn_mp_clear_multi.c ../heimdal/lib/hcrypto/libtommath/bn_mp_exteuclid.c ../heimdal/lib/hcrypto/libtommath/bn_mp_toradix_n.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_random_ex.c ../heimdal/lib/hcrypto/libtommath/bn_mp_get_int.c ../heimdal/lib/hcrypto/libtommath/bn_mp_sqrt.c ../heimdal/lib/hcrypto/libtommath/bn_mp_is_square.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init_set.c ../heimdal/lib/hcrypto/libtommath/bn_mp_init_set_int.c ../heimdal/lib/hcrypto/libtommath/bn_mp_invmod_slow.c ../heimdal/lib/hcrypto/libtommath/bn_mp_prime_rabin_miller_trials.c ../heimdal/lib/hcrypto/libtommath/bn_mp_to_signed_bin_n.c ../heimdal/lib/hcrypto/libtommath/bn_mp_to_unsigned_bin_n.c',
includes='../heimdal/lib/hcrypto/libtommath'
)
-bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO',
+bld.HEIMDAL_SUBSYSTEM('HEIMDAL_HCRYPTO',
'../heimdal/lib/hcrypto/aes.c ../heimdal/lib/hcrypto/bn.c ../heimdal/lib/hcrypto/dh.c ../heimdal/lib/hcrypto/dh-ltm.c ../heimdal/lib/hcrypto/dh-imath.c ../heimdal/lib/hcrypto/des.c ../heimdal/lib/hcrypto/dsa.c ../heimdal/lib/hcrypto/engine.c ../heimdal/lib/hcrypto/md2.c ../heimdal/lib/hcrypto/md4.c ../heimdal/lib/hcrypto/md5.c ../heimdal/lib/hcrypto/rsa.c ../heimdal/lib/hcrypto/rsa-ltm.c ../heimdal/lib/hcrypto/rsa-imath.c ../heimdal/lib/hcrypto/rc2.c ../heimdal/lib/hcrypto/rc4.c ../heimdal/lib/hcrypto/rijndael-alg-fst.c ../heimdal/lib/hcrypto/rnd_keys.c ../heimdal/lib/hcrypto/sha.c ../heimdal/lib/hcrypto/sha256.c ../heimdal/lib/hcrypto/sha512.c ../heimdal/lib/hcrypto/ui.c ../heimdal/lib/hcrypto/evp.c ../heimdal/lib/hcrypto/evp-hcrypto.c ../heimdal/lib/hcrypto/pkcs5.c ../heimdal/lib/hcrypto/pkcs12.c ../heimdal/lib/hcrypto/rand.c ../heimdal/lib/hcrypto/rand-egd.c ../heimdal/lib/hcrypto/rand-unix.c ../heimdal/lib/hcrypto/rand-fortuna.c ../heimdal/lib/hcrypto/rand-timer.c ../heimdal/lib/hcrypto/hmac.c ../heimdal/lib/hcrypto/camellia.c ../heimdal/lib/hcrypto/camellia-ntt.c ../heimdal/lib/hcrypto/common.c ../heimdal/lib/hcrypto/validate.c',
includes='../heimdal/lib/hcrypto ../heimdal/lib',
deps='roken HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO_IMATH HEIMDAL_RFC2459_ASN1 HEIMDAL_HCRYPTO_LTM'
@@ -607,7 +649,7 @@ bld.HEIMDAL_LIBRARY('wind',
deps='roken com_err',
)
-bld.SAMBA_SUBSYSTEM('ROKEN_HOSTCC',
+bld.HEIMDAL_SUBSYSTEM('ROKEN_HOSTCC',
ROKEN_HOSTCC_SOURCE,
use_hostcc=True,
use_global_deps=False,