summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/mk1mf.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/mk1mf.pl')
-rw-r--r--src/lib/libcrypto/util/mk1mf.pl20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl
index b4bc0457e5..957264c6b5 100644
--- a/src/lib/libcrypto/util/mk1mf.pl
+++ b/src/lib/libcrypto/util/mk1mf.pl
@@ -10,7 +10,7 @@ $OPTIONS="";
10$ssl_version=""; 10$ssl_version="";
11$banner="\t\@echo Building OpenSSL"; 11$banner="\t\@echo Building OpenSSL";
12 12
13open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; 13open(IN,"<Makefile") || die "unable to open Makefile!\n";
14while(<IN>) { 14while(<IN>) {
15 $ssl_version=$1 if (/^VERSION=(.*)$/); 15 $ssl_version=$1 if (/^VERSION=(.*)$/);
16 $OPTIONS=$1 if (/^OPTIONS=(.*)$/); 16 $OPTIONS=$1 if (/^OPTIONS=(.*)$/);
@@ -18,7 +18,7 @@ while(<IN>) {
18} 18}
19close(IN); 19close(IN);
20 20
21die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; 21die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq "";
22 22
23$infile="MINFO"; 23$infile="MINFO";
24 24
@@ -222,7 +222,7 @@ $cflags.=" -DOPENSSL_NO_SHA" if $no_sha;
222$cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1; 222$cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
223$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd; 223$cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd;
224$cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2; 224$cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
225$cflags.=" -DOPENSSL_NO_BF" if $no_bf; 225$cflags.=" -DOPENSSL_NO_BF" if $no_bf;
226$cflags.=" -DOPENSSL_NO_CAST" if $no_cast; 226$cflags.=" -DOPENSSL_NO_CAST" if $no_cast;
227$cflags.=" -DOPENSSL_NO_DES" if $no_des; 227$cflags.=" -DOPENSSL_NO_DES" if $no_des;
228$cflags.=" -DOPENSSL_NO_RSA" if $no_rsa; 228$cflags.=" -DOPENSSL_NO_RSA" if $no_rsa;
@@ -236,6 +236,7 @@ $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
236$cflags.=" -DOPENSSL_NO_EC" if $no_ec; 236$cflags.=" -DOPENSSL_NO_EC" if $no_ec;
237$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; 237$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
238$cflags.=" -DOPENSSL_NO_HW" if $no_hw; 238$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
239$cflags.=" -DOPENSSL_FIPS" if $fips;
239#$cflags.=" -DRSAref" if $rsaref ne ""; 240#$cflags.=" -DRSAref" if $rsaref ne "";
240 241
241## if ($unix) 242## if ($unix)
@@ -631,15 +632,21 @@ foreach (split(/\s+/,$test))
631$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); 632$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
632$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); 633$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
633 634
634$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 635if ($fips)
635 636 {
637 $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)","\$(BIN_D)$o.sha1","\$(BIN_D)$o\$(E_EXE)$exep");
638 }
639else
640 {
641 $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)");
642 }
636print $defs; 643print $defs;
637 644
638if ($platform eq "linux-elf") { 645if ($platform eq "linux-elf") {
639 print <<"EOF"; 646 print <<"EOF";
640# Generate perlasm output files 647# Generate perlasm output files
641%.cpp: 648%.cpp:
642 (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) 649 (cd \$(\@D)/..; PERL=perl make -f Makefile asm/\$(\@F))
643EOF 650EOF
644} 651}
645print "###################################################################\n"; 652print "###################################################################\n";
@@ -921,6 +928,7 @@ sub read_options
921 $no_aes=1; } 928 $no_aes=1; }
922 929
923 elsif (/^rsaref$/) { } 930 elsif (/^rsaref$/) { }
931 elsif (/^fips$/) { $fips=1; }
924 elsif (/^gcc$/) { $gcc=1; } 932 elsif (/^gcc$/) { $gcc=1; }
925 elsif (/^debug$/) { $debug=1; } 933 elsif (/^debug$/) { $debug=1; }
926 elsif (/^profile$/) { $profile=1; } 934 elsif (/^profile$/) { $profile=1; }