Home | History | Annotate | Line # | Download | only in x86_64
      1 #	$NetBSD: Makefile,v 1.1 2025/07/17 14:25:37 christos Exp $
      2 
      3 .include "bsd.own.mk"
      4 
      5 CRYPTODIST=${NETBSDSRCDIR}/crypto
      6 .include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
      7 
      8 .if make(regen) && ${HAVE_LLVM:U} == "yes"
      9 CC+= -fno-integrated-as
     10 .endif
     11 
     12 regen:
     13 	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
     14 		$$(find ${OPENSSLSRC} -name \*avx2\*.pl) \
     15 		$$(find ${OPENSSLSRC} -name \*avx512\*.pl) \
     16 		$$(find ${OPENSSLSRC} -name \*avxifma\*.pl) \
     17 		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
     18 		j=$$(basename $$i .pl).S; \
     19 		case $$j in \
     20 		(keccak*) \
     21 		    perl $$i $$j;; \
     22 		(sha512-x86_64.S) \
     23 		    perl $$i sha256-x86_64.S; perl $$i sha512-x86_64.S;; \
     24 		(*) \
     25 		    (echo "#include <machine/asm.h>"; CC=${CC:Q} perl $$i elf | sed \
     26 			-e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
     27 			-e 's/call	OPENSSL_cpuid_setup/call	PIC_PLT(OPENSSL_cpuid_setup)/' \
     28 			-e 's/rdseedq/rdseed/') > $$j; \
     29 		    if [ -f elf ]; then echo $$i; fi;; \
     30 		esac; \
     31 	done
     32