use std::collections::HashSet;
use std::ffi::OsStr;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::{env, fs};

/// Source files to compile for libsmbclient
const SRC_FILES: &[&str] = &[
    "third_party/heimdal/lib/com_err/compile_et.c",
    "third_party/heimdal/lib/com_err/parse.tab.c",
    "third_party/heimdal/lib/com_err/lex.lex.c",
    "lib/replace/replace.c",
    "third_party/heimdal/lib/vers/print_version.c",
    "third_party/heimdal_build/version.c",
    "third_party/heimdal_build/compile_et.objlist.empty.c",
    "third_party/heimdal/lib/roken/base64.c",
    "third_party/heimdal/lib/roken/ct.c",
    "third_party/heimdal/lib/roken/hex.c",
    "third_party/heimdal/lib/roken/bswap.c",
    "third_party/heimdal/lib/roken/dumpdata.c",
    "third_party/heimdal/lib/roken/emalloc.c",
    "third_party/heimdal/lib/roken/ecalloc.c",
    "third_party/heimdal/lib/roken/getarg.c",
    "third_party/heimdal/lib/roken/getauxval.c",
    "third_party/heimdal/lib/roken/get_window_size.c",
    "third_party/heimdal/lib/roken/getdtablesize.c",
    "third_party/heimdal/lib/roken/h_errno.c",
    "third_party/heimdal/lib/roken/issuid.c",
    "third_party/heimdal/lib/roken/net_read.c",
    "third_party/heimdal/lib/roken/net_write.c",
    "third_party/heimdal/lib/roken/parse_time.c",
    "third_party/heimdal/lib/roken/parse_units.c",
    "third_party/heimdal/lib/roken/vis.c",
    "third_party/heimdal/lib/roken/strlwr.c",
    "third_party/heimdal/lib/roken/strsep_copy.c",
    "third_party/heimdal/lib/roken/strsep.c",
    "third_party/heimdal/lib/roken/strupr.c",
    "third_party/heimdal/lib/roken/strpool.c",
    "third_party/heimdal/lib/roken/estrdup.c",
    "third_party/heimdal/lib/roken/erealloc.c",
    "third_party/heimdal/lib/roken/secure_getenv.c",
    "third_party/heimdal/lib/roken/simple_exec.c",
    "third_party/heimdal/lib/roken/strcollect.c",
    "third_party/heimdal/lib/roken/rtbl.c",
    "third_party/heimdal/lib/roken/rand.c",
    "third_party/heimdal/lib/roken/cloexec.c",
    "third_party/heimdal/lib/roken/clz.c",
    "third_party/heimdal/lib/roken/xfree.c",
    "third_party/heimdal/lib/roken/timeval.c",
    "third_party/heimdal/lib/roken/mergesort.c",
    "third_party/heimdal/lib/roken/mergesort_r.c",
    "third_party/heimdal_build/replace.c",
    "third_party/heimdal/lib/base/array.c",
    "third_party/heimdal/lib/base/bool.c",
    "third_party/heimdal/lib/base/bsearch.c",
    "third_party/heimdal/lib/base/data.c",
    "third_party/heimdal/lib/base/db.c",
    "third_party/heimdal/lib/base/dict.c",
    "third_party/heimdal/lib/base/error.c",
    "third_party/heimdal/lib/base/heimbase.c",
    "third_party/heimdal/lib/base/string.c",
    "third_party/heimdal/lib/base/number.c",
    "third_party/heimdal/lib/base/null.c",
    "third_party/heimdal/lib/base/json.c",
    "third_party/heimdal/lib/base/heim_err.c",
    "third_party/heimdal/lib/com_err/com_err.c",
    "third_party/heimdal/lib/com_err/error.c",
    "third_party/heimdal/lib/asn1/gen_copy.c",
    "third_party/heimdal/lib/asn1/gen_print.c",
    "third_party/heimdal/lib/asn1/gen_decode.c",
    "third_party/heimdal/lib/asn1/gen_encode.c",
    "third_party/heimdal/lib/asn1/gen_free.c",
    "third_party/heimdal/lib/asn1/gen_glue.c",
    "third_party/heimdal/lib/asn1/gen_length.c",
    "third_party/heimdal/lib/asn1/gen_seq.c",
    "third_party/heimdal/lib/asn1/gen_template.c",
    "third_party/heimdal/lib/asn1/hash.c",
    "third_party/heimdal/lib/asn1/symbol.c",
    "third_party/heimdal/lib/asn1/main.c",
    "third_party/heimdal/lib/asn1/asn1parse.tab.c",
    "third_party/heimdal/lib/asn1/lex.lex.c",
    "third_party/heimdal_build/asn1_compile.objlist.empty.c",
    "third_party/heimdal/lib/asn1/gen.c",
    "lib/talloc/talloc.c",
    "lib/util/time_basic.c",
    "lib/util/blocking.c",
    "lib/util/close_low_fd.c",
    #[cfg(target_os = "linux")]
    "lib/util/gpfswrap.c",
    "lib/util/debug.c",
    "lib/util/iov_buf.c",
    "third_party/heimdal/lib/roken/resolve.c",
    "third_party/heimdal/lib/roken/socket.c",
    "third_party/heimdal/lib/roken/roken_gethostby.c",
    "third_party/heimdal/lib/roken/mkostemp.c",
    "third_party/heimdal/lib/roken/getuserinfo.c",
    "lib/tevent/tevent.c",
    "lib/tevent/tevent_debug.c",
    "lib/tevent/tevent_fd.c",
    "lib/tevent/tevent_immediate.c",
    "lib/tevent/tevent_queue.c",
    "lib/tevent/tevent_req.c",
    "lib/tevent/tevent_wrapper.c",
    "lib/tevent/tevent_poll.c",
    "lib/tevent/tevent_threads.c",
    "lib/tevent/tevent_signal.c",
    "lib/tevent/tevent_standard.c",
    "lib/tevent/tevent_timed.c",
    "lib/tevent/tevent_util.c",
    "lib/tevent/tevent_wakeup.c",
    #[cfg(target_os = "linux")]
    "lib/tevent/tevent_epoll.c",
    "lib/util/sys_rw.c",
    "lib/util/sys_rw_data.c",
    "lib/util/fault.c",
    "lib/util/signal.c",
    "lib/util/util_process.c",
    "lib/util/genrand.c",
    "lib/util/setid.c",
    "lib/util/charset/iconv.c",
    "lib/util/charset/weird.c",
    "lib/util/charset/charset_macosxfs.c",
    "lib/util/tini.c",
    "lib/util/charset/codepoints.c",
    "lib/util/charset/convert_string.c",
    "lib/util/charset/util_str.c",
    "lib/util/charset/util_unistr_w.c",
    "lib/util/charset/pull_push.c",
    "lib/util/charset/util_unistr.c",
    "lib/util/tiniparser.c",
    "lib/util/data_blob.c",
    "lib/util/util_file.c",
    "lib/util/sys_popen.c",
    "lib/util/time.c",
    "lib/util/util.c",
    "lib/util/idtree.c",
    "lib/util/substitute.c",
    "lib/util/util_strlist.c",
    "lib/util/strv_util.c",
    "lib/util/bitmap.c",
    "lib/util/select.c",
    "lib/util/pidfile.c",
    "lib/util/become_daemon.c",
    "lib/util/mkdir_p.c",
    "lib/util/smb_strtox.c",
    "lib/crypto/md4.c",
    "lib/util/ms_fnmatch.c",
    "lib/util/strv.c",
    "lib/util/base64.c",
    "lib/util/dprintf.c",
    "lib/util/dns_cmp.c",
    "lib/util/fsusage.c",
    "lib/util/genrand_util.c",
    "lib/util/getpass.c",
    "lib/util/idtree_random.c",
    "lib/util/memcache.c",
    "lib/util/params.c",
    "lib/util/rbtree.c",
    "lib/util/rfc1738.c",
    "lib/util/server_id.c",
    "lib/util/smb_threads.c",
    "lib/util/system.c",
    "lib/util/talloc_keep_secret.c",
    "lib/util/talloc_stack.c",
    "lib/util/tevent_debug.c",
    "lib/util/tfork.c",
    "lib/util/tftw.c",
    "lib/util/unix_match.c",
    "lib/util/util_id.c",
    "lib/util/util_net.c",
    "lib/util/util_paths.c",
    "lib/util/util_str.c",
    "lib/util/util_str_common.c",
    "lib/util/util_strlist_v3.c",
    "dynconfig/dynconfig.c",
    "lib/util/util_str_hex.c",
    "libcli/util/doserr.c",
    "libcli/util/errormap.c",
    "libcli/util/nterr.c",
    "libcli/util/errmap_unix.c",
    "libcli/util/hresult.c",
    "third_party/heimdal/lib/base/config_file.c",
    "third_party/heimdal/lib/base/context.c",
    "third_party/heimdal/lib/base/error_string.c",
    "third_party/heimdal/lib/base/expand_path.c",
    "third_party/heimdal/lib/base/log.c",
    "third_party/heimdal/lib/base/plugin.c",
    "third_party/heimdal/lib/base/warn.c",
    "librpc/ndr/ndr_string.c",
    "librpc/ndr/ndr_basic.c",
    "librpc/ndr/uuid.c",
    "librpc/ndr/ndr.c",
    "librpc/ndr/ndr_misc.c",
    "librpc/gen_ndr/ndr_misc.c",
    "librpc/ndr/util.c",
    "lib/util/stable_sort.c",
    "third_party/heimdal/lib/asn1/asn1_pkcs8_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_pkcs9_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_rfc4108_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_rfc2459_asn1.c",
    "third_party/heimdal/lib/hx509/asn1_pkcs10_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_krb5_asn1.c",
    "third_party/heimdal/lib/asn1/der_get.c",
    "third_party/heimdal/lib/asn1/der_put.c",
    "third_party/heimdal/lib/asn1/der_free.c",
    "third_party/heimdal/lib/asn1/der_format.c",
    "third_party/heimdal/lib/asn1/der_length.c",
    "third_party/heimdal/lib/asn1/der_copy.c",
    "third_party/heimdal/lib/asn1/der_cmp.c",
    "third_party/heimdal/lib/asn1/der_print.c",
    "third_party/heimdal/lib/asn1/extra.c",
    "third_party/heimdal/lib/asn1/timegm.c",
    "third_party/heimdal/lib/asn1/template.c",
    "third_party/heimdal/lib/asn1/oid_resolution.c",
    "third_party/heimdal/lib/asn1/asn1_err.c",
    "third_party/heimdal_build/asn1.empty.c",
    "third_party/heimdal/lib/asn1/asn1_kx509_asn1.c",
    "third_party/heimdal/lib/hx509/asn1_ocsp_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_digest_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_pkinit_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_cms_asn1.c",
    "third_party/heimdal/lib/asn1/asn1_pkcs12_asn1.c",
    "lib/tdb/common/check.c",
    "lib/tdb/common/error.c",
    "lib/tdb/common/tdb.c",
    "lib/tdb/common/traverse.c",
    "lib/tdb/common/freelistcheck.c",
    "lib/tdb/common/lock.c",
    "lib/tdb/common/dump.c",
    "lib/tdb/common/freelist.c",
    "lib/tdb/common/io.c",
    "lib/tdb/common/open.c",
    "lib/tdb/common/transaction.c",
    "lib/tdb/common/hash.c",
    "lib/tdb/common/summary.c",
    "lib/tdb/common/rescue.c",
    "lib/tdb/common/mutex.c",
    "librpc/gen_ndr/ndr_security.c",
    "librpc/ndr/ndr_sec_helper.c",
    "librpc/gen_ndr/ndr_conditional_ace.c",
    "libcli/security/dom_sid.c",
    "libcli/security/display_sec.c",
    "libcli/security/secace.c",
    "libcli/security/secacl.c",
    "libcli/security/security_descriptor.c",
    "libcli/security/sddl.c",
    "libcli/security/privileges.c",
    "libcli/security/security_token.c",
    "libcli/security/access_check.c",
    "libcli/security/object_tree.c",
    "libcli/security/create_descriptor.c",
    "libcli/security/util_sid.c",
    "libcli/security/session.c",
    "libcli/security/secdesc.c",
    "libcli/security/conditional_ace.c",
    "libcli/security/sddl_conditional_ace.c",
    "libcli/security/claims-conversions.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_cutoffs.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_deprecated.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_2expt.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_abs.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_add.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_add_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_addmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_and.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clamp.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clear.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_clear_multi.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cmp_mag.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_cnt_lsb.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_complement.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_copy.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_count_bits.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_decr.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_2.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_2d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_3.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_div_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_reduce.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_dr_setup.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_error_to_string.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exch.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_expt_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exptmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_exteuclid.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_fread.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_from_sbin.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_from_ubin.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_fwrite.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_gcd.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_double.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_i32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_i64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_ll.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_u64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_ul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_get_mag_ull.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_grow.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_incr.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_copy.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_i32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_i64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ll.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_multi.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_set.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_size.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_u64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_init_ull.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_invmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_is_square.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_iseven.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_isodd.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_kronecker.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_lcm.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_log_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_lshd.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod_2d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mod_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_montgomery_setup.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_2.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_2d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mul_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_mulmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_neg.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_or.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_pack.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_pack_count.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_fermat.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_frobenius_underwood.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_is_prime.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_rabin_miller_trials.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_rand.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_prime_strong_lucas_selfridge.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_radix_size.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_radix_smap.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_rand.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_read_radix.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_reduce_setup.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_root_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_rshd.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sbin_size.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_double.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_i32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_i64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_l.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ll.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_u32.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_u64.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_set_ull.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_shrink.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_signed_rsh.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqr.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrt.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sqrtmod_prime.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sub.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_sub_d.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_submod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_radix.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_sbin.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_to_ubin.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_ubin_size.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_unpack.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_xor.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_mp_zero.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_prime_tab.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_add.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_balance_mul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_exptmod.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_exptmod_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_get_bit.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_invmod_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_invmod_slow.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_karatsuba_mul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_karatsuba_sqr.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_montgomery_reduce_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_digs.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_digs_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_prime_is_divisible.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_rand_jenkins.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_rand_platform.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_reverse.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sqr.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sqr_fast.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_sub.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_toom_mul.c",
    "third_party/heimdal/lib/hcrypto/libtommath/bn_s_mp_toom_sqr.c",
    "third_party/heimdal/lib/hcrypto/aes.c",
    "third_party/heimdal/lib/hcrypto/bn.c",
    "third_party/heimdal/lib/hcrypto/dh.c",
    "third_party/heimdal/lib/hcrypto/dh-ltm.c",
    "third_party/heimdal/lib/hcrypto/des.c",
    "third_party/heimdal/lib/hcrypto/dsa.c",
    "third_party/heimdal/lib/hcrypto/engine.c",
    "third_party/heimdal/lib/hcrypto/md4.c",
    "third_party/heimdal/lib/hcrypto/md5.c",
    "third_party/heimdal/lib/hcrypto/rsa.c",
    "third_party/heimdal/lib/hcrypto/rsa-ltm.c",
    "third_party/heimdal/lib/hcrypto/rc2.c",
    "third_party/heimdal/lib/hcrypto/rc4.c",
    "third_party/heimdal/lib/hcrypto/rijndael-alg-fst.c",
    "third_party/heimdal/lib/hcrypto/rnd_keys.c",
    "third_party/heimdal/lib/hcrypto/sha.c",
    "third_party/heimdal/lib/hcrypto/sha256.c",
    "third_party/heimdal/lib/hcrypto/sha512.c",
    "third_party/heimdal/lib/hcrypto/ui.c",
    "third_party/heimdal/lib/hcrypto/evp.c",
    "third_party/heimdal/lib/hcrypto/evp-hcrypto.c",
    "third_party/heimdal/lib/hcrypto/pkcs5.c",
    "third_party/heimdal/lib/hcrypto/pkcs12.c",
    "third_party/heimdal/lib/hcrypto/rand.c",
    "third_party/heimdal/lib/hcrypto/rand-unix.c",
    "third_party/heimdal/lib/hcrypto/rand-fortuna.c",
    "third_party/heimdal/lib/hcrypto/rand-timer.c",
    "third_party/heimdal/lib/hcrypto/hmac.c",
    "third_party/heimdal/lib/hcrypto/camellia.c",
    "third_party/heimdal/lib/hcrypto/camellia-ntt.c",
    "third_party/heimdal/lib/hcrypto/common.c",
    "third_party/heimdal/lib/hcrypto/validate.c",
    "third_party/heimdal/lib/wind/wind_err.c",
    "third_party/heimdal/lib/wind/stringprep.c",
    "third_party/heimdal/lib/wind/errorlist.c",
    "third_party/heimdal/lib/wind/errorlist_table.c",
    "third_party/heimdal/lib/wind/normalize.c",
    "third_party/heimdal/lib/wind/normalize_table.c",
    "third_party/heimdal/lib/wind/combining.c",
    "third_party/heimdal/lib/wind/combining_table.c",
    "third_party/heimdal/lib/wind/utf8.c",
    "third_party/heimdal/lib/wind/bidi.c",
    "third_party/heimdal/lib/wind/bidi_table.c",
    "third_party/heimdal/lib/wind/ldap.c",
    "third_party/heimdal/lib/wind/map.c",
    "third_party/heimdal/lib/wind/map_table.c",
    "librpc/gen_ndr/ndr_dns.c",
    "librpc/ndr/ndr_dns.c",
    "librpc/ndr/ndr_dns_utils.c",
    "librpc/gen_ndr/ndr_nbt.c",
    "librpc/ndr/ndr_nbt.c",
    "librpc/gen_ndr/ndr_dnsp.c",
    "librpc/ndr/ndr_dnsp.c",
    "libcli/nbt/nbtname.c",
    "third_party/heimdal/lib/hx509/ca.c",
    "third_party/heimdal/lib/hx509/cert.c",
    "third_party/heimdal/lib/hx509/cms.c",
    "third_party/heimdal/lib/hx509/collector.c",
    "third_party/heimdal/lib/hx509/crypto.c",
    "third_party/heimdal/lib/hx509/crypto-ec.c",
    "third_party/heimdal/lib/hx509/error.c",
    "third_party/heimdal/lib/hx509/env.c",
    "third_party/heimdal/lib/hx509/file.c",
    "third_party/heimdal/lib/hx509/keyset.c",
    "third_party/heimdal/lib/hx509/ks_dir.c",
    "third_party/heimdal/lib/hx509/ks_file.c",
    "third_party/heimdal/lib/hx509/ks_keychain.c",
    "third_party/heimdal/lib/hx509/ks_mem.c",
    "third_party/heimdal/lib/hx509/ks_null.c",
    "third_party/heimdal/lib/hx509/ks_p11.c",
    "third_party/heimdal/lib/hx509/ks_p12.c",
    "third_party/heimdal/lib/hx509/lock.c",
    "third_party/heimdal/lib/hx509/name.c",
    "third_party/heimdal/lib/hx509/peer.c",
    "third_party/heimdal/lib/hx509/print.c",
    "third_party/heimdal/lib/hx509/req.c",
    "third_party/heimdal/lib/hx509/revoke.c",
    "third_party/heimdal/lib/hx509/sel.c",
    "third_party/heimdal/lib/hx509/hx509_err.c",
    "third_party/heimdal/lib/hx509/sel-lex.lex.c",
    "third_party/heimdal/lib/hx509/sel-gram.tab.c",
    "lib/util/tevent_unix.c",
    "lib/util/tevent_ntstatus.c",
    "lib/util/tevent_werror.c",
    "lib/util/tevent_req_profile.c",
    "lib/util/util_tdb.c",
    "lib/tdb_wrap/tdb_wrap.c",
    "lib/param/loadparm_server_role.c",
    "librpc/gen_ndr/ndr_wkssvc.c",
    "librpc/gen_ndr/ndr_dssetup.c",
    "librpc/gen_ndr/ndr_netlogon.c",
    "librpc/ndr/ndr_netlogon.c",
    "librpc/gen_ndr/ndr_notify.c",
    "librpc/gen_ndr/ndr_srvsvc.c",
    "librpc/ndr-standard.empty.c",
    "librpc/gen_ndr/ndr_samr.c",
    "librpc/gen_ndr/ndr_ntsvcs.c",
    "librpc/gen_ndr/ndr_initshutdown.c",
    "librpc/ndr/ndr_spoolss_buf.c",
    "librpc/gen_ndr/ndr_echo.c",
    "librpc/gen_ndr/ndr_eventlog6.c",
    "librpc/gen_ndr/ndr_winreg.c",
    "librpc/gen_ndr/ndr_eventlog.c",
    "librpc/gen_ndr/ndr_atsvc.c",
    "librpc/gen_ndr/ndr_file_id.c",
    "librpc/gen_ndr/ndr_dfs.c",
    "librpc/gen_ndr/ndr_server_id.c",
    "librpc/gen_ndr/ndr_lsa.c",
    "librpc/gen_ndr/ndr_svcctl.c",
    "librpc/ndr/ndr_svcctl.c",
    "librpc/gen_ndr/ndr_spoolss.c",
    "third_party/heimdal/lib/krb5/crypto.c",
    "third_party/heimdal/lib/krb5/acache.c",
    "third_party/heimdal/lib/krb5/add_et_list.c",
    "third_party/heimdal/lib/krb5/addr_families.c",
    "third_party/heimdal/lib/krb5/appdefault.c",
    "third_party/heimdal/lib/krb5/asn1_glue.c",
    "third_party/heimdal/lib/krb5/auth_context.c",
    "third_party/heimdal/lib/krb5/authdata.c",
    "third_party/heimdal/lib/krb5/build_ap_req.c",
    "third_party/heimdal/lib/krb5/build_auth.c",
    "third_party/heimdal/lib/krb5/cache.c",
    "third_party/heimdal/lib/krb5/changepw.c",
    "third_party/heimdal/lib/krb5/codec.c",
    "third_party/heimdal/lib/krb5/config_file.c",
    "third_party/heimdal/lib/krb5/constants.c",
    "third_party/heimdal/lib/krb5/convert_creds.c",
    "third_party/heimdal/lib/krb5/copy_host_realm.c",
    "third_party/heimdal/lib/krb5/crc.c",
    "third_party/heimdal/lib/krb5/creds.c",
    "third_party/heimdal/lib/krb5/crypto-aes-sha1.c",
    "third_party/heimdal/lib/krb5/crypto-aes-sha2.c",
    "third_party/heimdal/lib/krb5/crypto-algs.c",
    "third_party/heimdal/lib/krb5/crypto-arcfour.c",
    "third_party/heimdal/lib/krb5/crypto-des3.c",
    "third_party/heimdal/lib/krb5/crypto-des.c",
    "third_party/heimdal/lib/krb5/crypto-des-common.c",
    "third_party/heimdal/lib/krb5/crypto-evp.c",
    "third_party/heimdal/lib/krb5/crypto-null.c",
    "third_party/heimdal/lib/krb5/crypto-pk.c",
    "third_party/heimdal/lib/krb5/crypto-rand.c",
    "third_party/heimdal/lib/krb5/data.c",
    "third_party/heimdal/lib/krb5/dcache.c",
    "third_party/heimdal/lib/krb5/db_plugin.c",
    "third_party/heimdal/lib/krb5/deprecated.c",
    "third_party/heimdal/lib/krb5/eai_to_heim_errno.c",
    "third_party/heimdal/lib/krb5/enomem.c",
    "third_party/heimdal/lib/krb5/error_string.c",
    "third_party/heimdal/lib/krb5/expand_hostname.c",
    "third_party/heimdal/lib/krb5/fast.c",
    "third_party/heimdal/lib/krb5/fcache.c",
    "third_party/heimdal/lib/krb5/free.c",
    "third_party/heimdal/lib/krb5/free_host_realm.c",
    "third_party/heimdal/lib/krb5/generate_seq_number.c",
    "third_party/heimdal/lib/krb5/generate_subkey.c",
    "third_party/heimdal/lib/krb5/get_addrs.c",
    "third_party/heimdal/lib/krb5/get_cred.c",
    "third_party/heimdal/lib/krb5/get_default_principal.c",
    "third_party/heimdal/lib/krb5/get_default_realm.c",
    "third_party/heimdal/lib/krb5/get_for_creds.c",
    "third_party/heimdal/lib/krb5/get_host_realm.c",
    "third_party/heimdal/lib/krb5/get_in_tkt.c",
    "third_party/heimdal/lib/krb5/get_port.c",
    "third_party/heimdal/lib/krb5/init_creds.c",
    "third_party/heimdal/lib/krb5/init_creds_pw.c",
    "third_party/heimdal/lib/krb5/kcm.c",
    "third_party/heimdal/lib/krb5/keyblock.c",
    "third_party/heimdal/lib/krb5/keytab.c",
    "third_party/heimdal/lib/krb5/keytab_any.c",
    "third_party/heimdal/lib/krb5/keytab_file.c",
    "third_party/heimdal/lib/krb5/keytab_memory.c",
    "third_party/heimdal/lib/krb5/keytab_keyfile.c",
    "third_party/heimdal/lib/krb5/krbhst.c",
    "third_party/heimdal/lib/krb5/krcache.c",
    "third_party/heimdal/lib/krb5/log.c",
    "third_party/heimdal/lib/krb5/mcache.c",
    "third_party/heimdal/lib/krb5/misc.c",
    "third_party/heimdal/lib/krb5/mk_error.c",
    "third_party/heimdal/lib/krb5/mk_priv.c",
    "third_party/heimdal/lib/krb5/mk_rep.c",
    "third_party/heimdal/lib/krb5/mk_req.c",
    "third_party/heimdal/lib/krb5/mk_req_ext.c",
    "third_party/heimdal/lib/krb5/mit_glue.c",
    "third_party/heimdal/lib/krb5/net_read.c",
    "third_party/heimdal/lib/krb5/net_write.c",
    "third_party/heimdal/lib/krb5/n-fold.c",
    "third_party/heimdal/lib/krb5/padata.c",
    "third_party/heimdal/lib/krb5/pkinit.c",
    "third_party/heimdal/lib/krb5/pkinit-ec.c",
    "third_party/heimdal/lib/krb5/principal.c",
    "third_party/heimdal/lib/krb5/prog_setup.c",
    "third_party/heimdal/lib/krb5/pac.c",
    "third_party/heimdal/lib/krb5/pcache.c",
    "third_party/heimdal/lib/krb5/prompter_posix.c",
    "third_party/heimdal/lib/krb5/rd_cred.c",
    "third_party/heimdal/lib/krb5/rd_error.c",
    "third_party/heimdal/lib/krb5/rd_priv.c",
    "third_party/heimdal/lib/krb5/rd_rep.c",
    "third_party/heimdal/lib/krb5/rd_req.c",
    "third_party/heimdal/lib/krb5/replay.c",
    "third_party/heimdal/lib/krb5/salt.c",
    "third_party/heimdal/lib/krb5/salt-aes-sha1.c",
    "third_party/heimdal/lib/krb5/salt-aes-sha2.c",
    "third_party/heimdal/lib/krb5/salt-arcfour.c",
    "third_party/heimdal/lib/krb5/salt-des3.c",
    "third_party/heimdal/lib/krb5/salt-des.c",
    "third_party/heimdal/lib/krb5/send_to_kdc.c",
    "third_party/heimdal/lib/krb5/set_default_realm.c",
    "third_party/heimdal/lib/krb5/store.c",
    "third_party/heimdal/lib/krb5/store-int.c",
    "third_party/heimdal/lib/krb5/store_emem.c",
    "third_party/heimdal/lib/krb5/store_fd.c",
    "third_party/heimdal/lib/krb5/store_mem.c",
    "third_party/heimdal/lib/krb5/store_stdio.c",
    "third_party/heimdal/lib/krb5/ticket.c",
    "third_party/heimdal/lib/krb5/time.c",
    "third_party/heimdal/lib/krb5/transited.c",
    "third_party/heimdal/lib/krb5/version.c",
    "third_party/heimdal/lib/krb5/warn.c",
    "third_party/heimdal/lib/krb5/krb5_err.c",
    "third_party/heimdal/lib/krb5/sp800-108-kdf.c",
    "third_party/heimdal/lib/krb5/aname_to_localname.c",
    "third_party/heimdal/lib/krb5/kuserok.c",
    "third_party/heimdal/lib/krb5/kx509.c",
    "third_party/heimdal/lib/krb5/mk_cred.c",
    "third_party/heimdal/lib/krb5/kx509_err.c",
    "third_party/heimdal/lib/krb5/k524_err.c",
    "third_party/heimdal/lib/krb5/krb_err.c",
    "third_party/heimdal/lib/krb5/k5e1_err.c",
    "third_party/heimdal_build/krb5-glue.c",
    "third_party/heimdal/lib/ipc/client.c",
    "third_party/heimdal/lib/ipc/common.c",
    "third_party/heimdal/lib/krb5/expand_path.c",
    "third_party/heimdal/lib/krb5/plugin.c",
    "third_party/heimdal/lib/krb5/context.c",
    "lib/util/asn1.c",
    "lib/crypto/gnutls_error.c",
    "lib/crypto/gnutls_aead_aes_256_cbc_hmac_sha512.c",
    "lib/crypto/gnutls_arcfour_confounded_md5.c",
    "lib/crypto/gnutls_weak_crypto.c",
    "lib/crypto/gnutls_sp800_108.c",
    "lib/param/loadparm.c",
    "lib/param/util.c",
    "lib/param/param_table.c",
    "lib/dbwrap/dbwrap.c",
    "lib/dbwrap/dbwrap_util.c",
    "lib/dbwrap/dbwrap_rbt.c",
    "lib/dbwrap/dbwrap_tdb.c",
    "lib/dbwrap/dbwrap_local_open.c",
    "librpc/ndr/ndr_krb5pac.c",
    "librpc/gen_ndr/ndr_krb5pac.c",
    "librpc/ndr/ndr_compression.c",
    "lib/compression/lzxpress.c",
    "lib/compression/lzxpress_huffman.c",
    "librpc/gen_ndr/ndr_claims.c",
    "librpc/ndr/ndr_claims.c",
    "third_party/heimdal/lib/gssapi/asn1_gssapi_asn1.c",
    "third_party/heimdal_build/gssapi.empty.c",
    "third_party/heimdal/lib/gssapi/asn1_spnego_asn1.c",
    "third_party/heimdal/lib/gssapi/spnego/init_sec_context.c",
    "third_party/heimdal/lib/gssapi/spnego/external.c",
    "third_party/heimdal/lib/gssapi/spnego/compat.c",
    "third_party/heimdal/lib/gssapi/spnego/context_stubs.c",
    "third_party/heimdal/lib/gssapi/spnego/context_storage.c",
    "third_party/heimdal/lib/gssapi/spnego/accept_sec_context.c",
    "third_party/heimdal/lib/gssapi/spnego/negoex_ctx.c",
    "third_party/heimdal/lib/gssapi/spnego/negoex_err.c",
    "third_party/heimdal/lib/gssapi/spnego/negoex_util.c",
    "third_party/heimdal/lib/gssapi/krb5/copy_ccache.c",
    "third_party/heimdal/lib/gssapi/krb5/delete_sec_context.c",
    "third_party/heimdal/lib/gssapi/krb5/duplicate_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/init_sec_context.c",
    "third_party/heimdal/lib/gssapi/krb5/context_time.c",
    "third_party/heimdal/lib/gssapi/krb5/init.c",
    "third_party/heimdal/lib/gssapi/krb5/address_to_krb5addr.c",
    "third_party/heimdal/lib/gssapi/krb5/get_mic.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_context.c",
    "third_party/heimdal/lib/gssapi/krb5/add_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_names_for_mech.c",
    "third_party/heimdal/lib/gssapi/krb5/indicate_mechs.c",
    "third_party/heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c",
    "third_party/heimdal/lib/gssapi/krb5/name_attrs.c",
    "third_party/heimdal/lib/gssapi/krb5/export_sec_context.c",
    "third_party/heimdal/lib/gssapi/krb5/import_sec_context.c",
    "third_party/heimdal/lib/gssapi/krb5/duplicate_name.c",
    "third_party/heimdal/lib/gssapi/krb5/import_name.c",
    "third_party/heimdal/lib/gssapi/krb5/compare_name.c",
    "third_party/heimdal/lib/gssapi/krb5/export_name.c",
    "third_party/heimdal/lib/gssapi/krb5/canonicalize_name.c",
    "third_party/heimdal/lib/gssapi/krb5/unwrap.c",
    "third_party/heimdal/lib/gssapi/krb5/wrap.c",
    "third_party/heimdal/lib/gssapi/krb5/release_name.c",
    "third_party/heimdal/lib/gssapi/krb5/cfx.c",
    "third_party/heimdal/lib/gssapi/krb5/8003.c",
    "third_party/heimdal/lib/gssapi/krb5/arcfour.c",
    "third_party/heimdal/lib/gssapi/krb5/encapsulate.c",
    "third_party/heimdal/lib/gssapi/krb5/display_name.c",
    "third_party/heimdal/lib/gssapi/krb5/sequence.c",
    "third_party/heimdal/lib/gssapi/krb5/display_status.c",
    "third_party/heimdal/lib/gssapi/krb5/release_buffer.c",
    "third_party/heimdal/lib/gssapi/krb5/external.c",
    "third_party/heimdal/lib/gssapi/krb5/compat.c",
    "third_party/heimdal/lib/gssapi/krb5/creds.c",
    "third_party/heimdal/lib/gssapi/krb5/ccache_name.c",
    "third_party/heimdal/lib/gssapi/krb5/acquire_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/release_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/store_cred.c",
    "third_party/heimdal/lib/gssapi/krb5/set_cred_option.c",
    "third_party/heimdal/lib/gssapi/krb5/decapsulate.c",
    "third_party/heimdal/lib/gssapi/krb5/verify_mic.c",
    "third_party/heimdal/lib/gssapi/krb5/accept_sec_context.c",
    "third_party/heimdal/lib/gssapi/krb5/set_sec_context_option.c",
    "third_party/heimdal/lib/gssapi/krb5/process_context_token.c",
    "third_party/heimdal/lib/gssapi/krb5/prf.c",
    "third_party/heimdal/lib/gssapi/krb5/aeap.c",
    "third_party/heimdal/lib/gssapi/krb5/pname_to_uid.c",
    "third_party/heimdal/lib/gssapi/krb5/authorize_localname.c",
    "third_party/heimdal/lib/gssapi/krb5/gkrb5_err.c",
    "third_party/heimdal/lib/gssapi/mech/cred.c",
    "third_party/heimdal/lib/gssapi/mech/context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_krb5.c",
    "third_party/heimdal/lib/gssapi/mech/gss_mech_switch.c",
    "third_party/heimdal/lib/gssapi/mech/gss_process_context_token.c",
    "third_party/heimdal/lib/gssapi/mech/gss_buffer_set.c",
    "third_party/heimdal/lib/gssapi/mech/gss_aeap.c",
    "third_party/heimdal/lib/gssapi/mech/gss_add_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_add_cred_from.c",
    "third_party/heimdal/lib/gssapi/mech/gss_acquire_cred_from.c",
    "third_party/heimdal/lib/gssapi/mech/gss_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_store_cred_into.c",
    "third_party/heimdal/lib/gssapi/mech/gss_add_oid_set_member.c",
    "third_party/heimdal/lib/gssapi/mech/gss_compare_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_release_oid_set.c",
    "third_party/heimdal/lib/gssapi/mech/gss_create_empty_oid_set.c",
    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_oid_set.c",
    "third_party/heimdal/lib/gssapi/mech/gss_decapsulate_token.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred_by_oid.c",
    "third_party/heimdal/lib/gssapi/mech/gss_canonicalize_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_names_for_mech.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_mechs_for_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_wrap_size_limit.c",
    "third_party/heimdal/lib/gssapi/mech/gss_names.c",
    "third_party/heimdal/lib/gssapi/mech/gss_verify.c",
    "third_party/heimdal/lib/gssapi/mech/gss_display_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_oid.c",
    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_display_status.c",
    "third_party/heimdal/lib/gssapi/mech/gss_release_buffer.c",
    "third_party/heimdal/lib/gssapi/mech/gss_release_oid.c",
    "third_party/heimdal/lib/gssapi/mech/gss_test_oid_set_member.c",
    "third_party/heimdal/lib/gssapi/mech/gss_release_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_set_sec_context_option.c",
    "third_party/heimdal/lib/gssapi/mech/gss_export_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_seal.c",
    "third_party/heimdal/lib/gssapi/mech/gss_acquire_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_unseal.c",
    "third_party/heimdal/lib/gssapi/mech/gss_verify_mic.c",
    "third_party/heimdal/lib/gssapi/mech/gss_accept_sec_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred_by_mech.c",
    "third_party/heimdal/lib/gssapi/mech/gss_indicate_mechs.c",
    "third_party/heimdal/lib/gssapi/mech/gss_get_neg_mechs.c",
    "third_party/heimdal/lib/gssapi/mech/gss_delete_sec_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_sign.c",
    "third_party/heimdal/lib/gssapi/mech/gss_utils.c",
    "third_party/heimdal/lib/gssapi/mech/gss_init_sec_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_oid_equal.c",
    "third_party/heimdal/lib/gssapi/mech/gss_oid.c",
    "third_party/heimdal/lib/gssapi/mech/gss_oid_to_str.c",
    "third_party/heimdal/lib/gssapi/mech/gss_mo.c",
    "third_party/heimdal/lib/gssapi/mech/gss_context_time.c",
    "third_party/heimdal/lib/gssapi/mech/gss_encapsulate_token.c",
    "third_party/heimdal/lib/gssapi/mech/gss_get_mic.c",
    "third_party/heimdal/lib/gssapi/mech/gss_import_sec_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_cred.c",
    "third_party/heimdal/lib/gssapi/mech/gss_wrap.c",
    "third_party/heimdal/lib/gssapi/mech/gss_import_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_duplicate_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_unwrap.c",
    "third_party/heimdal/lib/gssapi/mech/gss_export_sec_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_export_name_composite.c",
    "third_party/heimdal/lib/gssapi/mech/gss_inquire_context.c",
    "third_party/heimdal/lib/gssapi/mech/gss_release_name.c",
    "third_party/heimdal/lib/gssapi/mech/gss_set_cred_option.c",
    "third_party/heimdal/lib/gssapi/mech/gss_pseudo_random.c",
    "third_party/heimdal/lib/gssapi/mech/gss_authorize_localname.c",
    "third_party/heimdal/lib/gssapi/mech/gss_get_name_attribute.c",
    "third_party/heimdal/lib/gssapi/mech/gssspi_exchange_meta_data.c",
    "third_party/heimdal/lib/gssapi/mech/gssspi_query_mechanism_info.c",
    "third_party/heimdal/lib/gssapi/mech/gssspi_query_meta_data.c",
    "third_party/heimdal_build/gssapi-glue.c",
    "lib/util/msghdr.c",
    "lib/socket/interfaces.c",
    "source4/lib/events/tevent_s4.c",
    "librpc/gen_ndr/ndr_krb5ccache.c",
    "librpc/ndr/ndr_negoex.c",
    "librpc/gen_ndr/ndr_negoex.c",
    "librpc/gen_ndr/ndr_smb2_lease_struct.c",
    "librpc/gen_ndr/ndr_named_pipe_auth.c",
    "librpc/ndr/ndr_drsuapi.c",
    "librpc/gen_ndr/ndr_drsuapi.c",
    "librpc/gen_ndr/ndr_epmapper.c",
    "librpc/gen_ndr/ndr_mgmt.c",
    "librpc/ndr-samba.empty.c",
    "librpc/gen_ndr/ndr_mdssvc.c",
    "librpc/gen_ndr/ndr_gmsa.c",
    "librpc/gen_ndr/ndr_smb3posix.c",
    "librpc/gen_ndr/ndr_wsp.c",
    "librpc/wsp/wsp_helper.c",
    "librpc/wsp/wsp_props_gen.c",
    "source3/librpc/gen_ndr/ndr_rpcd_witness.c",
    "source3/librpc/gen_ndr/ndr_open_files.c",
    "librpc/ndr/ndr_drsblobs.c",
    "librpc/gen_ndr/ndr_drsblobs.c",
    "librpc/gen_ndr/ndr_dnsserver.c",
    "librpc/ndr/ndr_dnsserver.c",
    "librpc/gen_ndr/ndr_fsrvp.c",
    "librpc/ndr/ndr_schannel.c",
    "librpc/gen_ndr/ndr_schannel.c",
    "librpc/ndr/ndr_xattr.c",
    "librpc/gen_ndr/ndr_xattr.c",
    "librpc/gen_ndr/ndr_ntprinting.c",
    "librpc/ndr/ndr_ntprinting.c",
    "librpc/gen_ndr/ndr_idmap.c",
    "librpc/gen_ndr/ndr_unixinfo.c",
    "librpc/ndr/ndr_ntlmssp.c",
    "librpc/gen_ndr/ndr_ntlmssp.c",
    "librpc/gen_ndr/ndr_auth.c",
    "librpc/ndr/ndr_auth.c",
    "librpc/gen_ndr/ndr_witness.c",
    "librpc/ndr/ndr_witness.c",
    "source3/librpc/gen_ndr/ndr_smbXsrv.c",
    "librpc/gen_ndr/ndr_gkdi.c",
    "lib/ldb/common/ldb.c",
    "lib/ldb/common/ldb_modules.c",
    "lib/ldb/common/ldb_ldif.c",
    "lib/ldb/common/ldb_parse.c",
    "lib/ldb/common/ldb_msg.c",
    "lib/ldb/common/ldb_utf8.c",
    "lib/ldb/common/ldb_debug.c",
    "lib/ldb/common/ldb_dn.c",
    "lib/ldb/common/ldb_match.c",
    "lib/ldb/common/ldb_options.c",
    "lib/ldb/common/ldb_pack.c",
    "lib/ldb/common/ldb_attributes.c",
    "lib/ldb/common/attrib_handlers.c",
    "lib/ldb/common/ldb_controls.c",
    "lib/ldb/common/qsort.c",
    "lib/ldb/ldb_map/ldb_map.c",
    "lib/ldb/ldb_map/ldb_map_inbound.c",
    "lib/ldb/ldb_map/ldb_map_outbound.c",
    "lib/krb5_wrap/krb5_samba.c",
    "lib/krb5_wrap/gss_samba.c",
    "lib/krb5_wrap/keytab_util.c",
    "lib/krb5_wrap/enctype_convert.c",
    "lib/krb5_wrap/krb5_errs.c",
    "lib/messaging/messages_dgm.c",
    "lib/messaging/messages_dgm_ref.c",
    "lib/pthreadpool/pthreadpool.c",
    "lib/pthreadpool/pthreadpool_pipe.c",
    "lib/pthreadpool/pthreadpool_tevent.c",
    "lib/util/server_id_db.c",
    "source3/lib/messages_util.c",
    "source4/cluster/cluster.c",
    "source4/cluster/local.c",
    "source4/lib/socket/socket_ip.c",
    "source4/libcli/resolve/resolve.c",
    "source4/libcli/composite/composite.c",
    "lib/samba-sockets.empty.c",
    "source4/lib/socket/socket_unix.c",
    "lib/util/access.c",
    "source4/lib/socket/socket.c",
    "source4/lib/socket/access.c",
    "source4/lib/socket/connect_multi.c",
    "source4/lib/socket/connect.c",
    "lib/tsocket/tsocket.c",
    "lib/tsocket/tsocket_helpers.c",
    "lib/tsocket/tsocket_bsd.c",
    "source4/lib/messaging/messaging_send.c",
    "lib/util/unix_privs.c",
    "libcli/ldap/ldap_message.c",
    "libcli/ldap/ldap_ndr.c",
    "libcli/auth/pam_errors.c",
    "libcli/lsarpc/util_lsarpc.c",
    "libcli/auth/ntlm_check.c",
    "lib/util/util_str_escape.c",
    "libcli/auth/credentials.c",
    "libcli/auth/session.c",
    "libcli/auth/smbencrypt.c",
    "libcli/auth/smbdes.c",
    "libcli/auth/msrpc_parse.c",
    "libcli/auth/cliauth.empty.c",
    "libcli/auth/spnego_parse.c",
    "libcli/auth/schannel_state_tdb.c",
    "libds/common/flag_mapping.c",
    "auth/authn_policy.c",
    "lib/audit_logging/audit_logging.c",
    "auth/auth_sam_reply.c",
    "auth/wbc_auth_util.c",
    "auth/auth_log.c",
    "auth/auth_util.c",
    "lib/crypto/gmsa.c",
    "lib/util/util_runcmd.c",
    "source4/dsdb/common/util.c",
    "source4/dsdb/common/util_trusts.c",
    "source4/dsdb/common/util_groups.c",
    "source4/dsdb/common/util_samr.c",
    "source4/dsdb/common/dsdb_dn.c",
    "source4/dsdb/common/dsdb_access.c",
    "source4/dsdb/common/util_links.c",
    "source4/dsdb/common/rodc_helper.c",
    "source4/dsdb/gmsa/gkdi.c",
    "source4/dsdb/gmsa/util.c",
    "source3/lib/version.c",
    "lib/crypto/gkdi.c",
    "lib/util/util_ldb.c",
    "lib/ldb-samba/ldb_wrap.c",
    "source4/dsdb/schema/schema_init.c",
    "source4/dsdb/schema/schema_set.c",
    "source4/dsdb/schema/schema_query.c",
    "source4/dsdb/schema/schema_syntax.c",
    "source4/dsdb/schema/schema_description.c",
    "source4/dsdb/schema/schema_convert_to_ol.c",
    "source4/dsdb/schema/schema_inferiors.c",
    "source4/dsdb/schema/schema_prefixmap.c",
    "source4/dsdb/schema/schema_info_attr.c",
    "source4/dsdb/schema/schema_filtered.c",
    "source4/dsdb/schema/dsdb_dn.c",
    "lib/ldb-samba/ldif_handlers.c",
    "lib/ldb-samba/ldb_matching_rules.c",
    "source4/auth/kerberos/kerberos_pac.c",
    "source4/lib/tls/tlscert.c",
    "source4/lib/tls/tls_tstream.c",
    "source4/auth/kerberos/krb5_init_context.c",
    "source4/lib/stream/packet.c",
    "auth/kerberos/gssapi_pac.c",
    "auth/kerberos/kerberos_pac.c",
    "auth/kerberos/gssapi_helper.c",
    "auth/credentials/credentials_secrets.c",
    "auth/credentials/credentials.c",
    "auth/credentials/credentials_krb5.c",
    "source4/auth/kerberos/srv_keytab.c",
    "source4/param/secrets.c",
    "auth/credentials/credentials_ntlm.c",
    "source4/auth/kerberos/kerberos_util.c",
    "auth/credentials/credentials_gmsa.c",
    "nsswitch/libwbclient/wbc_guid.c",
    "nsswitch/libwbclient/wbc_idmap.c",
    "nsswitch/libwbclient/wbclient.c",
    "nsswitch/libwbclient/wbc_pam.c",
    "nsswitch/libwbclient/wbc_pwd.c",
    "nsswitch/libwbclient/wbc_sid.c",
    "nsswitch/libwbclient/wbc_util.c",
    "nsswitch/wb_common.c",
    "libcli/drsuapi/repl_decrypt.c",
    "source4/auth/session.c",
    "source4/dsdb/samdb/samdb.c",
    "source4/dsdb/samdb/samdb_privilege.c",
    "source4/dsdb/samdb/cracknames.c",
    "source4/dsdb/repl/replicated_objects.c",
    "source4/auth/sam.c",
    "source4/auth/system_session.c",
    "lib/util/modules.c",
    "libcli/http/gensec/generic.c",
    "auth/ntlmssp/gensec_ntlmssp.c",
    "auth/ntlmssp/ntlmssp.c",
    "auth/ntlmssp/ntlmssp_util.c",
    "auth/ntlmssp/ntlmssp_ndr.c",
    "auth/ntlmssp/ntlmssp_client.c",
    "auth/ntlmssp/ntlmssp_server.c",
    "auth/ntlmssp/ntlmssp_sign.c",
    "auth/ntlmssp/gensec_ntlmssp_server.c",
    "auth/gensec/external.c",
    "auth/gensec/schannel.c",
    "source4/auth/gensec/gensec_tstream.c",
    "auth/gensec/ncalrpc.c",
    "auth/gensec/gensec.c",
    "auth/gensec/gensec_start.c",
    "auth/gensec/gensec_util.c",
    "source4/auth/gensec/gensec_gssapi.c",
    "auth/ntlmssp/gensec_ntlmssp.empty.c",
    "auth/gensec/spnego.c",
    "libcli/http/gensec/basic.c",
    "source3/lib/util_sec.c",
    "source3/lib/util_str.c",
    "source3/lib/adt_tree.c",
    "source3/lib/util_malloc.c",
    "source3/lib/file_id.c",
    "source3/lib/cbuf.c",
    "source3/lib/per_thread_cwd.c",
    "libcli/dns/dns.c",
    "libcli/dns/resolvconf.c",
    "lib/util/talloc_report_printf.c",
    "libcli/registry/util_reg.c",
    "source3/lib/cluster_support.c",
    "source3/lib/ctdb_dummy.c",
    "source3/lib/smbd_shim.c",
    "source3/lib/charcnv.c",
    "source3/lib/fstring.c",
    "source4/lib/socket/interface.c",
    "libcli/nbt/nbtsocket.c",
    "libcli/nbt/namequery.c",
    "libcli/nbt/nameregister.c",
    "libcli/nbt/namerefresh.c",
    "libcli/nbt/namerelease.c",
    "libcli/nbt/lmhosts.c",
    "lib/addns/dnsquery.c",
    "lib/addns/dnsrecord.c",
    "lib/addns/dnsutils.c",
    "lib/addns/dnssock.c",
    "lib/addns/dnsgss.c",
    "lib/addns/dnsmarshall.c",
    "lib/addns/error.c",
    "lib/addns/dnsquery_srv.c",
    "libcli/dns/dns_lookup.c",
    "source3/param/util.c",
    "source3/registry/reg_backend_smbconf.c",
    "source3/registry/reg_init_smbconf.c",
    "source3/registry/reg_util_token.c",
    "source3/registry/reg_api_util.c",
    "librpc/gen_ndr/ndr_messaging.c",
    "source3/registry/reg_api.c",
    "source3/registry/reg_dispatcher.c",
    "source3/registry/reg_cachehook.c",
    "source3/registry/reg_objects.c",
    "source3/registry/reg_util_internal.c",
    "source3/lib/util_nttoken.c",
    "source3/registry/reg_backend_db.c",
    "source3/registry/reg_parse_internal.c",
    "source3/registry/reg_parse.c",
    "source3/lib/srprs.c",
    "source3/registry/reg_init_basic.c",
    "source3/lib/dbwrap/dbwrap_open.c",
    "source3/lib/dbwrap/dbwrap_watch.c",
    "source3/lib/g_lock.c",
    "lib/smbconf/smbconf.c",
    "lib/smbconf/smbconf_txt.c",
    "lib/smbconf/smbconf_util.c",
    "source3/lib/util_tdb.c",
    "source3/lib/smbconf/smbconf_init.c",
    "source3/lib/smbconf/smbconf_reg.c",
    "source3/lib/util_tsock.c",
    "source3/param/loadparm.c",
    "source3/lib/sharesec.c",
    "source3/lib/ldap_debug_handler.c",
    "source3/lib/util_names.c",
    "source3/param/loadparm_ctx.c",
    "source3/libsmb/errormap.c",
    "source3/libsmb/smberr.c",
    "source3/lib/errmap_unix.c",
    "lib/util/util_pw.c",
    "lib/async_req/async_sock.c",
    "source3/lib/system.c",
    "source3/lib/sendfile.c",
    "source3/lib/recvfile.c",
    "source3/lib/time.c",
    "source3/lib/util_sid.c",
    "source3/lib/util_specialsids.c",
    "source3/lib/util_file.c",
    "source3/lib/util.c",
    "source3/lib/util_path.c",
    "source3/lib/util_matching.c",
    "source3/lib/util_procid.c",
    "source3/lib/util_sock.c",
    "source3/lib/util_transfer_file.c",
    "source3/lib/util_macstreams.c",
    "source3/lib/messages.c",
    "source3/lib/util_cluster.c",
    "source3/lib/id_cache.c",
    "source3/lib/serverid.c",
    "source3/lib/server_id_watch.c",
    "source3/lib/server_id_db_util.c",
    "source3/lib/addrchange.c",
    "lib/util/debug_s3.c",
    "source3/lib/dumpcore.c",
    "source3/lib/interface.c",
    "source3/lib/username.c",
    "source3/lib/smbrun.c",
    "source3/lib/wins_srv.c",
    "source3/lib/substitute.c",
    "source3/lib/substitute_generic.c",
    "source3/lib/ms_fnmatch.c",
    "source3/lib/tallocmsg.c",
    "source3/lib/dmallocmsg.c",
    "source3/lib/gencache.c",
    "source3/lib/util_event.c",
    "source3/lib/global_contexts.c",
    "source3/lib/ldap_escape.c",
    "source3/lib/system_smbd.c",
    "source3/lib/audit.c",
    "source3/lib/idmap_cache.c",
    "source3/lib/namemap_cache.c",
    "source3/lib/util_ea.c",
    "source3/lib/background.c",
    "source4/libcli/resolve/bcast.c",
    "source4/libcli/resolve/nbtlist.c",
    "source4/libcli/resolve/wins.c",
    "source4/libcli/resolve/dns_ex.c",
    "source4/libcli/resolve/host.c",
    "source4/libcli/resolve/lmhosts.c",
    "source4/libcli/resolve/resolve_lp.c",
    "libcli/util/tstream.c",
    "source4/libcli/ldap/ldap_client.c",
    "source4/libcli/ldap/ldap_bind.c",
    "source4/libcli/ldap/ldap_ildap.c",
    "source4/libcli/ldap/ldap_controls.c",
    "librpc/gen_ndr/ndr_cab.c",
    "librpc/ndr/ndr_cab.c",
    "librpc/gen_ndr/ndr_browser.c",
    "librpc/gen_ndr/ndr_w32time.c",
    "source4/librpc/gen_ndr/ndr_sasl_helpers.c",
    "librpc/gen_ndr/ndr_rot.c",
    "librpc/gen_ndr/ndr_nfs4acl.c",
    "source4/librpc/ndr-samba4.empty.c",
    "librpc/gen_ndr/ndr_winstation.c",
    "librpc/ndr/ndr_table.c",
    "source4/librpc/gen_ndr/tables.c",
    "librpc/gen_ndr/ndr_printcap.c",
    "librpc/gen_ndr/ndr_wzcsvc.c",
    "source4/librpc/gen_ndr/ndr_irpc.c",
    "librpc/gen_ndr/ndr_clusapi.c",
    "source4/librpc/gen_ndr/ndr_winsif.c",
    "librpc/gen_ndr/ndr_audiosrv.c",
    "librpc/gen_ndr/ndr_winspool.c",
    "librpc/ndr/ndr_orpc.c",
    "librpc/gen_ndr/ndr_orpc.c",
    "librpc/gen_ndr/ndr_fsrvp_state.c",
    "librpc/gen_ndr/ndr_winbind.c",
    "librpc/gen_ndr/ndr_rap.c",
    "librpc/ndr/ndr_rap.c",
    "source4/librpc/gen_ndr/ndr_opendb.c",
    "librpc/NDR_NBT.empty.c",
    "source4/librpc/gen_ndr/ndr_winsrepl.c",
    "librpc/gen_ndr/ndr_dsbackup.c",
    "librpc/gen_ndr/ndr_frstrans.c",
    "librpc/gen_ndr/ndr_efs.c",
    "librpc/gen_ndr/ndr_dfsblobs.c",
    "librpc/gen_ndr/ndr_quota.c",
    "librpc/gen_ndr/ndr_keysvc.c",
    "source3/librpc/gen_ndr/ndr_leases_db.c",
    "librpc/gen_ndr/ndr_preg.c",
    "librpc/ndr/ndr_preg.c",
    "librpc/ndr/ndr_bkupblobs.c",
    "librpc/gen_ndr/ndr_bkupblobs.c",
    "librpc/gen_ndr/ndr_frsapi.c",
    "librpc/gen_ndr/ndr_msgsvc.c",
    "librpc/gen_ndr/ndr_policyagent.c",
    "source3/librpc/gen_ndr/ndr_ads.c",
    "source3/librpc/ndr/ndr_ads.c",
    "librpc/gen_ndr/ndr_dcerpc.c",
    "librpc/ndr/ndr_dcerpc.c",
    "librpc/ndr/ndr_frsrpc.c",
    "librpc/gen_ndr/ndr_frsrpc.c",
    "source3/librpc/gen_ndr/ndr_perfcount.c",
    "librpc/gen_ndr/ndr_trkwks.c",
    "librpc/gen_ndr/ndr_dbgidl.c",
    "librpc/gen_ndr/ndr_scerpc.c",
    "source4/librpc/gen_ndr/ndr_ntp_signd.c",
    "librpc/gen_ndr/ndr_ioctl.c",
    "librpc/ndr/ndr_ioctl.c",
    "librpc/gen_ndr/ndr_smb_acl.c",
    "librpc/gen_ndr/ndr_ODJ.c",
    "librpc/ndr/ndr_ODJ.c",
    "source3/librpc/gen_ndr/ndr_secrets.c",
    "librpc/ndr/ndr_backupkey.c",
    "librpc/gen_ndr/ndr_backupkey.c",
    "librpc/gen_ndr/ndr_fscc.c",
    "libcli/smb/read_smb.c",
    "libcli/netlogon/netlogon.c",
    "libcli/cldap/cldap.c",
    "source3/passdb/secrets.c",
    "source3/passdb/machine_account_secrets.c",
    "source3/passdb/machine_sid.c",
    "source3/passdb/secrets_lsa.c",
    "librpc/rpc/dcerpc_error.c",
    "librpc/rpc/binding.c",
    "librpc/rpc/dcerpc_util.c",
    "librpc/rpc/binding_handle.c",
    "libcli/smb/smb_signing.c",
    "libcli/smb/smb_seal.c",
    "libcli/smb/smb2_negotiate_context.c",
    "libcli/smb/smb2_create_blob.c",
    "libcli/smb/smb2_signing.c",
    "libcli/smb/smb2_lease.c",
    "libcli/smb/util.c",
    "libcli/smb/smbXcli_base.c",
    "libcli/smb/smb1cli_trans.c",
    "libcli/smb/smb1cli_echo.c",
    "libcli/smb/smb1cli_create.c",
    "libcli/smb/smb1cli_session.c",
    "libcli/smb/smb1cli_close.c",
    "libcli/smb/smb1cli_write.c",
    "libcli/smb/smb1cli_read.c",
    "libcli/smb/smb2cli_session.c",
    "libcli/smb/smb2cli_tcon.c",
    "libcli/smb/smb2cli_create.c",
    "libcli/smb/smb2cli_close.c",
    "libcli/smb/smb2cli_read.c",
    "libcli/smb/smb2cli_write.c",
    "libcli/smb/smb2cli_flush.c",
    "libcli/smb/smb2cli_set_info.c",
    "libcli/smb/smb2cli_query_info.c",
    "libcli/smb/smb2cli_notify.c",
    "libcli/smb/smb2cli_query_directory.c",
    "libcli/smb/smb2cli_ioctl.c",
    "libcli/smb/smb2cli_echo.c",
    "libcli/smb/smb2_posix.c",
    "libcli/smb/tstream_smbXcli_np.c",
    "libcli/smb/reparse.c",
    "source3/lib/tldap.c",
    "source3/lib/tldap_util.c",
    "source3/lib/tldap_gensec_bind.c",
    "source3/lib/tldap_tls_connect.c",
    "third_party/heimdal_build/k5crypto.empty.c",
    "source3/libads/cldap.c",
    "source3/libads/netlogon_ping.c",
    "source3/librpc/crypto/gse_krb5.c",
    "source3/librpc/crypto/gse.c",
    "source3/libads/kerberos.c",
    "source3/libads/ads_status.c",
    "source3/libsmb/unexpected.c",
    "source3/libsmb/namecache.c",
    "source3/libsmb/nmblib.c",
    "source3/libsmb/clidgram.c",
    "source3/libsmb/namequery.c",
    "source3/libsmb/conncache.c",
    "source3/libads/sitename_cache.c",
    "librpc/gen_ndr/ndr_initshutdown_c.c",
    "librpc/gen_ndr/ndr_eventlog_c.c",
    "librpc/gen_ndr/ndr_wkssvc_c.c",
    "librpc/dcerpc-samba.empty.c",
    "librpc/gen_ndr/ndr_spoolss_c.c",
    "librpc/gen_ndr/ndr_epmapper_c.c",
    "librpc/gen_ndr/ndr_dfs_c.c",
    "librpc/gen_ndr/ndr_winreg_c.c",
    "librpc/gen_ndr/ndr_lsa_c.c",
    "librpc/gen_ndr/ndr_srvsvc_c.c",
    "librpc/gen_ndr/ndr_netlogon_c.c",
    "librpc/gen_ndr/ndr_svcctl_c.c",
    "librpc/gen_ndr/ndr_echo_c.c",
    "librpc/gen_ndr/ndr_atsvc_c.c",
    "librpc/gen_ndr/ndr_ntsvcs_c.c",
    "librpc/gen_ndr/ndr_gkdi_c.c",
    "librpc/gen_ndr/ndr_samr_c.c",
    "librpc/gen_ndr/ndr_dnsserver_c.c",
    "libcli/named_pipe_auth/npa_tstream.c",
    "libcli/named_pipe_auth/tstream_u32_read.c",
    "source3/libsmb/auth_generic.c",
    "source3/libsmb/clientgen.c",
    "source3/libsmb/cliconnect.c",
    "source3/libsmb/clifile.c",
    "source3/libsmb/clirap.c",
    "source3/libsmb/clierror.c",
    "source3/libsmb/climessage.c",
    "source3/libsmb/clireadwrite.c",
    "source3/libsmb/clilist.c",
    "source3/libsmb/cliprint.c",
    "source3/libsmb/clitrans.c",
    "source3/libsmb/clisecdesc.c",
    "source3/libsmb/cliquota.c",
    "source3/libsmb/clifsinfo.c",
    "source3/libsmb/clidfs.c",
    "source3/libsmb/clioplock.c",
    "source3/libsmb/async_smb.c",
    "source3/libsmb/clisymlink.c",
    "source3/libsmb/smbsock_connect.c",
    "source3/libsmb/cli_smb2_fnum.c",
    "source3/rpc_client/cli_pipe.c",
    "source3/rpc_client/rpc_transport_np.c",
    "source3/rpc_client/rpc_transport_sock.c",
    "source3/rpc_client/rpc_transport_tstream.c",
    "source3/rpc_client/local_np.c",
    "source3/librpc/rpc/dcerpc_helpers.c",
    "libcli/auth/netlogon_creds_cli.c",
    "source3/rpc_client/cli_lsarpc.c",
    "source3/rpc_client/init_lsa.c",
    "source3/libsmb/libsmb_cache.c",
    "source3/libsmb/libsmb_compat.c",
    "source3/libsmb/libsmb_context.c",
    "source3/libsmb/libsmb_dir.c",
    "source3/libsmb/libsmb_file.c",
    "source3/libsmb/libsmb_misc.c",
    "source3/libsmb/libsmb_path.c",
    "source3/libsmb/libsmb_printjob.c",
    "source3/libsmb/libsmb_server.c",
    "source3/libsmb/libsmb_stat.c",
    "source3/libsmb/libsmb_xattr.c",
    "source3/libsmb/libsmb_setget.c",
];

