From afb49cba0dff86548cb42f8d4eb03d29f5aa97d2 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 3 May 2002 00:14:39 +0000 Subject: Pre-generate the optimized x86 crypto code and check it in rather than depending on perl at build time. Makefile.asm is a helper for after the next import. With my cvs@ hat on, the relatively small repo cost of this is acceptable, especially given that we have other (much bigger) things like lib*.so.gz.uu checked in under src/lib/compat/*. Reviewed by: kris (maintainer) --- secure/lib/libcrypto/Makefile.asm | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 secure/lib/libcrypto/Makefile.asm (limited to 'secure/lib/libcrypto/Makefile.asm') diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm new file mode 100644 index 0000000..f0b0ebc --- /dev/null +++ b/secure/lib/libcrypto/Makefile.asm @@ -0,0 +1,63 @@ +# $FreeBSD$ +# Use this to help generate the asm *.s files after an import. It is not +# perfect by any means, but does what is needed. +# Do a 'make -f Makefile.asm all' and it will generate *.s. Move them +# to the i386 subdir, and correct any exposed paths and $FreeBSD$ tags. + +.if ${MACHINE_ARCH} == "i386" + +.include "Makefile.inc" + +.PATH: ${LCRYPTO_SRC}/rc4/asm ${LCRYPTO_SRC}/rc5/asm \ + ${LCRYPTO_SRC}/des/asm ${LCRYPTO_SRC}/cast/asm \ + ${LCRYPTO_SRC}/sha/asm ${LCRYPTO_SRC}/bn/asm \ + ${LCRYPTO_SRC}/bf/asm ${LCRYPTO_SRC}/md5/asm \ + ${LCRYPTO_SRC}/ripemd/asm +PERLPATH= ${LCRYPTO_SRC}/des/asm:${LCRYPTO_SRC}/perlasm + +SRCS= + +# blowfish +SRCS+= bf-686.pl +SRCS+= bf-586.pl + +# bn +SRCS+= bn-586.pl co-586.pl + +# cast +SRCS+= cast-586.pl + +# des +SRCS+= des-586.pl crypt586.pl + +# md5 +SRCS+= md5-586.pl + +# rc4 +SRCS+= rc4-586.pl + +# rc5 +SRCS+= rc5-586.pl + +# ripemd +SRCS+= rmd-586.pl + +# sha +SRCS+= sha1-586.pl + +ASM= ${SRCS:S/.pl/.s/} + +all: ${ASM} + +CLEANFILES+= ${SRCS:M*.pl:S/.pl$/.cmt/} ${SRCS:M*.pl:S/.pl$/.s/} +.SUFFIXES: .pl .cmt + +.pl.cmt: + perl -I${PERLPATH} ${.IMPSRC} elf ${CPUTYPE:Mi386:S/i//} > ${.TARGET} + +.cmt.s: + tr -d "'" < ${.IMPSRC} > ${.TARGET} + + +.include +.endif -- cgit v1.1