view libtommath/gen.pl @ 1655:f52919ffd3b1

update ltm to 1.1.0 and enable FIPS 186.4 compliant key-generation (#79) * make key-generation compliant to FIPS 186.4 * fix includes in tommath_class.h * update fuzzcorpus instead of error-out * fixup fuzzing make-targets * update Makefile.in * apply necessary patches to ltm sources * clean-up not required ltm files * update to vanilla ltm 1.1.0 this already only contains the required files * remove set/get double
author Steffen Jaeckel <s_jaeckel@gmx.de>
date Mon, 16 Sep 2019 15:50:38 +0200
parents 8bba51a55704
children
line wrap: on
line source

#!/usr/bin/perl -w
#
# Generates a "single file" you can use to quickly
# add the whole source without any makefile troubles
#
use strict;
use warnings;

open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!";
foreach my $filename (glob 'bn*.c') {
   open(my $src, '<', $filename) or die "Couldn't open $filename for reading: $!";
   print {$out} "/* Start: $filename */\n";
   print {$out} $_ while <$src>;
   print {$out} "\n/* End: $filename */\n\n";
   close $src or die "Error closing $filename after reading: $!";
}
print {$out} "\n/* EOF */\n";
close $out or die "Error closing mpi.c after writing: $!";

system('perl -pli -e "s/\s*$//" mpi.c');