X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmk1mf.pl;h=ffb3c1083421cfaa705bd22d5e4588187690683d;hp=fa2149e8ac3f86044146f8227a3ef7206af09efe;hb=b222eb644385699b2a17b24d68696f2a67935ffd;hpb=ad2cb8b4f6e8715e54c9e4ec3059cfe0831fda87 diff --git a/util/mk1mf.pl b/util/mk1mf.pl index fa2149e8ac..ffb3c10834 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -8,11 +8,12 @@ $INSTALLTOP="/usr/local/ssl"; $OPTIONS=""; $ssl_version=""; +$banner="\t\@echo Building OpenSSL"; open(IN,") { $ssl_version=$1 if (/^VERSION=(.*)$/); - $options=$1 if (/^OPTIONS=(.*)$/); + $OPTIONS=$1 if (/^OPTIONS=(.*)$/); $INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/); } close(IN); @@ -45,7 +46,7 @@ foreach (@ARGV) if (!&read_options && !defined($ops{$_})) { print STDERR "unknown option - $_\n"; - print STDERR "usage: perl mk1mf.pl [system] [options]\n"; + print STDERR "usage: perl mk1mf.pl [options] [system]\n"; print STDERR "\nwhere [system] can be one of the following\n"; foreach $i (sort keys %ops) { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } @@ -58,6 +59,8 @@ 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 + gaswin - Use GNU as with Mingw32 no-socks - No socket code no-err - No error strings dll/shlib - Build shared libraries (MS) @@ -270,6 +273,8 @@ LFLAGS=$lflags BN_ASM_OBJ=$bn_asm_obj BN_ASM_SRC=$bn_asm_src +BNCO_ASM_OBJ=$bnco_asm_obj +BNCO_ASM_SRC=$bnco_asm_src DES_ENC_OBJ=$des_enc_obj DES_ENC_SRC=$des_enc_src BF_ENC_OBJ=$bf_enc_obj @@ -357,6 +362,10 @@ all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe banner: $banner +# Generate perlasm output files +%.cpp: + (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) + \$(TMP_D): \$(MKDIR) \$(TMP_D) # NB: uncomment out these lines if BIN_D, TEST_D and LIB_D are different @@ -376,6 +385,7 @@ $banner \$(MKDIR) \$(INC_D) headers: \$(HEADER) \$(EXHEADER) + @ lib: \$(LIBS_DEP) @@ -400,6 +410,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 <