#!/usr/local/bin/perl
# A bit of an evil hack but it post processes the file ../MINFO which
# is generated by `make files` in the top directory.
# This script outputs one mega makefile that has no shell stuff or any
# funny stuff
#
$INSTALLTOP="/usr/local/ssl";
$OPTIONS="";
$ssl_version="";
$banner="\t\@echo Building OpenSSL";
my $no_static_engine = 0;
my $engines = "";
local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
local $zlib_lib = "";
local $fips_canister_path = "";
my $fips_premain_dso_exe_path = "";
my $fips_premain_c_path = "";
my $fips_sha1_exe_path = "";
local $fipscanisterbuild = 0;
local $fipsdso = 0;
my $fipslibdir = "";
my $baseaddr = "";
my $ex_l_libs = "";
open(IN,"<Makefile") || die "unable to open Makefile!\n";
while(<IN>) {
$ssl_version=$1 if (/^VERSION=(.*)$/);
$OPTIONS=$1 if (/^OPTIONS=(.*)$/);
$INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/);
}
close(IN);
die "Makefile is not the toplevel Makefile!\n" if $ssl_version eq "";
$infile