2 # A bit of an evil hack but it post processes the file ../MINFO which
3 # is generated by `make files` in the top directory.
4 # This script outputs one mega makefile that has no shell stuff or any
8 $INSTALLTOP="/usr/local/ssl";
9 $OPENSSLDIR="/usr/local/ssl";
12 $banner="\t\@echo Building OpenSSL";
14 my $no_static_engine = 1;
17 local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
19 local $perl_asm = 0; # 1 to autobuild asm files from perl scripts
21 local $fips_canister_path = "";
22 my $fips_premain_dso_exe_path = "";
23 my $fips_premain_c_path = "";
24 my $fips_sha1_exe_path = "";
26 local $fipscanisterbuild = 0;
28 my $fipscanisteronly = 0;
35 my $build_targets = "lib exe";
36 my $libs_dep = "\$(O_CRYPTO) \$(O_SSL)";
38 # Options to import from top level Makefile
41 VERSION => \$ssl_version,
43 INSTALLTOP => \$INSTALLTOP,
44 OPENSSLDIR => \$OPENSSLDIR,
45 PLATFORM => \$mf_platform,
47 DEPFLAG => \$mf_depflag,
48 CPUID_OBJ => \$mf_cpuid_asm,
49 BN_ASM => \$mf_bn_asm,
50 DES_ENC => \$mf_des_asm,
51 AES_ENC => \$mf_aes_asm,
52 BF_ENC => \$mf_bf_asm,
53 CAST_ENC => \$mf_cast_asm,
54 RC4_ENC => \$mf_rc4_asm,
55 RC5_ENC => \$mf_rc5_asm,
56 MD5_ASM_OBJ => \$mf_md5_asm,
57 SHA1_ASM_OBJ => \$mf_sha_asm,
58 RMD160_ASM_OBJ => \$mf_rmd_asm,
59 WP_ASM_OBJ => \$mf_wp_asm,
60 CMLL_ENC => \$mf_cm_asm,
61 MODES_ASM_OBJ => \$mf_modes_asm,
62 FIPSCANISTERONLY => \$mf_fipscanisteronly
65 open(IN,"<Makefile") || die "unable to open Makefile!\n";
67 my ($mf_opt, $mf_ref);
68 while (($mf_opt, $mf_ref) = each %mf_import) {
69 if (/^$mf_opt\s*=\s*(.*)$/) {
76 $debug = 1 if $mf_platform =~ /^debug-/;
78 if ($mf_fipscanisteronly eq "y") {
80 $fipscanisterbuild = 1;
81 $fipscanisteronly = 1;
85 die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq "";
90 "VC-WIN32", "Microsoft Visual C++ [4-6] - Windows NT or 9X",
91 "VC-WIN64I", "Microsoft C/C++ - Win64/IA-64",
92 "VC-WIN64A", "Microsoft C/C++ - Win64/x64",
93 "VC-CE", "Microsoft eMbedded Visual C++ 3.0 - Windows CE ONLY",
94 "VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY",
95 "Mingw32", "GNU C++ - Windows NT or 9x",
96 "Mingw32-files", "Create files with DOS copy ...",
97 "BC-NT", "Borland C++ 4.5 - Windows NT",
98 "linux-elf","Linux elf",
99 "ultrix-mips","DEC mips ultrix",
100 "FreeBSD","FreeBSD distribution",
101 "OS2-EMX", "EMX GCC OS/2",
102 "netware-clib", "CodeWarrior for NetWare - CLib - with WinSock Sockets",
103 "netware-clib-bsdsock", "CodeWarrior for NetWare - CLib - with BSD Sockets",
104 "netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets",
105 "netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets",
106 "default","cc under unix",
107 "auto", "auto detect from top level Makefile"
114 if (!&read_options && !defined($ops{$_}))
116 print STDERR "unknown option - $_\n";
117 print STDERR "usage: perl mk1mf.pl [options] [system]\n";
118 print STDERR "\nwhere [system] can be one of the following\n";
119 foreach $i (sort keys %ops)
120 { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; }
121 print STDERR <<"EOF";
122 and [options] can be one of
123 no-md2 no-md4 no-md5 no-sha no-mdc2 - Skip this digest
125 no-rc2 no-rc4 no-rc5 no-idea no-des - Skip this symetric cipher
126 no-bf no-cast no-aes no-camellia no-seed
127 no-rsa no-dsa no-dh - Skip this public key cipher
128 no-ssl2 no-ssl3 - Skip this version of SSL
129 just-ssl - remove all non-ssl keys/digest
136 no-engine - No engine
138 nasm - Use NASM for x86 asm
139 nw-nasm - Use NASM x86 asm for NetWare
140 nw-mwasm - Use Metrowerks x86 asm for NetWare
141 gaswin - Use GNU as with Mingw32
142 no-socks - No socket code
143 no-err - No error strings
144 dll/shlib - Build shared libraries (MS)
146 profile - Profiling build
149 Values that can be set
150 TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler
152 -L<ex_lib_path> -l<ex_lib> - extra library flags (unix)
153 -<ex_cc_flags> - extra 'cc' flags,
154 added (MS), or replace (unix)
160 foreach (grep(!/^$/, split(/ /, $OPTIONS)))
162 print STDERR "unknown option - $_\n" if !&read_options;
165 $no_static_engine = 0 if (!$shlib);
167 $no_mdc2=1 if ($no_des);
169 $no_ssl3=1 if ($no_md5 || $no_sha);
170 $no_ssl3=1 if ($no_rsa && $no_dh);
172 $no_ssl2=1 if ($no_md5);
173 $no_ssl2=1 if ($no_rsa);
179 $perl="perl" unless defined $perl;
180 $mkdir="-mkdir" unless defined $mkdir;
182 ($ssl,$crypto)=("ssl","crypto");
183 $ranlib="echo ranlib";
185 $cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc';
186 $src_dir=(defined($VARS{'SRC'}))?$VARS{'SRC'}:'.';
187 $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
189 # $bin_dir.=$o causes a core dump on my sparc :-(
194 push(@INC,"util/pl","pl");
196 if ($platform eq "auto") {
197 $platform = $mf_platform;
198 print STDERR "Imported platform $mf_platform\n";
201 if (($platform =~ /VC-(.+)/))
204 $NT = 1 if $1 eq "NT";
207 elsif ($platform eq "Mingw32")
209 require 'Mingw32.pl';
211 elsif ($platform eq "Mingw32-files")
213 require 'Mingw32f.pl';
215 elsif ($platform eq "BC-NT")
220 elsif ($platform eq "FreeBSD")
223 $cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer';
225 elsif ($platform eq "linux-elf")
231 elsif ($platform eq "ultrix-mips")
237 elsif ($platform eq "OS2-EMX")
240 require 'OS2-EMX.pl';
242 elsif (($platform eq "netware-clib") || ($platform eq "netware-libc") ||
243 ($platform eq "netware-clib-bsdsock") || ($platform eq "netware-libc-bsdsock"))
245 $LIBC=1 if $platform eq "netware-libc" || $platform eq "netware-libc-bsdsock";
246 $BSDSOCK=1 if ($platform eq "netware-libc-bsdsock") || ($platform eq "netware-clib-bsdsock");
247 require 'netware.pl';
254 $cflags.=' -DTERMIO';
257 $out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
258 $tmp_dir=(defined($VARS{'TMP'}))?$VARS{'TMP'}:$tmp_def.($debug?".dbg":"");
259 $inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def;
261 $bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq ''));
263 $cflags= "$xcflags$cflags" if $xcflags ne "";
265 $cflags.=" -DOPENSSL_NO_IDEA" if $no_idea;
266 $cflags.=" -DOPENSSL_NO_AES" if $no_aes;
267 $cflags.=" -DOPENSSL_NO_CAMELLIA" if $no_camellia;
268 $cflags.=" -DOPENSSL_NO_SEED" if $no_seed;
269 $cflags.=" -DOPENSSL_NO_RC2" if $no_rc2;
270 $cflags.=" -DOPENSSL_NO_RC4" if $no_rc4;
271 $cflags.=" -DOPENSSL_NO_RC5" if $no_rc5;
272 $cflags.=" -DOPENSSL_NO_MD2" if $no_md2;
273 $cflags.=" -DOPENSSL_NO_MD4" if $no_md4;
274 $cflags.=" -DOPENSSL_NO_MD5" if $no_md5;
275 $cflags.=" -DOPENSSL_NO_SHA" if $no_sha;
276 $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1;
277 $cflags.=" -DOPENSSL_NO_RIPEMD" if $no_ripemd;
278 $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2;
279 $cflags.=" -DOPENSSL_NO_BF" if $no_bf;
280 $cflags.=" -DOPENSSL_NO_CAST" if $no_cast;
281 $cflags.=" -DOPENSSL_NO_DES" if $no_des;
282 $cflags.=" -DOPENSSL_NO_RSA" if $no_rsa;
283 $cflags.=" -DOPENSSL_NO_DSA" if $no_dsa;
284 $cflags.=" -DOPENSSL_NO_DH" if $no_dh;
285 $cflags.=" -DOPENSSL_NO_WHIRLPOOL" if $no_whirlpool;
286 $cflags.=" -DOPENSSL_NO_SOCK" if $no_sock;
287 $cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
288 $cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
289 $cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
290 $cflags.=" -DOPENSSL_NO_SRP" if $no_srp;
291 $cflags.=" -DOPENSSL_NO_CMS" if $no_cms;
292 $cflags.=" -DOPENSSL_NO_ERR" if $no_err;
293 $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
294 $cflags.=" -DOPENSSL_NO_EC" if $no_ec;
295 $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
296 $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
297 $cflags.=" -DOPENSSL_NO_GOST" if $no_gost;
298 $cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
299 $cflags.=" -DOPENSSL_NO_HW" if $no_hw;
300 $cflags.=" -DOPENSSL_FIPS" if $fips;
301 $cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
302 $cflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m;
303 $cflags.= " -DZLIB" if $zlib_opt;
304 $cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
306 if ($no_static_engine)
308 $cflags .= " -DOPENSSL_NO_STATIC_ENGINE";
312 $cflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE";
315 #$cflags.=" -DRSAref" if $rsaref ne "";
318 ## { $cflags="$c_flags" if ($c_flags ne ""); }
320 { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
322 $ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
325 %shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL",
326 "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO");
330 $banner ="\t\@echo Make sure you have run 'perl Configure $platform' in the\n";
331 $banner.="\t\@echo top level directory, if you don't have perl, you will\n";
332 $banner.="\t\@echo need to probably edit crypto/bn/bn.h, check the\n";
333 $banner.="\t\@echo documentation for details.\n";
336 # have to do this to allow $(CC) under unix
337 $link="$bin_dir$link" if ($link !~ /^\$/);
339 $INSTALLTOP =~ s|/|$o|g;
340 $OPENSSLDIR =~ s|/|$o|g;
342 #############################################
343 # We parse in input file and 'store' info for later printing.
344 open(IN,"<$infile") || die "unable to open $infile:$!\n";
350 ($key,$val)=/^([^=]+)=(.*)/;
351 if ($key eq "RELATIVE_DIRECTORY")
355 if ($fips && $dir =~ /^fips/)
362 $uc =~ s/^lib(.*)\.a/$1/;
365 if (($uc ne "FIPS") || $fipscanisterbuild)
368 $lib_obj{$uc}.=$libobj." ";
371 last if ($val eq "FINISHED");
377 if ($key eq "KRB5_INCLUDES")
378 { $cflags .= " $val";}
380 if ($key eq "ZLIB_INCLUDE")
381 { $cflags .= " $val" if $val ne "";}
383 if ($key eq "LIBZLIB")
384 { $zlib_lib = "$val" if $val ne "";}
386 if ($key eq "LIBKRB5")
387 { $ex_libs .= " $val" if $val ne "";}
389 if ($key eq "TEST" && (!$fipscanisteronly || $dir =~ /^fips/ ))
390 { $test.=&var_add($dir,$val, 0); }
392 if (($key eq "PROGS") || ($key eq "E_OBJ"))
393 { $e_exe.=&var_add($dir,$val, 0); }
398 $lib =~ s/^.*\/([^\/]+)$/$1/;
400 if ($key eq "LIBNAME" && $no_static_engine)
403 $lib =~ s/^.*\/([^\/]+)$/$1/;
404 $otherlibs .= " $lib";
407 if ($key eq "EXHEADER")
408 { $exheader.=&var_add($dir,$val, 1); }
410 if ($key eq "HEADER")
411 { $header.=&var_add($dir,$val, 1); }
413 if ($key eq "LIBOBJ" && ($dir ne "engines" || !$no_static_engine))
414 { $libobj=&var_add($dir,$val, 0); }
415 if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine)
418 if ($key eq "FIPS_EX_OBJ")
420 $fips_ex_obj=&var_add("crypto",$val,0);
423 if ($key eq "FIPSLIBDIR")
426 $fipslibdir =~ s/\/$//;
427 $fipslibdir =~ s/\//$o/g;
430 if ($key eq "BASEADDR")
434 { $_="RELATIVE_DIRECTORY=FINISHED\n"; }
441 foreach (split " ", $fips_ex_obj)
443 $fips_exclude_obj{$1} = 1 if (/\/([^\/]*)$/);
446 "$mf_cpuid_asm $mf_aes_asm $mf_sha_asm $mf_bn_asm " .
447 "$mf_des_asm $mf_modes_asm")
450 $fips_exclude_obj{$_} = 1;
452 my @ltmp = split " ", $lib_obj{"CRYPTO"};
455 $lib_obj{"CRYPTO"} = "";
459 if (/\/([^\/]*)$/ && exists $fips_exclude_obj{$1})
461 if ($fipscanisterbuild)
463 $lib_obj{"FIPS"} .= "$_ ";
466 elsif (!$fipscanisteronly)
468 $lib_obj{"CRYPTO"} .= "$_ ";
474 if ($fipscanisterbuild)
476 $fips_canister_path = "\$(LIB_D)${o}fipscanister.lib" if $fips_canister_path eq "";
477 $fips_premain_c_path = "\$(LIB_D)${o}fips_premain.c";
481 if ($fips_canister_path eq "")
483 $fips_canister_path = "\$(FIPSLIB_D)${o}fipscanister.lib";
486 if ($fips_premain_c_path eq "")
488 $fips_premain_c_path = "\$(FIPSLIB_D)${o}fips_premain.c";
494 if ($fips_sha1_exe_path eq "")
496 $fips_sha1_exe_path =
497 "\$(BIN_D)${o}fips_standalone_sha1$exep";
502 $fips_sha1_exe_path = "";
505 if ($fips_premain_dso_exe_path eq "")
507 $fips_premain_dso_exe_path = "\$(BIN_D)${o}fips_premain_dso$exep";
510 # $ex_build_targets .= "\$(BIN_D)${o}\$(E_PREMAIN_DSO)$exep" if ($fips);
516 $build_targets .= " \$(LIB_D)$o$crypto_compat \$(PREMAIN_DSO_EXE)";
517 $ex_l_libs .= " \$(O_FIPSCANISTER)";
518 $ex_libs_dep .= " \$(O_FIPSCANISTER)" if $fipscanisterbuild;
520 if ($fipscanisterbuild)
522 $fipslibdir = "\$(LIB_D)";
526 if ($fipslibdir eq "")
528 open (IN, "util/fipslib_path.txt") || fipslib_error();
533 fips_check_files($fipslibdir,
534 "fipscanister.lib", "fipscanister.lib.sha1",
535 "fips_premain.c", "fips_premain.c.sha1");
539 if ($fipscanisteronly)
541 $build_targets = "\$(O_FIPSCANISTER) \$(T_EXE)";
548 $extra_install= <<"EOF";
549 \$(CP) \"\$(O_SSL)\" \"\$(INSTALLTOP)${o}bin\"
550 \$(CP) \"\$(O_CRYPTO)\" \"\$(INSTALLTOP)${o}bin\"
551 \$(CP) \"\$(L_SSL)\" \"\$(INSTALLTOP)${o}lib\"
552 \$(CP) \"\$(L_CRYPTO)\" \"\$(INSTALLTOP)${o}lib\"
554 if ($no_static_engine)
556 $extra_install .= <<"EOF"
557 \$(MKDIR) \"\$(INSTALLTOP)${o}lib${o}engines\"
558 \$(CP) \"\$(E_SHLIB)\" \"\$(INSTALLTOP)${o}lib${o}engines\"
564 $extra_install= <<"EOF";
565 \$(CP) \"\$(O_SSL)\" \"\$(INSTALLTOP)${o}lib\"
566 \$(CP) \"\$(O_CRYPTO)\" \"\$(INSTALLTOP)${o}lib\"
568 $ex_libs .= " $zlib_lib" if $zlib_opt == 1;
572 # This makefile has been automatically generated from the OpenSSL distribution.
573 # This single makefile will build the complete OpenSSL distribution and
574 # by default leave the 'intertesting' output files in .${o}out and the stuff
575 # that needs deleting in .${o}tmp.
576 # The file was generated by running 'make makefile.one', which
577 # does a 'make files', which writes all the environment variables from all
578 # the makefiles to the file call MINFO. This file is used by
579 # util${o}mk1mf.pl to generate makefile.one.
580 # The 'makefile per directory' system suites me when developing this
581 # library and also so I can 'distribute' indervidual library sections.
582 # The one monster makefile better suits building in non-unix
587 $defs .= $preamble if defined $preamble;
590 INSTALLTOP=$INSTALLTOP
591 OPENSSLDIR=$OPENSSLDIR
593 # Set your compiler options
599 SHLIB_CFLAG=$shl_cflag
600 APP_EX_OBJ=$app_ex_obj
601 SHLIB_EX_OBJ=$shlib_ex_obj
602 # add extra libraries to this define, for solaris -lsocket -lnsl would
606 # The OpenSSL directory
612 FIPSLINK=\$(PERL) util${o}fipslink.pl
614 # The output directory for everything intersting
616 # The output directory for all the temporary muck
618 # The output directory for the header files
620 INCO_D=$inc_dir${o}openssl
631 # FIPS validated module and support file locations
633 E_PREMAIN_DSO=fips_premain_dso
635 FIPSLIB_D=$fipslibdir
637 FIPS_PREMAIN_SRC=$fips_premain_c_path
638 O_FIPSCANISTER=$fips_canister_path
639 FIPS_SHA1_EXE=$fips_sha1_exe_path
640 PREMAIN_DSO_EXE=$fips_premain_dso_exe_path
642 ######################################################
643 # You should not need to touch anything below this point
644 ######################################################
650 # BIN_D - Binary output directory
651 # TEST_D - Binary test file output directory
652 # LIB_D - library output directory
653 # ENG_D - dynamic engine output directory
654 # Note: if you change these point to different directories then uncomment out
655 # the lines around the 'NB' comment below.
662 # INCL_D - local library directory
663 # OBJ_D - temp object file directory
667 O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp
668 O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp
669 SO_SSL= $plib\$(SSL)$so_shlibp
670 SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
671 L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
672 L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
674 L_LIBS= \$(L_SSL) \$(L_CRYPTO) $ex_l_libs
676 ######################################################
677 # Don't touch anything below this point
678 ######################################################
680 INC=-I\$(INC_D) -I\$(INCL_D)
681 APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
682 LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
683 SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
686 #############################################
690 all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers \$(FIPS_SHA1_EXE) $build_targets
696 \$(MKDIR) \"\$(TMP_D)\"
697 # NB: uncomment out these lines if BIN_D, TEST_D and LIB_D are different
699 # \$(MKDIR) \$(BIN_D)
702 # \$(MKDIR) \$(TEST_D)
705 \$(MKDIR) \"\$(LIB_D)\"
707 \$(INCO_D): \$(INC_D)
708 \$(MKDIR) \"\$(INCO_D)\"
711 \$(MKDIR) \"\$(INC_D)\"
713 headers: \$(HEADER) \$(EXHEADER)
716 lib: \$(LIBS_DEP) \$(E_SHLIB)
718 exe: \$(T_EXE) \$(BIN_D)$o\$(E_EXE)$exep
721 \$(MKDIR) \"\$(INSTALLTOP)\"
722 \$(MKDIR) \"\$(INSTALLTOP)${o}bin\"
723 \$(MKDIR) \"\$(INSTALLTOP)${o}include\"
724 \$(MKDIR) \"\$(INSTALLTOP)${o}include${o}openssl\"
725 \$(MKDIR) \"\$(INSTALLTOP)${o}lib\"
726 \$(CP) \"\$(INCO_D)${o}*.\[ch\]\" \"\$(INSTALLTOP)${o}include${o}openssl\"
727 \$(CP) \"\$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin\"
728 \$(MKDIR) \"\$(OPENSSLDIR)\"
729 \$(CP) apps${o}openssl.cnf \"\$(OPENSSLDIR)\"
738 \$(RM) \$(TMP_D)$o*.*
741 \$(RM) \$(TMP_D)$o*.*
742 \$(RM) \$(OUT_D)$o*.*
746 my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform";
747 $platform_cpp_symbol =~ s/-/_/g;
748 if (open(IN,"crypto/buildinf.h"))
750 # Remove entry for this platform in existing file buildinf.h.
752 my $old_buildinf_h = "";
755 if (/^\#ifdef $platform_cpp_symbol$/)
757 while (<IN>) { last if (/^\#endif/); }
761 $old_buildinf_h .= $_;
766 open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.h";
767 print OUT $old_buildinf_h;
771 open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h";
773 #ifdef $platform_cpp_symbol
774 /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
775 #define CFLAGS "$cc $cflags"
776 #define PLATFORM "$platform"
778 printf OUT " #define DATE \"%s\"\n", scalar gmtime();
779 printf OUT "#endif\n";
782 # Strip of trailing ' '
783 foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); }
784 $test=&clean_up_ws($test);
785 $e_exe=&clean_up_ws($e_exe);
786 $exheader=&clean_up_ws($exheader);
787 $header=&clean_up_ws($header);
789 # First we strip the exheaders from the headers list
790 foreach (split(/\s+/,$exheader)){ $h{$_}=1; }
791 foreach (split(/\s+/,$header)) { $h.=$_." " unless $h{$_}; }
792 chop($h); $header=$h;
794 $defs.=&do_defs("HEADER",$header,"\$(INCL_D)","");
795 $rules.=&do_copy_rule("\$(INCL_D)",$header,"");
797 $defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)","");
798 $rules.=&do_copy_rule("\$(INCO_D)",$exheader,"");
800 $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj);
801 $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
803 $defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj);
804 $rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
806 # Special case rules for fips_start and fips_end fips_premain_dso
810 if ($fipscanisterbuild)
812 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_start$obj",
813 "fips${o}fips_canister.c",
814 "-DFIPS_START \$(SHLIB_CFLAGS)");
815 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_end$obj",
816 "fips${o}fips_canister.c", "\$(SHLIB_CFLAGS)");
818 $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_standalone_sha1$obj",
819 "fips${o}sha${o}fips_standalone_sha1.c",
821 $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj",
822 "fips${o}fips_premain.c",
823 "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)");
826 foreach (values %lib_nam)
828 $lib_obj=$lib_obj{$_};
831 if (($_ eq "SSL") && $no_ssl2 && $no_ssl3)
833 $rules.="\$(O_SSL):\n\n";
837 $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj);
838 $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)";
839 $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib);
842 # hack to add version info on MSVC
843 if (($platform eq "VC-WIN32") || ($platform eq "VC-WIN64A")
844 || ($platform eq "VC-WIN64I") || ($platform eq "VC-NT")) {
846 \$(OBJ_D)\\\$(CRYPTO).res: ms\\version32.rc
847 \$(RSC) /fo"\$(OBJ_D)\\\$(CRYPTO).res" /d CRYPTO ms\\version32.rc
849 \$(OBJ_D)\\\$(SSL).res: ms\\version32.rc
850 \$(RSC) /fo"\$(OBJ_D)\\\$(SSL).res" /d SSL ms\\version32.rc
855 $defs.=&do_defs("T_EXE",$test,"\$(TEST_D)",$exep);
856 foreach (split(/\s+/,$test))
861 # Check to see if test program is FIPS
864 # If fips perform static link to
866 $t_libs = "\$(O_FIPSCANISTER)";
871 $t_libs = "\$(L_LIBS)";
875 $tt="\$(OBJ_D)${o}$t${obj}";
876 $rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","$t_libs \$(EX_LIBS)", $ltype);
879 $defs.=&do_defs("E_SHLIB",$engines . $otherlibs,"\$(ENG_D)",$shlibp);
881 foreach (split(/\s+/,$engines))
883 $rules.=&do_compile_rule("\$(OBJ_D)","engines${o}e_$_",$lib);
884 $rules.= &do_lib_rule("\$(OBJ_D)${o}e_${_}.obj","\$(ENG_D)$o$_$shlibp","",$shlib,"");
889 $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
890 #$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
892 foreach (split(" ",$otherlibs))
896 $rules.= &do_lib_rule("\$(${uc}OBJ)","\$(ENG_D)$o$_$shlibp", "", $shlib, "");
904 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
905 "\$(O_CRYPTO)", "$crypto",
906 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
910 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
911 "\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)", "");
912 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(FIPSOBJ)",
913 "\$(LIB_D)$o$crypto_compat",$crypto,$shlib,"\$(SO_CRYPTO)", "");
918 $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,
924 if ($fipscanisterbuild)
926 $rules.= &do_rlink_rule("\$(O_FIPSCANISTER)",
927 "\$(OBJ_D)${o}fips_start$obj",
929 "\$(OBJ_D)${o}fips_end$obj",
930 "\$(FIPS_SHA1_EXE)", "");
932 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
933 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(OBJ_D)${o}sha1dgst$obj $sha1_asm_obj",
934 "","\$(EX_LIBS)", 1);
938 $rules.=&do_link_rule("\$(FIPS_SHA1_EXE)",
939 "\$(OBJ_D)${o}fips_standalone_sha1$obj \$(O_FIPSCANISTER)",
943 $rules.=&do_link_rule("\$(PREMAIN_DSO_EXE)","\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj \$(CRYPTOOBJ) \$(O_FIPSCANISTER)","","\$(EX_LIBS)", 1);
947 $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)", ($fips && !$shlib) ? 2 : 0);
951 if ($platform eq "linux-elf") {
953 # Generate perlasm output files
955 (cd \$(\@D)/..; PERL=perl make -f Makefile asm/\$(\@F))
958 print "###################################################################\n";
961 ###############################################
962 # strip off any trailing .[och] and append the relative directory
963 # also remembering to do nothing if we are in one of the dropped
967 local($dir,$val,$keepext)=@_;
970 return("") if $no_engine && $dir =~ /\/engine/;
971 return("") if $no_hw && $dir =~ /\/hw/;
972 return("") if $no_idea && $dir =~ /\/idea/;
973 return("") if $no_aes && $dir =~ /\/aes/;
974 return("") if $no_camellia && $dir =~ /\/camellia/;
975 return("") if $no_seed && $dir =~ /\/seed/;
976 return("") if $no_rc2 && $dir =~ /\/rc2/;
977 return("") if $no_rc4 && $dir =~ /\/rc4/;
978 return("") if $no_rc5 && $dir =~ /\/rc5/;
979 return("") if $no_rsa && $dir =~ /\/rsa/;
980 return("") if $no_rsa && $dir =~ /^rsaref/;
981 return("") if $no_dsa && $dir =~ /\/dsa/;
982 return("") if $no_dh && $dir =~ /\/dh/;
983 return("") if $no_ec && $dir =~ /\/ec/;
984 return("") if $no_gost && $dir =~ /\/ccgost/;
985 return("") if $no_cms && $dir =~ /\/cms/;
986 return("") if $no_jpake && $dir =~ /\/jpake/;
987 return("") if !$fips && $dir =~ /^fips/;
988 if ($no_des && $dir =~ /\/des/)
990 if ($val =~ /read_pwd/)
991 { return("$dir/read_pwd "); }
995 return("") if $no_mdc2 && $dir =~ /\/mdc2/;
996 return("") if $no_sock && $dir =~ /\/proxy/;
997 return("") if $no_bf && $dir =~ /\/bf/;
998 return("") if $no_cast && $dir =~ /\/cast/;
999 return("") if $no_whirlpool && $dir =~ /\/whrlpool/;
1001 $val =~ s/^\s*(.*)\s*$/$1/;
1002 @a=split(/\s+/,$val);
1003 grep(s/\.[och]$//,@a) unless $keepext;
1005 @a=grep(!/^e_.*_3d$/,@a) if $no_des;
1006 @a=grep(!/^e_.*_d$/,@a) if $no_des;
1007 @a=grep(!/^e_.*_ae$/,@a) if $no_idea;
1008 @a=grep(!/^e_.*_i$/,@a) if $no_aes;
1009 @a=grep(!/^e_.*_r2$/,@a) if $no_rc2;
1010 @a=grep(!/^e_.*_r5$/,@a) if $no_rc5;
1011 @a=grep(!/^e_.*_bf$/,@a) if $no_bf;
1012 @a=grep(!/^e_.*_c$/,@a) if $no_cast;
1013 @a=grep(!/^e_rc4$/,@a) if $no_rc4;
1014 @a=grep(!/^e_camellia$/,@a) if $no_camellia;
1015 @a=grep(!/^e_seed$/,@a) if $no_seed;
1017 #@a=grep(!/(^s2_)|(^s23_)/,@a) if $no_ssl2;
1018 #@a=grep(!/(^s3_)|(^s23_)/,@a) if $no_ssl3;
1020 @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock;
1022 @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2;
1023 @a=grep(!/(^md4)|(_md4$)/,@a) if $no_md4;
1024 @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5;
1025 @a=grep(!/(rmd)|(ripemd)/,@a) if $no_ripemd;
1027 @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa;
1028 @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa;
1029 @a=grep(!/(^pem_seal$)/,@a) if $no_rsa;
1031 @a=grep(!/(m_dss$)|(m_dss1$)/,@a) if $no_dsa;
1032 @a=grep(!/(^d2i_s_)|(^i2d_s_)|(_dsap$)/,@a) if $no_dsa;
1034 @a=grep(!/^n_pkey$/,@a) if $no_rsa || $no_rc4;
1036 @a=grep(!/_dhp$/,@a) if $no_dh;
1038 @a=grep(!/(^sha[^1])|(_sha$)|(m_dss$)/,@a) if $no_sha;
1039 @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
1040 @a=grep(!/_mdc2$/,@a) if $no_mdc2;
1042 @a=grep(!/(srp)/,@a) if $no_srp;
1044 @a=grep(!/^engine$/,@a) if $no_engine;
1045 @a=grep(!/^hw$/,@a) if $no_hw;
1046 @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa;
1047 @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa;
1048 @a=grep(!/^gendsa$/,@a) if $no_sha1;
1049 @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh;
1051 @a=grep(!/(^dh)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
1053 grep($_="$dir/$_",@a);
1054 @a=grep(!/(^|\/)s_/,@a) if $no_sock;
1055 @a=grep(!/(^|\/)bio_sock/,@a) if $no_sock;
1056 $ret=join(' ',@a)." ";
1060 # change things so that each 'token' is only separated by one space
1065 $w =~ s/^\s*(.*)\s*$/$1/;
1072 local($var,$files,$location,$postfix)=@_;
1074 local(*OUT,$tmp,$t);
1076 $files =~ s/\//$o/g if $o ne '/';
1080 foreach (split(/ /,$files))
1083 $_=&bname($_) unless /^\$/;
1089 if (($_ =~ /bss_file/) && ($postfix eq ".h"))
1091 else { $pf=$postfix; }
1092 if ($_ =~ /BN_ASM/) { $t="$_ "; }
1093 elsif ($_ =~ /BNCO_ASM/){ $t="$_ "; }
1094 elsif ($_ =~ /AES_ASM/){ $t="$_ "; }
1095 elsif ($_ =~ /DES_ENC/) { $t="$_ "; }
1096 elsif ($_ =~ /BF_ENC/) { $t="$_ "; }
1097 elsif ($_ =~ /CAST_ENC/){ $t="$_ "; }
1098 elsif ($_ =~ /RC4_ENC/) { $t="$_ "; }
1099 elsif ($_ =~ /RC5_ENC/) { $t="$_ "; }
1100 elsif ($_ =~ /MD5_ASM/) { $t="$_ "; }
1101 elsif ($_ =~ /SHA1_ASM/){ $t="$_ "; }
1102 elsif ($_ =~ /RMD160_ASM/){ $t="$_ "; }
1103 elsif ($_ =~ /WHIRLPOOL_ASM/){ $t="$_ "; }
1104 elsif ($_ =~ /CPUID_ASM/){ $t="$_ "; }
1105 else { $t="$location${o}$_$pf "; }
1110 # hack to add version info on MSVC
1111 if ($shlib && (($platform eq "VC-WIN32") || ($platfrom eq "VC-WIN64I") || ($platform eq "VC-WIN64A") || ($platform eq "VC-NT")))
1113 if ($var eq "CRYPTOOBJ")
1114 { $ret.="\$(OBJ_D)\\\$(CRYPTO).res "; }
1115 elsif ($var eq "SSLOBJ")
1116 { $ret.="\$(OBJ_D)\\\$(SSL).res "; }
1123 # return the name with the leading path removed
1127 $ret =~ s/^.*[\\\/]([^\\\/]+)$/$1/;
1131 # return the leading path
1135 $ret =~ s/(^.*)[\\\/][^\\\/]+$/$1/;
1139 ##############################################################
1140 # do a rule for each file that says 'compile' to new direcory
1141 # compile the files in '$files' into $to
1144 local($to,$files,$ex)=@_;
1145 local($ret,$_,$n,$d,$s);
1147 $files =~ s/\//$o/g if $o ne '/';
1148 foreach (split(/\s+/,$files))
1154 $ret.=&cc_compile_target("$to${o}$n$obj","${_}.c",$ex)
1156 elsif (-f ($s="${d}${o}asm${o}${n}.pl") or
1157 ($s=~s/sha256/sha512/ and -f $s) or
1158 -f ($s="${d}${o}${n}.pl"))
1160 $ret.=&perlasm_compile_target("$to${o}$n$obj",$s,$n);
1162 elsif (-f ($s="${d}${o}asm${o}${n}.S") or
1163 -f ($s="${d}${o}${n}.S"))
1165 $ret.=&Sasm_compile_target("$to${o}$n$obj",$s,$n);
1167 else { die "no rule for $_"; }
1172 ##############################################################
1173 # do a rule for each file that says 'compile' to new direcory
1174 sub perlasm_compile_target
1176 my($target,$source,$bname)=@_;
1178 $bname =~ s/(.*)\.[^\.]$/$1/;
1179 $ret ="\$(TMP_D)$o$bname.asm: $source\n";
1180 $ret.="\t\$(PERL) $source $asmtype \$(CFLAG) >\$\@\n";
1181 if ($cflags =~ /-DOPENSSL_FIPSSYMS/)
1183 $ret .= "\t\$(PERL) util\\fipsas.pl . \$@ norunasm \$(CFLAG)\n";
1186 $ret.="$target: \$(TMP_D)$o$bname.asm\n";
1187 $ret.="\t\$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm\n\n";
1191 sub Sasm_compile_target
1193 my($target,$source,$bname)=@_;
1196 $bname =~ s/(.*)\.[^\.]$/$1/;
1197 $ret ="\$(TMP_D)$o$bname.asm: $source\n";
1198 $ret.="\t\$(CC) -E \$(CFLAG) $source >\$\@\n\n";
1199 $ret.="$target: \$(TMP_D)$o$bname.asm\n";
1200 $ret.="\t\$(ASM) $afile\$\@ \$(TMP_D)$o$bname.asm\n\n";
1204 sub cc_compile_target
1206 local($target,$source,$ex_flags)=@_;
1209 $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/);
1210 $target =~ s/\//$o/g if $o ne "/";
1211 $source =~ s/\//$o/g if $o ne "/";
1212 $ret ="$target: \$(SRC_D)$o$source\n\t";
1213 $ret.="\$(CC) ${ofile}$target $ex_flags -c \$(SRC_D)$o$source\n\n";
1217 ##############################################################
1220 local($target,$src)=@_;
1221 local($ret,@s,@t,$i);
1223 $target =~ s/\//$o/g if $o ne "/";
1224 $src =~ s/\//$o/g if $o ne "/";
1226 @t=split(/\s+/,$target);
1227 @s=split(/\s+/,$src);
1230 for ($i=0; $i<=$#s; $i++)
1232 my $objfile = $t[$i];
1233 my $srcfile = $s[$i];
1237 my $plasm = $objfile;
1238 $plasm =~ s/${obj}/.pl/;
1239 $ret.="$srcfile: $plasm\n";
1240 $ret.="\t\$(PERL) $plasm $asmtype \$(CFLAG) >$srcfile\n\n";
1243 $ret.="$objfile: $srcfile\n";
1244 $ret.="\t\$(ASM) $afile$objfile \$(SRC_D)$o$srcfile\n\n";
1255 ($nn=$n) =~ tr/a-z/A-Z/;
1256 $ret.="$n.dll: \$(${nn}OBJ)\n";
1259 $ret.="\t\$(MKSHLIB) $efile$n.dll $def @<<\n \$(${nn}OBJ_F)\n<<\n";
1265 # do a rule for each file that says 'copy' to new direcory on change
1268 local($to,$files,$p)=@_;
1269 local($ret,$_,$n,$pp);
1271 $files =~ s/\//$o/g if $o ne '/';
1272 foreach (split(/\s+/,$files))
1275 if ($n =~ /bss_file/)
1278 $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \"\$(SRC_D)$o$_$pp\" \"$to${o}$n$pp\"\n\n";
1285 # Many options are handled in a similar way. In particular
1286 # no-xxx sets zero or more scalars to 1.
1287 # Process these using a hash containing the option name and
1288 # reference to the scalars to set.
1290 my %valid_options = (
1291 "no-rc2" => \$no_rc2,
1292 "no-rc4" => \$no_rc4,
1293 "no-rc5" => \$no_rc5,
1294 "no-idea" => \$no_idea,
1295 "no-aes" => \$no_aes,
1296 "no-camellia" => \$no_camellia,
1297 "no-seed" => \$no_seed,
1298 "no-des" => \$no_des,
1300 "no-cast" => \$no_cast,
1301 "no-md2" => \$no_md2,
1302 "no-md4" => \$no_md4,
1303 "no-md5" => \$no_md5,
1304 "no-sha" => \$no_sha,
1305 "no-sha1" => \$no_sha1,
1306 "no-ripemd" => \$no_ripemd,
1307 "no-mdc2" => \$no_mdc2,
1308 "no-whirlpool" => \$no_whirlpool,
1310 [\$no_rc2, \$no_rc4, \$no_rc5, \$no_idea, \$no_rsa],
1311 "no-rsa" => \$no_rsa,
1312 "no-dsa" => \$no_dsa,
1314 "no-hmac" => \$no_hmac,
1315 "no-asm" => \$no_asm,
1317 "nw-nasm" => \$nw_nasm,
1318 "nw-mwasm" => \$nw_mwasm,
1319 "gaswin" => \$gaswin,
1320 "no-ssl2" => \$no_ssl2,
1321 "no-ssl3" => \$no_ssl3,
1322 "no-tlsext" => \$no_tlsext,
1323 "no-srp" => \$no_srp,
1324 "no-cms" => \$no_cms,
1325 "no-jpake" => \$no_jpake,
1326 "no-ec2m" => \$no_ec2m,
1327 "no-ec-nistp224-64-gcc-128" => 0,
1328 "no-err" => \$no_err,
1329 "no-sock" => \$no_sock,
1330 "no-krb5" => \$no_krb5,
1332 "no-ecdsa" => \$no_ecdsa,
1333 "no-ecdh" => \$no_ecdh,
1334 "no-gost" => \$no_gost,
1335 "no-engine" => \$no_engine,
1338 [\$no_rc2, \$no_idea, \$no_des, \$no_bf, \$no_cast,
1339 \$no_md2, \$no_sha, \$no_mdc2, \$no_dsa, \$no_dh,
1340 \$no_ssl2, \$no_err, \$no_ripemd, \$no_rc5,
1341 \$no_aes, \$no_camellia, \$no_seed, \$no_srp],
1345 "profile" => \$profile,
1355 "no-zlib-dynamic" => 0,
1357 "fipscanisterbuild" => [\$fips, \$fipscanisterbuild],
1358 "fipscanisteronly" => [\$fips, \$fipscanisterbuild, \$fipscanisteronly],
1361 if (exists $valid_options{$_})
1363 my $r = $valid_options{$_};
1364 if ( ref $r eq "SCALAR")
1366 elsif ( ref $r eq "ARRAY")
1375 elsif (/^no-comp$/) { $xcflags = "-DOPENSSL_NO_COMP $xcflags"; }
1376 elsif (/^enable-zlib$/) { $zlib_opt = 1 if $zlib_opt == 0 }
1377 elsif (/^enable-zlib-dynamic$/)
1381 elsif (/^no-static-engine/)
1383 $no_static_engine = 1;
1385 elsif (/^enable-static-engine/)
1387 $no_static_engine = 0;
1389 # There are also enable-xxx options which correspond to
1390 # the no-xxx. Since the scalars are enabled by default
1391 # these can be ignored.
1395 $t =~ s/^enable/no/;
1396 if (exists $valid_options{$t})
1400 # experimental-xxx is mostly like enable-xxx, but opensslconf.v
1401 # will still set OPENSSL_NO_xxx unless we set OPENSSL_EXPERIMENTAL_xxx.
1402 # (No need to fail if we don't know the algorithm -- this is for adventurous users only.)
1403 elsif (/^experimental-/)
1406 ($algo = $_) =~ s/^experimental-//;
1407 ($ALGO = $algo) =~ tr/[a-z]/[A-Z]/;
1409 $xcflags="-DOPENSSL_EXPERIMENTAL_$ALGO $xcflags";
1412 elsif (/^--with-krb5-flavor=(.*)$/)
1414 my $krb5_flavor = $1;
1415 if ($krb5_flavor =~ /^force-[Hh]eimdal$/)
1417 $xcflags="-DKRB5_HEIMDAL $xcflags";
1419 elsif ($krb5_flavor =~ /^MIT/i)
1421 $xcflags="-DKRB5_MIT $xcflags";
1422 if ($krb5_flavor =~ /^MIT[._-]*1[._-]*[01]/i)
1424 $xcflags="-DKRB5_MIT_OLD11 $xcflags"
1428 elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; }
1429 elsif (/^-[lL].*$/) { $l_flags.="$_ "; }
1430 elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/)
1431 { $c_flags.="$_ "; }
1438 print STDERR "***FIPS module directory sanity check failed***\n";
1439 print STDERR "FIPS module build failed, or was deleted\n";
1440 print STDERR "Please rebuild FIPS module.\n";
1444 sub fips_check_files
1450 print STDERR "FIPS module directory $dir does not exist\n";
1455 if (!-f "$dir${o}$_")
1457 print STDERR "FIPS module file $_ does not exist!\n";
1461 fipslib_error() if ($ret == 0);