summaryrefslogtreecommitdiffstats
path: root/util/mkdef.pl
diff options
context:
space:
mode:
Diffstat (limited to 'util/mkdef.pl')
-rwxr-xr-xutil/mkdef.pl38
1 files changed, 33 insertions, 5 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 64e0430a19..ddc33c152b 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -1135,27 +1135,55 @@ sub print_test_file
}
}
+sub get_version {
+ local *MF;
+ my $v = '?';
+ open MF, 'Makefile.ssl' or return $v;
+ while (<MF>) {
+ $v = $1, last if /^VERSION=(.*?)\s*$/;
+ }
+ close MF;
+ return $v;
+}
+
sub print_def_file
{
(*OUT,my $name,*nums,my @symbols)=@_;
my $n = 1; my @e; my @r; my @v; my $prev="";
my $liboptions="";
+ my $libname = $name;
+ my $http_vendor = 'www.openssl.org/';
+ my $version = get_version();
+ my $what = "OpenSSL: implementation of Secure Socket Layer";
+ my $description = "$what $version, $name - http://$http_vendor";
if ($W32)
- { $name.="32"; }
+ { $libname.="32"; }
elsif ($W16)
- { $name.="16"; }
+ { $libname.="16"; }
elsif ($OS2)
- { $liboptions = "INITINSTANCE\nDATA NONSHARED"; }
+ { # DLL names should not clash on the whole system.
+ # However, they should not have any particular relationship
+ # to the name of the static library. Chose descriptive names
+ # (must be at most 8 chars).
+ my %translate = (ssl => 'open_ssl', crypto => 'cryptssl');
+ $libname = $translate{$name} || $name;
+ $liboptions = <<EOO;
+INITINSTANCE
+DATA MULTIPLE NONSHARED
+EOO
+ # Vendor field can't contain colon, drat; so we omit http://
+ $description = "\@#$http_vendor:$version#\@$what; DLL for library $name. Build for EMX -Zmtd";
+ }
print OUT <<"EOF";
;
; Definition file for the DLL version of the $name library from OpenSSL
;
-LIBRARY $name $liboptions
+LIBRARY $libname $liboptions
-DESCRIPTION 'OpenSSL $name - http://www.openssl.org/'
+DESCRIPTION '$description'
EOF