const TDB_SRC: &[&str] = &[
    "lib/tdb/common/check.c",
    "lib/tdb/common/error.c",
    "lib/tdb/common/tdb.c",
    "lib/tdb/common/traverse.c",
    "lib/tdb/common/freelistcheck.c",
    "lib/tdb/common/lock.c",
    "lib/tdb/common/dump.c",
    "lib/tdb/common/freelist.c",
    "lib/tdb/common/io.c",
    "lib/tdb/common/open.c",
    "lib/tdb/common/transaction.c",
    "lib/tdb/common/hash.c",
    "lib/tdb/common/summary.c",
    "lib/tdb/common/rescue.c",
    "lib/tdb/common/mutex.c",
];

const TALLOC_SRC: &[&str] = &["lib/talloc/talloc.c"];

const TEVENT_SRC: &[&str] = &[
    "lib/tevent/tevent.c",
    "lib/tevent/tevent_debug.c",
    "lib/tevent/tevent_fd.c",
    "lib/tevent/tevent_immediate.c",
    "lib/tevent/tevent_queue.c",
    "lib/tevent/tevent_req.c",
    "lib/tevent/tevent_wrapper.c",
    "lib/tevent/tevent_poll.c",
    "lib/tevent/tevent_threads.c",
    "lib/tevent/tevent_signal.c",
    "lib/tevent/tevent_standard.c",
    "lib/tevent/tevent_timed.c",
    "lib/tevent/tevent_util.c",
    "lib/tevent/tevent_wakeup.c",
    #[cfg(target_os = "linux")]
    "lib/tevent/tevent_epoll.c",
];

