diff options
Diffstat (limited to 'src/lib/libcrypto/util/mk1mf.pl')
-rw-r--r-- | src/lib/libcrypto/util/mk1mf.pl | 20 |
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 | ||
13 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | 13 | open(IN,"<Makefile") || die "unable to open Makefile!\n"; |
14 | while(<IN>) { | 14 | while(<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 | } |
19 | close(IN); | 19 | close(IN); |
20 | 20 | ||
21 | die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; | 21 | die "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)"); | 635 | if ($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 | } | ||
639 | else | ||
640 | { | ||
641 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | ||
642 | } | ||
636 | print $defs; | 643 | print $defs; |
637 | 644 | ||
638 | if ($platform eq "linux-elf") { | 645 | if ($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)) |
643 | EOF | 650 | EOF |
644 | } | 651 | } |
645 | print "###################################################################\n"; | 652 | print "###################################################################\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; } |