1# Note that these directories are filtered in Configure. Look for %skipdir 2# there for further explanations. 3SUBDIRS=objects buffer bio stack lhash rand evp asn1 pem x509 conf \ 4 txt_db pkcs7 pkcs12 ui kdf store property \ 5 md2 md4 md5 sha mdc2 hmac ripemd whrlpool poly1305 \ 6 siphash sm3 des aes rc2 rc4 rc5 idea aria bf cast camellia \ 7 seed sm4 chacha modes bn ec rsa dsa dh sm2 dso engine \ 8 err comp http ocsp cms ts srp cmac ct async ess crmf cmp encode_decode \ 9 ffc 10 11LIBS=../libcrypto 12 13$UPLINKSRC= 14$UPLINKDEF= 15IF[{- !$disabled{uplink} -}] 16 $UPLINKSRC_common=../ms/uplink.c 17 $UPLINKSRC_x86=$UPLINKSRC_common uplink-x86.S 18 $UPLINKSRC_x86_64=$UPLINKSRC_common uplink-x86_64.s 19 $UPLINKSRC_ia64=$UPLINKSRC_common uplink-ia64.s 20 21 IF[$UPLINKSRC_{- $target{uplink_arch} -}] 22 $UPLINKSRC=$UPLINKSRC_{- $target{uplink_arch} -} 23 $UPLINKDEF=OPENSSL_USE_APPLINK 24 ENDIF 25ENDIF 26 27$CPUIDASM=mem_clr.c 28$CPUIDDEF= 29IF[{- !$disabled{asm} && $config{processor} ne '386' -}] 30 $CPUIDASM_x86=x86cpuid.S 31 32 $CPUIDASM_x86_64=x86_64cpuid.s 33 34 $CPUIDASM_ia64=ia64cpuid.s 35 36 $CPUIDASM_sparcv9=sparcv9cap.c sparccpuid.S 37 38 $CPUIDASM_alpha=alphacpuid.s 39 40 $CPUIDASM_s390x=s390xcap.c s390xcpuid.S 41 42 $CPUIDASM_armv4=armcap.c armv4cpuid.S 43 44 $CPUIDASM_aarch64=armcap.c arm64cpuid.S 45 46 $CPUIDASM_parisc11=pariscid.s 47 $CPUIDASM_parisc20_64=$CPUIDASM_parisc11 48 49 $CPUIDASM_ppc32=ppccpuid.s ppccap.c 50 $CPUIDASM_ppc64=$CPUIDASM_ppc32 51 52 $CPUIDASM_c64xplus=c64xpluscpuid.s 53 54 $CPUIDASM_riscv64=riscvcap.c riscv64cpuid.s 55 56 # Now that we have defined all the arch specific variables, use the 57 # appropriate one, and define the appropriate macros 58 IF[$CPUIDASM_{- $target{asm_arch} -}] 59 $CPUIDASM=$CPUIDASM_{- $target{asm_arch} -} 60 $CPUIDDEF=OPENSSL_CPUID_OBJ 61 ENDIF 62ENDIF 63 64# CPUID support. We need to add that explicitly in every shared library and 65# provider module that uses it. ctype.c is included here because the CPUID 66# uses functions from there to parse magic environment variables. 67$CPUID_COMMON=$CPUIDASM cpuid.c ctype.c 68INCLUDE[cpuid.o]=.. 69 70SOURCE[../libcrypto]=$CPUID_COMMON 71DEFINE[../libcrypto]=$CPUIDDEF 72SOURCE[../providers/libfips.a]=$CPUID_COMMON 73DEFINE[../providers/libfips.a]=$CPUIDDEF 74# We only need to include the CPUID stuff in the legacy provider when it's a 75# separate module and it's dynamically linked with libcrypto. Otherwise, it 76# already gets everything that the static libcrypto.a has, and doesn't need it 77# added again. 78IF[{- !$disabled{module} && !$disabled{shared} -}] 79 SOURCE[../providers/legacy]=$CPUID_COMMON 80 DEFINE[../providers/legacy]=$CPUIDDEF 81ENDIF 82 83# Implementations are now spread across several libraries, so the CPUID define 84# need to be applied to all affected libraries and modules. 85DEFINE[../providers/libcommon.a]=$CPUIDDEF 86DEFINE[../providers/libdefault.a]=$CPUIDDEF 87 88# The Core 89$CORE_COMMON=provider_core.c provider_predefined.c \ 90 core_fetch.c core_algorithm.c core_namemap.c self_test_core.c 91 92SOURCE[../libcrypto]=$CORE_COMMON provider_conf.c 93SOURCE[../providers/libfips.a]=$CORE_COMMON 94 95# Central utilities 96$UTIL_COMMON=\ 97 cryptlib.c params.c params_from_text.c bsearch.c ex_data.c o_str.c \ 98 threads_pthread.c threads_win.c threads_none.c initthread.c \ 99 context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ 100 param_build_set.c der_writer.c threads_lib.c params_dup.c \ 101 quic_vlint.c 102 103SOURCE[../libssl]=sparse_array.c 104 105SOURCE[../libcrypto]=$UTIL_COMMON \ 106 mem.c mem_sec.c \ 107 cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \ 108 o_fopen.c getenv.c o_init.c init.c trace.c provider.c provider_child.c \ 109 punycode.c passphrase.c 110SOURCE[../providers/libfips.a]=$UTIL_COMMON 111 112SOURCE[../libcrypto]=$UPLINKSRC 113DEFINE[../libcrypto]=$UPLINKDEF 114 115DEPEND[info.o]=buildinf.h 116DEPEND[cversion.o]=buildinf.h 117GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" 118 119GENERATE[uplink-x86.S]=../ms/uplink-x86.pl 120GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl 121GENERATE[uplink-ia64.s]=../ms/uplink-ia64.pl 122 123GENERATE[x86cpuid.S]=x86cpuid.pl 124DEPEND[x86cpuid.s]=perlasm/x86asm.pl 125 126GENERATE[x86_64cpuid.s]=x86_64cpuid.pl 127 128GENERATE[ia64cpuid.s]=ia64cpuid.S 129GENERATE[ppccpuid.s]=ppccpuid.pl 130GENERATE[pariscid.s]=pariscid.pl 131GENERATE[alphacpuid.s]=alphacpuid.pl 132GENERATE[arm64cpuid.S]=arm64cpuid.pl 133INCLUDE[arm64cpuid.o]=. 134GENERATE[armv4cpuid.S]=armv4cpuid.pl 135INCLUDE[armv4cpuid.o]=. 136GENERATE[s390xcpuid.S]=s390xcpuid.pl 137INCLUDE[s390xcpuid.o]=. 138GENERATE[riscv64cpuid.s]=riscv64cpuid.pl 139 140IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-|BC-)/ -}] 141 SHARED_SOURCE[../libcrypto]=dllmain.c 142ENDIF 143