diff options
-rw-r--r-- | secure/lib/libcrypto/Makefile.asm | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/secure/lib/libcrypto/Makefile.asm b/secure/lib/libcrypto/Makefile.asm index 279c9e7..344d088 100644 --- a/secure/lib/libcrypto/Makefile.asm +++ b/secure/lib/libcrypto/Makefile.asm @@ -44,33 +44,39 @@ SRCS+= aesni-gcm-x86_64.pl ghash-x86_64.pl SRCS+= rc4-md5-x86_64.pl rc4-x86_64.pl # sha -SRCS+= sha1-mb-x86_64.pl sha1-x86_64.pl sha256-mb-x86_64.pl sha512-x86_64.pl +SRCS+= sha1-mb-x86_64.pl sha1-x86_64.pl sha256-mb-x86_64.pl # whrlpool SRCS+= wp-x86_64.pl -ASM= ${SRCS:S/.pl/.S/} -ASM+= sha256-x86_64.S x86_64cpuid.S +# cpuid +SRCS+= x86_64cpuid.pl -all: ${ASM} +SHA_ASM= sha256-x86_64 sha512-x86_64 +SHA_SRC= sha512-x86_64.pl +SHA_TMP= ${SHA_ASM:S/$/.s/} -CLEANFILES+= ${SRCS:M*.pl:S/.pl$/.cmt/} ${SRCS:M*.pl:S/.pl$/.S/} -CLEANFILES+= sha256-x86_64.cmt sha256-x86_64.S x86_64cpuid.cmt x86_64cpuid.S -.SUFFIXES: .pl .cmt +ASM= ${SRCS:R:S/$/.S/} ${SHA_ASM:S/$/.S/} -.pl.cmt: - ( cd `dirname ${.IMPSRC}`/.. ; perl ${.IMPSRC} ${.OBJDIR}/${.TARGET} ) +all: ${ASM} -.cmt.S: - ( echo ' # $$'FreeBSD'$$' ;\ - echo ' # Do not modify. This file is auto-generated.' ;\ - cat ${.IMPSRC} ) > ${.TARGET} +CLEANFILES= ${ASM} ${SHA_ASM:S/$/.s/} +.SUFFIXES: .pl -sha256-x86_64.cmt: sha512-x86_64.pl - ( cd `dirname ${.ALLSRC}`/.. ; perl ${.ALLSRC} ${.OBJDIR}/${.TARGET} ) +.pl.S: + ( echo '# $$'FreeBSD'$$' ;\ + echo '# Do not modify. This file is auto-generated from ${.IMPSRC:T}.' ;\ + perl ${.IMPSRC} elf ) > ${.TARGET} + +${SHA_TMP}: ${SHA_SRC} + perl ${.ALLSRC} elf ${.TARGET} -x86_64cpuid.cmt: x86_64cpuid.pl - ( cd `dirname ${.ALLSRC}` ; perl ${.ALLSRC} ${.OBJDIR}/${.TARGET} ) +.for s in ${SHA_ASM} +${s}.S: ${s}.s + ( echo ' # $$'FreeBSD'$$' ;\ + echo ' # Do not modify. This file is auto-generated from ${SHA_SRC}.' ;\ + cat ${s}.s ) > ${.TARGET} +.endfor .elif ${MACHINE_CPUARCH} == "i386" @@ -129,16 +135,16 @@ SRCS+= wp-mmx.pl # cpuid SRCS+= x86cpuid.pl -ASM= ${SRCS:S/.pl/.S/} +ASM= ${SRCS:R:S/$/.S/} all: ${ASM} -CLEANFILES+= ${SRCS:M*.pl:S/.pl$/.S/} +CLEANFILES= ${ASM} .SUFFIXES: .pl .pl.S: - ( echo ' # $$'FreeBSD'$$' ;\ - echo ' # Do not modify. This file is auto-generated.' ;\ + ( echo '# $$'FreeBSD'$$' ;\ + echo '# Do not modify. This file is auto-generated from ${.IMPSRC:T}.' ;\ echo '#ifdef PIC' ;\ perl ${PERLPATH} ${.IMPSRC} elf ${CFLAGS} -fpic -DPIC ;\ echo '#else' ;\ |