/// Artifacts produced by the build process.
pub struct Artifacts {
    pub lib_dir: PathBuf,
    pub include_dir: PathBuf,
}

/// samba version
pub fn version() -> &'static str {
    // get pkg version and remove any `-`
    env!("CARGO_PKG_VERSION")
        .split('-')
        .next()
        .expect("Invalid version format")
}

/// Build configuration
pub struct Build {
    out_dir: Option<PathBuf>,
    target: Option<String>,
    host: Option<String>,
    samba_dir: Option<PathBuf>,
    gnutls: Option<Vec<PathBuf>>,
}

impl Default for Build {
    fn default() -> Self {
        Self::new()
    }
}

impl Build {
    /// Init a new [`Build`] configuration.
    pub fn new() -> Build {
        Build {
            out_dir: env::var_os("OUT_DIR").map(|s| PathBuf::from(s).join("samba-build")),
            target: env::var("TARGET").ok(),
            host: env::var("HOST").ok(),
            samba_dir: Some(PathBuf::from("/usr/local/samba")),
            gnutls: None,
        }
    }

    pub fn out_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build {
        self.out_dir = Some(path.as_ref().to_path_buf());
        self
    }

    pub fn target(&mut self, target: &str) -> &mut Build {
        self.target = Some(target.to_string());
        self
    }

