This gets rid of the BEGINRAW..ENDRAW sections in crypto/chacha/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: Andy Polyakov <appro@openssl.org>
@touch lib
chacha-x86.s: asm/chacha-x86.pl
- $(PERL) asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
+ $(PERL) asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
chacha-x86_64.s: asm/chacha-x86_64.pl
- $(PERL) asm/chacha-x86_64.pl $(PERLASM_SCHEME) > $@
+ $(PERL) asm/chacha-x86_64.pl $(PERLASM_SCHEME) $@
chacha-ppc.s: asm/chacha-ppc.pl
$(PERL) asm/chacha-ppc.pl $(PERLASM_SCHEME) $@
# dependent on input length. This module on the other hand is free
# from such limiation.
+$output=pop;
+open STDOUT,">$output";
+
($OUT,$INP,$LEN,$KEYB,$COUNTERA)=("A4","B4","A6","B6","A8");
($KEYA,$COUNTERB,$STEP)=("A7","B7","A3");
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
+$output=pop;
+open STDOUT,">$output";
+
&asm_init($ARGV[0],"chacha-x86.pl",$ARGV[$#ARGV] eq "386");
$xmm=$ymm=0;
}
&asm_finish();
+
+close STDOUT;
LIBS=../../libcrypto
SOURCE[../../libcrypto]={- $target{chacha_asm_src} -}
+GENERATE[chacha-x86.s]=asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+GENERATE[chacha-x86_64.s]=asm/chacha-x86_64.pl $(PERLASM_SCHEME)
+GENERATE[chacha-ppc.s]=asm/chacha-ppc.pl $(PERLASM_SCHEME)
+
BEGINRAW[Makefile(unix)]
##### CHACHA assembler implementations
-{- $builddir -}/chacha-x86.s: {- $sourcedir -}/asm/chacha-x86.pl
- CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-{- $builddir -}/chacha-x86_64.s: {- $sourcedir -}/asm/chacha-x86_64.pl
- CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-x86_64.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/chacha-ppc.s: {- $sourcedir -}/asm/chacha-ppc.pl
- CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-ppc.pl $(PERLASM_SCHEME) $@
-
{- $builddir -}/chacha-%.S: {- $sourcedir -}/asm/chacha-%.pl
CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@
ENDRAW[Makefile(unix)]