1 1.14 christos # $NetBSD: Makefile,v 1.14 2025/04/23 20:14:59 christos Exp $ 2 1.1 christos 3 1.1 christos .include "bsd.own.mk" 4 1.1 christos 5 1.2 spz CRYPTODIST=${NETBSDSRCDIR}/crypto 6 1.1 christos .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" 7 1.1 christos 8 1.7 joerg .if make(regen) && ${HAVE_LLVM:U} == "yes" 9 1.7 joerg CC+= -fno-integrated-as 10 1.7 joerg .endif 11 1.7 joerg 12 1.1 christos regen: 13 1.3 spz for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \ 14 1.8 joerg $$(find ${OPENSSLSRC}/crypto/bn/asm -name ${MACHINE_ARCH}-\*.pl) \ 15 1.10 spz ${OPENSSLSRC}/crypto/bn/asm/rsaz-avx2.pl \ 16 1.13 christos ${OPENSSLSRC}/crypto/bn/asm/rsaz-avx512.pl \ 17 1.3 spz ${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \ 18 1.14 christos j=$$(basename $$i .pl).S; \ 19 1.14 christos case $$j in \ 20 1.14 christos (sha512-x86_64.S) \ 21 1.14 christos perl $$i sha256-x86_64.S; perl $$i sha512-x86_64.S;; \ 22 1.14 christos (*) \ 23 1.14 christos (echo "#include <machine/asm.h>"; CC=${CC:Q} perl $$i elf | sed \ 24 1.14 christos -e 's/.hidden OPENSSL_cpuid_setup/.globl OPENSSL_cpuid_setup/' \ 25 1.14 christos -e 's/call OPENSSL_cpuid_setup/call PIC_PLT(OPENSSL_cpuid_setup)/' \ 26 1.14 christos -e 's/rdseedq/rdseed/') > $$j;; \ 27 1.14 christos esac; \ 28 1.1 christos done 29