1 1.4 christos # $NetBSD: Makefile,v 1.4 2026/01/28 20:01:39 christos Exp $ 2 1.1 christos 3 1.1 christos .include <bsd.own.mk> 4 1.1 christos 5 1.1 christos BITS?=32 6 1.3 christos .if ${BITS} == 32 7 1.3 christos EXCLUDE=(*ppc64*) ;; 8 1.3 christos .endif 9 1.4 christos # the new one does not work for 32 bits and produces abi = 2 objects for 64 10 1.4 christos # so we keep the original under -v1 (aes-gcm-ppc.pl) 11 1.4 christos 12 1.1 christos CRYPTODIST=${NETBSDSRCDIR}/crypto 13 1.1 christos .include "${NETBSDSRCDIR}/crypto/Makefile.openssl" 14 1.1 christos XLATE=${OPENSSLSRC}/crypto/perlasm/ppc-xlate.pl 15 1.1 christos 16 1.1 christos regen: 17 1.1 christos for i in $$(find ${OPENSSLSRC} -name \*ppc\*.pl); do \ 18 1.1 christos case $$i in \ 19 1.3 christos ${EXCLUDE} \ 20 1.4 christos (*aes-gcm-ppc.pl) ;; \ 21 1.2 christos (*xlate.pl) ;; \ 22 1.2 christos (*sha512*) perl $$i ${BITS} sha512 > sha512; \ 23 1.1 christos sed -e 's/bc 25,0,/bdnz+ /' \ 24 1.1 christos -e 's/bclr 14,2/beqlr/' \ 25 1.1 christos -e 's/bclr 6,2/bnelr/' \ 26 1.1 christos -e 's/bclr 14,0/bltlr/' \ 27 1.1 christos -e 's/bclr 12,0/bltlr/' \ 28 1.1 christos < sha512 > $$(basename $$i .pl).S; \ 29 1.1 christos perl $$i ${BITS} sha256 > sha256; \ 30 1.1 christos sed -e 's/bc 25,0,/bdnz+ /' \ 31 1.1 christos -e 's/bclr 14,2/beqlr/' \ 32 1.1 christos -e 's/bclr 6,2/bnelr/' \ 33 1.1 christos -e 's/bclr 14,0/bltlr/' \ 34 1.1 christos -e 's/bclr 12,0/bltlr/' \ 35 1.1 christos < sha256 > $$(basename $$i .pl | sed -e s/512/256/).S; \ 36 1.1 christos rm -f sha512 sha256;; \ 37 1.2 christos (*keccak1600-ppc64.pl) \ 38 1.1 christos if [ ${BITS} = 32 ]; then \ 39 1.1 christos continue; \ 40 1.1 christos fi; \ 41 1.1 christos perl $$i ${BITS} | perl ${XLATE} linux${BITS} | \ 42 1.1 christos sed -e 's/bc 25,0,/bdnz+ /' \ 43 1.1 christos -e 's/bclr 14,2/beqlr/' \ 44 1.1 christos -e 's/bclr 6,2/bnelr/' \ 45 1.1 christos -e 's/bclr 14,0/bltlr/' \ 46 1.1 christos -e 's/bclr 12,0/bltlr/' \ 47 1.1 christos > $$(basename $$i .pl).S ;; \ 48 1.2 christos (*) perl $$i ${BITS} | perl ${XLATE} linux${BITS} | \ 49 1.1 christos sed -e 's/bc 25,0,/bdnz+ /' \ 50 1.1 christos -e 's/bclr 14,2/beqlr/' \ 51 1.1 christos -e 's/bclr 6,2/bnelr/' \ 52 1.1 christos -e 's/bclr 14,0/bltlr/' \ 53 1.1 christos -e 's/bclr 12,0/bltlr/' \ 54 1.4 christos > $$(basename $$i .pl | sed -e s/-v1//).S ;; \ 55 1.1 christos esac; \ 56 1.1 christos done 57