    pub fn host(&mut self, host: &str) -> &mut Build {
        self.host = Some(host.to_string());
        self
    }

    pub fn samba_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build {
        self.samba_dir = Some(path.as_ref().to_path_buf());
        self
    }

    pub fn gnutls(&mut self, paths: Vec<PathBuf>) -> &mut Build {
        self.gnutls = Some(paths);
        self
    }

    fn cmd_make(&self) -> Result<Command, &'static str> {
        let host = &self.host.as_ref().ok_or("HOST dir not set")?[..];
        Ok(
            if host.contains("dragonfly")
                || host.contains("freebsd")
                || host.contains("openbsd")
                || host.contains("solaris")
                || host.contains("illumos")
            {
                Command::new("gmake")
            } else {
                Command::new("make")
            },
        )
    }

    /// Build the samba library. Print cargo:warning=... if the build fails.
    pub fn build(&mut self) -> Artifacts {
        match self.try_build() {
            Ok(a) => a,
            Err(e) => {
                println!("cargo:warning=pavao-src: failed to build samba from source");
                eprintln!("\n\n\n{e}\n\n\n");
                std::process::exit(1);
            }
        }
    }

    /// Try to build the samba library.
    pub fn try_build(&mut self) -> Result<Artifacts, String> {
        let target = &self.target.as_ref().ok_or("TARGET dir not set")?[..];
        let host = &self.host.as_ref().ok_or("HOST dir not set")?[..];
        let os = Self::os(target)?;
        let out_dir = self.out_dir.as_ref().ok_or("OUT_DIR not set")?;
        let build_dir = out_dir.join("build");

        if build_dir.exists() {
            fs::remove_dir_all(&build_dir).map_err(|e| format!("build_dir: {e}"))?;
        }

        let inner_dir = build_dir.join("src");
        fs::create_dir_all(&inner_dir).map_err(|e| format!("{}: {e}", inner_dir.display()))?;

        // get src at `inner_dir`
        clone_samba(&inner_dir)?;

        // init cc
        let mut cc = cc::Build::new();
        cc.target(target).host(host).warnings(false).opt_level(2);
        let compiler = cc.get_compiler();
        let mut cc_env = compiler.cc_env();
        if cc_env.is_empty() {
            cc_env = compiler.path().to_path_buf().into_os_string();
        }

        // get ar
        let ar = cc.get_archiver();

        // configure
        let mut configure = Command::new("sh");
        configure.arg("./configure");
        configure.arg("--disable-python");
        configure.arg("--without-systemd");
        configure.arg("--without-ldb-lmdb");
        configure.arg("--without-ad-dc");
        configure.arg("--bundled-libraries=ALL");
        configure.arg("--without-libarchive");
        #[cfg(target_os = "macos")]
        configure.arg("--without-acl-support"); // not supported on mac
        configure.env("CC", cc_env);
        configure.env("AR", ar.get_program());
        // On MacOS we need to explicitly declare include paths for gnutls
        #[cfg(target_os = "macos")]
        {
            let gnutls_paths = self.gnutls.as_ref().ok_or("gnutls paths not set")?;
            add_env_includes(&mut configure, gnutls_paths)?;
        }

        let ranlib = cc.get_ranlib();
        let mut args = vec![ranlib.get_program()];
        args.extend(ranlib.get_args());
        configure.env("RANLIB", args.join(OsStr::new(" ")));

        let mut skip_next = false;
        let mut is_isysroot = false;
        let mut ios_isysroot = None;
        for arg in compiler.args() {
            // For whatever reason `-static` on MUSL seems to cause
            // issues...
            if target.contains("musl") && arg == "-static" {
                continue;
            }

            // cc includes an `-arch` flag for Apple platforms, but we've
            // already selected an arch implicitly via the target above, and
            // OpenSSL contains about the conflict if both are specified.
            if target.contains("apple") && arg == "-arch" {
                skip_next = true;
                continue;
            }

            // cargo-lipo specifies this but OpenSSL complains
            if target.contains("apple-ios") {
                if arg == "-isysroot" {
                    is_isysroot = true;
                    continue;
                }

                if is_isysroot {
                    is_isysroot = false;
                    ios_isysroot = Some(arg.to_str().ok_or("isysroot arg")?.to_string());
                    continue;
                }
            }

            if skip_next {
                skip_next = false;
                continue;
            }
        }

        if os.contains("iossimulator") {
            if let Some(ref isysr) = ios_isysroot {
                configure.env(
                    "CC",
                    format!(
                        "xcrun -sdk iphonesimulator cc -isysroot {}",
                        Path::new(isysr).display()
                    ),
                );
            }
        }

        configure.current_dir(&inner_dir);
        // run configure
        self.run_command(configure, "configuring samba build")?;

        // make tdb
        self.build_target("tdb", &inner_dir, &ios_isysroot)?;
        // make smbclient
        self.build_target("smbclient", &inner_dir, &ios_isysroot)?;

        // build static library -> bin/default/source3/libsmb
        let lib_dir = inner_dir.join("bin").join("default");

        let mut build_static = cc.get_archiver();
        build_static.arg("rcs");
        build_static.arg("libsmbclient.a");
        build_static.current_dir(&lib_dir);

        // dedup src files
        let unique_src: HashSet<String> = SRC_FILES
            .iter()
            .chain(TDB_SRC)
            .chain(TALLOC_SRC)
            .chain(TEVENT_SRC)
            .map(|s| s.to_string())
            .collect();

        let mut logfile = std::fs::File::create("/tmp/samba-build.log")
            .map_err(|e| format!("failed to create build log: {e}"))?;
        // push object
        for object in unique_src {
            let path = lib_dir.join(object);

            let object_file = Self::find_object_for_src(&path).ok_or(format!(
                "object file not found for source file: {}",
                path.display()
            ))?;

            use std::io::Write;
            writeln!(logfile, "object file: {}", object_file.display()).ok();
            build_static.arg(object_file.display().to_string());
        }

        // run ar
        self.run_command(build_static, "building static library")?;

        // include_dir -> bin/default/include/public/
        let include_dir = inner_dir
            .join("bin")
            .join("default")
            .join("include")
            .join("public");

        Ok(Artifacts {
            lib_dir,
            include_dir,
        })
    }

    fn find_object_for_src(src: &Path) -> Option<PathBuf> {
        let glob = format!("{}.*.o", src.display());
        glob::glob(&glob)
            .ok()?
            .filter_map(|entry| entry.ok())
            .next()
    }

    fn build_target(
        &self,
        target: &str,
        build_dir: &Path,
        ios_isysroot: &Option<String>,
    ) -> Result<(), String> {
        let mut make = self.cmd_make()?;
        make.current_dir(build_dir);
        make.arg(target);
        if let Some(s) = env::var_os("CARGO_MAKEFLAGS") {
            make.env("MAKEFLAGS", s);
        }
        if let Some(ref isysr) = ios_isysroot {
            let components: Vec<&str> = isysr.split("/SDKs/").collect();
            make.env("CROSS_TOP", components[0]);
            make.env("CROSS_SDK", components[1]);
        }
        self.run_command(make, &format!("building {target}"))
    }

    #[track_caller]
    fn run_command(&self, mut command: Command, desc: &str) -> Result<(), String> {
        println!("running {:?}", command);
        let status = command.status();

        let verbose_error = match status {
            Ok(status) if status.success() => return Ok(()),
            Ok(status) => format!(
                "'{exe}' reported failure with {status}",
                exe = command.get_program().to_string_lossy()
            ),
            Err(failed) => match failed.kind() {
                std::io::ErrorKind::NotFound => format!(
                    "Command '{exe}' not found. Is {exe} installed?",
                    exe = command.get_program().to_string_lossy()
                ),
                _ => format!(
                    "Could not run '{exe}', because {failed}",
                    exe = command.get_program().to_string_lossy()
                ),
            },
        };
        println!("cargo:warning={desc}: {verbose_error}");
        Err(format!(
            "Error {desc}:
    {verbose_error}
    Command failed: {command:?}"
        ))
    }

    fn os(target: &str) -> Result<&'static str, String> {
        let os = match target {
            "aarch64-apple-darwin" => "darwin64-arm64-cc",
            "aarch64-linux-android" => "linux-aarch64",
            "aarch64-unknown-freebsd" => "BSD-generic64",
            "aarch64-unknown-openbsd" => "BSD-generic64",
            "aarch64-unknown-linux-gnu" => "linux-aarch64",
            "aarch64-unknown-linux-musl" => "linux-aarch64",
            "aarch64-alpine-linux-musl" => "linux-aarch64",
            "aarch64-chimera-linux-musl" => "linux-aarch64",
            "aarch64-unknown-netbsd" => "BSD-generic64",
            "aarch64_be-unknown-netbsd" => "BSD-generic64",
            "aarch64-pc-windows-msvc" => "VC-WIN64-ARM",
            "aarch64-uwp-windows-msvc" => "VC-WIN64-ARM-UWP",
            "arm-linux-androideabi" => "linux-armv4",
            "armv7-linux-androideabi" => "linux-armv4",
            "arm-unknown-linux-gnueabi" => "linux-armv4",
            "arm-unknown-linux-gnueabihf" => "linux-armv4",
            "arm-unknown-linux-musleabi" => "linux-armv4",
            "arm-unknown-linux-musleabihf" => "linux-armv4",
            "arm-chimera-linux-musleabihf" => "linux-armv4",
            "armv5te-unknown-linux-gnueabi" => "linux-armv4",
            "armv5te-unknown-linux-musleabi" => "linux-armv4",
            "armv6-unknown-freebsd" => "BSD-generic32",
            "armv6-alpine-linux-musleabihf" => "linux-armv6",
            "armv7-unknown-freebsd" => "BSD-armv4",
            "armv7-unknown-linux-gnueabi" => "linux-armv4",
            "armv7-unknown-linux-musleabi" => "linux-armv4",
            "armv7-unknown-linux-gnueabihf" => "linux-armv4",
            "armv7-unknown-linux-musleabihf" => "linux-armv4",
            "armv7-alpine-linux-musleabihf" => "linux-armv4",
            "armv7-chimera-linux-musleabihf" => "linux-armv4",
            "armv7-unknown-netbsd-eabihf" => "BSD-generic32",
            "asmjs-unknown-emscripten" => "gcc",
            "i586-unknown-linux-gnu" => "linux-elf",
            "i586-unknown-linux-musl" => "linux-elf",
            "i586-alpine-linux-musl" => "linux-elf",
            "i586-unknown-netbsd" => "BSD-x86-elf",
            "i686-apple-darwin" => "darwin-i386-cc",
            "i686-linux-android" => "linux-elf",
            "i686-pc-windows-gnu" => "mingw",
            "i686-pc-windows-msvc" => "VC-WIN32",
            "i686-win7-windows-msvc" => "VC-WIN32",
            "i686-unknown-freebsd" => "BSD-x86-elf",
            "i686-unknown-haiku" => "haiku-x86",
            "i686-unknown-linux-gnu" => "linux-elf",
            "i686-unknown-linux-musl" => "linux-elf",
            "i686-unknown-netbsd" => "BSD-x86-elf",
            "i686-uwp-windows-msvc" => "VC-WIN32-UWP",
            "loongarch64-unknown-linux-gnu" => "linux-generic64",
            "loongarch64-unknown-linux-musl" => "linux-generic64",
            "mips-unknown-linux-gnu" => "linux-mips32",
            "mips-unknown-linux-musl" => "linux-mips32",
            "mips64-unknown-linux-gnuabi64" => "linux64-mips64",
            "mips64-unknown-linux-muslabi64" => "linux64-mips64",
            "mips64el-unknown-linux-gnuabi64" => "linux64-mips64",
            "mips64el-unknown-linux-muslabi64" => "linux64-mips64",
            "mipsel-unknown-linux-gnu" => "linux-mips32",
            "mipsel-unknown-linux-musl" => "linux-mips32",
            "powerpc-unknown-freebsd" => "BSD-ppc",
            "powerpc-unknown-linux-gnu" => "linux-ppc",
            "powerpc-unknown-linux-gnuspe" => "linux-ppc",
            "powerpc-chimera-linux-musl" => "linux-ppc",
            "powerpc-unknown-netbsd" => "BSD-generic32",
            "powerpc64-unknown-freebsd" => "BSD-ppc64",
            "powerpc64-unknown-linux-gnu" => "linux-ppc64",
            "powerpc64-unknown-linux-musl" => "linux-ppc64",
            "powerpc64-chimera-linux-musl" => "linux-ppc64",
            "powerpc64le-unknown-freebsd" => "BSD-ppc64le",
            "powerpc64le-unknown-linux-gnu" => "linux-ppc64le",
            "powerpc64le-unknown-linux-musl" => "linux-ppc64le",
            "powerpc64le-alpine-linux-musl" => "linux-ppc64le",
            "powerpc64le-chimera-linux-musl" => "linux-ppc64le",
            "riscv64gc-unknown-freebsd" => "BSD-riscv64",
            "riscv64gc-unknown-linux-gnu" => "linux64-riscv64",
            "riscv64gc-unknown-linux-musl" => "linux64-riscv64",
            "riscv64-alpine-linux-musl" => "linux64-riscv64",
            "riscv64-chimera-linux-musl" => "linux64-riscv64",
            "riscv64gc-unknown-netbsd" => "BSD-generic64",
            "s390x-unknown-linux-gnu" => "linux64-s390x",
            "sparc64-unknown-netbsd" => "BSD-generic64",
            "s390x-unknown-linux-musl" => "linux64-s390x",
            "s390x-alpine-linux-musl" => "linux64-s390x",
            "sparcv9-sun-solaris" => "solaris64-sparcv9-gcc",
            "thumbv7a-uwp-windows-msvc" => "VC-WIN32-ARM-UWP",
            "x86_64-apple-darwin" => "darwin64-x86_64-cc",
            "x86_64-linux-android" => "linux-x86_64",
            "x86_64-linux" => "linux-x86_64",
            "x86_64-pc-windows-gnu" => "mingw64",
            "x86_64-pc-windows-gnullvm" => "mingw64",
            "x86_64-pc-windows-msvc" => "VC-WIN64A",
            "x86_64-win7-windows-msvc" => "VC-WIN64A",
            "x86_64-unknown-freebsd" => "BSD-x86_64",
            "x86_64-unknown-dragonfly" => "BSD-x86_64",
            "x86_64-unknown-haiku" => "haiku-x86_64",
            "x86_64-unknown-illumos" => "solaris64-x86_64-gcc",
            "x86_64-unknown-linux-gnu" => "linux-x86_64",
            "x86_64-unknown-linux-musl" => "linux-x86_64",
            "x86_64-alpine-linux-musl" => "linux-x86_64",
            "x86_64-chimera-linux-musl" => "linux-x86_64",
            "x86_64-unknown-openbsd" => "BSD-x86_64",
            "x86_64-unknown-netbsd" => "BSD-x86_64",
            "x86_64-uwp-windows-msvc" => "VC-WIN64A-UWP",
            "x86_64-pc-solaris" => "solaris64-x86_64-gcc",
            "wasm32-unknown-emscripten" => "gcc",
            "wasm32-unknown-unknown" => "gcc",
            "wasm32-wasi" => "gcc",
            "aarch64-apple-ios" => "ios64-cross",
            "x86_64-apple-ios" => "iossimulator-xcrun",
            "aarch64-apple-ios-sim" => "iossimulator-xcrun",
            "aarch64-unknown-linux-ohos" => "linux-aarch64",
            "armv7-unknown-linux-ohos" => "linux-generic32",
            "x86_64-unknown-linux-ohos" => "linux-x86_64",
            _ => {
                return Err(format!(
                    "don't know how to configure OpenSSL for {}",
                    target
                ))
            }
        };

        Ok(os)
    }
}

/// Clone samba repository to the given path.
fn clone_samba(p: &Path) -> Result<(), String> {
    let repo_url = "https://git.samba.org/samba.git";
    let repo = git2::Repository::clone(repo_url, p).map_err(|e| format!("cloning samba: {e}"))?;

    // checkout tag "samba-4.22.0"
    let tag = format!("samba-{}", version());
    let obj = repo
        .revparse_single(&tag)
        .map_err(|e| format!("revparse_single: {e}"))?;

    let commit = obj
        .peel_to_commit()
        .map_err(|e| format!("peel_to_commit: {e}"))?;

    repo.checkout_tree(&obj, None)
        .map_err(|e| format!("checkout_tree: {e}"))?;

    repo.set_head_detached(commit.id())
        .map_err(|e| format!("set_head_detached: {e}"))?;

    Ok(())
}

#[cfg(target_os = "macos")]
fn add_env_includes(cmd: &mut Command, include_paths: &[PathBuf]) -> Result<(), String> {
    let cflags = include_paths
        .iter()
        .map(|p| format!("-I{}", p.display()))
        .collect::<Vec<_>>()
        .join(" ");
    cmd.env("CFLAGS", cflags);

    Ok(())
}
