xref: /minix3/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1#	$NetBSD: Makefile,v 1.8 2015/05/16 22:23:31 joerg Exp $
2
3.include "bsd.own.mk"
4
5CRYPTODIST=${NETBSDSRCDIR}/crypto
6.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
7
8.if make(regen) && ${HAVE_LLVM:U} == "yes"
9CC+= -fno-integrated-as
10.endif
11
12regen:
13	for i in $$(find ${OPENSSLSRC} -name \*${MACHINE_ARCH}.pl) \
14		$$(find ${OPENSSLSRC}/crypto/bn/asm -name ${MACHINE_ARCH}-\*.pl) \
15		${OPENSSLSRC}/crypto/${MACHINE_ARCH}cpuid.pl ; do \
16                (echo "#include <machine/asm.h>"; CC=${CC:Q} perl $$i elf | sed \
17		    -e 's/\(OPENSSL[A-Za-z0-9_+]*\)(%rip)/\1@GOTPCREL(%rip)/' \
18		    -e 's/.hidden	OPENSSL_cpuid_setup/.globl	OPENSSL_cpuid_setup/' \
19		    -e 's/call	OPENSSL_cpuid_setup/call	PIC_PLT(OPENSSL_cpuid_setup)/') \
20		> $$(basename $$i .pl).S; \
21	done
22