提交 57c83b3c 编写于 作者: R Richard Levitte

Unified - adapt the generation of md5 assembler to use GENERATE

This gets rid of the BEGINRAW..ENDRAW sections in crypto/md5/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.
Reviewed-by: NAndy Polyakov <appro@openssl.org>
上级 4f0d5f18
...@@ -40,10 +40,10 @@ lib: $(LIBOBJ) ...@@ -40,10 +40,10 @@ lib: $(LIBOBJ)
@touch lib @touch lib
md5-586.s: asm/md5-586.pl ../perlasm/x86asm.pl md5-586.s: asm/md5-586.pl ../perlasm/x86asm.pl
$(PERL) asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@ $(PERL) asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) $@
md5-x86_64.s: asm/md5-x86_64.pl md5-x86_64.s: asm/md5-x86_64.pl
$(PERL) asm/md5-x86_64.pl $(PERLASM_SCHEME) > $@ $(PERL) asm/md5-x86_64.pl $(PERLASM_SCHEME) $@
md5-ia64.s: asm/md5-ia64.S md5-ia64.s: asm/md5-ia64.S
$(CC) $(CFLAGS) -E asm/md5-ia64.S | \ $(CC) $(CFLAGS) -E asm/md5-ia64.S | \
......
...@@ -11,6 +11,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; ...@@ -11,6 +11,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm"); push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl"; require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
&asm_init($ARGV[0],$0); &asm_init($ARGV[0],$0);
$A="eax"; $A="eax";
...@@ -33,6 +36,8 @@ $X="esi"; ...@@ -33,6 +36,8 @@ $X="esi";
&md5_block("md5_block_asm_data_order"); &md5_block("md5_block_asm_data_order");
&asm_finish(); &asm_finish();
close STDOUT;
sub Np sub Np
{ {
local($p)=@_; local($p)=@_;
......
...@@ -2,17 +2,15 @@ LIBS=../../libcrypto ...@@ -2,17 +2,15 @@ LIBS=../../libcrypto
SOURCE[../../libcrypto]=\ SOURCE[../../libcrypto]=\
md5_dgst.c md5_one.c {- $target{md5_asm_src} -} md5_dgst.c md5_one.c {- $target{md5_asm_src} -}
BEGINRAW[Makefile] GENERATE[md5-586.s]=asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS)
{- $builddir -}/md5-586.s: {- $sourcedir -}/asm/md5-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/md5-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@ GENERATE[md5-x86_64.s]=asm/md5-x86_64.pl $(PERLASM_SCHEME)
{- $builddir -}/md5-x86_64.s: {- $sourcedir -}/asm/md5-x86_64.pl GENERATE[md5-sparcv9.S]=asm/md5-sparcv9.pl $(PERLASM_SCHEME)
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/md5-x86_64.pl $(PERLASM_SCHEME) > $@
BEGINRAW[Makefile]
{- $builddir -}/md5-ia64.s: {- $sourcedir -}/asm/md5-ia64.S {- $builddir -}/md5-ia64.s: {- $sourcedir -}/asm/md5-ia64.S
$(CC) $(CFLAGS) -E {- $sourcedir -}/asm/md5-ia64.S | \ $(CC) $(CFLAGS) -E {- $sourcedir -}/asm/md5-ia64.S | \
$(PERL) -ne 's/;\s+/;\n/g; print;' > $@ $(PERL) -ne 's/;\s+/;\n/g; print;' > $@
{- $builddir -}/md5-sparcv9.S: {- $sourcedir -}/asm/md5-sparcv9.pl
CC="$(CC)" $(PERL) {- $sourcedir -}/asm/md5-sparcv9.pl $(PERLASM_SCHEME) $@
ENDRAW[Makefile] ENDRAW[Makefile]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册