X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=util%2Fmk1mf.pl;h=6fbf3ceca6a4aa613834b89e269fd64c86e8a724;hb=f95a9f678a2336b8cd3aaeb99cb9cda143916e27;hp=c9b5b2c502f449fe8444edbc07e2494de344f960;hpb=f76a8084df2a204e193f546c8defdfce3491bfde;p=openssl.git diff --git a/util/mk1mf.pl b/util/mk1mf.pl index c9b5b2c502..6fbf3ceca6 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -58,6 +58,7 @@ and [options] can be one of no-ssl2 no-ssl3 - Skip this version of SSL just-ssl - remove all non-ssl keys/digest no-asm - No x86 asm + nasm - Use NASM for x86 asm no-socks - No socket code no-err - No error strings dll/shlib - Build shared libraries (MS) @@ -400,6 +401,42 @@ vclean: \$(RM) \$(OUT_D)$o*.* EOF + +my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform"; +$platform_cpp_symbol =~ s/-/_/g; +if (open(IN,"crypto/buildinf.h")) + { + # Remove entry for this platform in existing file buildinf.h. + + my $old_buildinf_h = ""; + while () + { + if (/^\#ifdef $platform_cpp_symbol$/) + { + while () { last if (/^\#endif/); } + } + else + { + $old_buildinf_h .= $_; + } + } + close(IN); + + open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; + print OUT $old_buildinf_h; + close(OUT); + } + +open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h"; +printf OUT <