mirror of
https://github.com/openssl/openssl.git
synced 2025-02-11 14:22:43 +08:00
For Unix like environments, we may have so called "simple" shared library names (libfoo.so as opposed to libfoo.so.1.2), or we may have "import" library names associated with a DLL (libfoo.dll.a for libfoo.dll on Mingw and derivatives). So far, "import" library names were treated the same as "simple" shared library names, as some kind of normalization for the Unix way of doing things. We now shift to treat them separately, to make it clearer what is what. Fixes #13414, incidently Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13875)
52 lines
1.5 KiB
Perl
52 lines
1.5 KiB
Perl
package platform::mingw;
|
|
|
|
use strict;
|
|
use warnings;
|
|
use Carp;
|
|
|
|
use vars qw(@ISA);
|
|
|
|
require platform::Unix;
|
|
@ISA = qw(platform::Unix);
|
|
|
|
# Assume someone set @INC right before loading this module
|
|
use configdata;
|
|
|
|
sub binext { '.exe' }
|
|
sub objext { '.obj' }
|
|
sub libext { '.a' }
|
|
sub dsoext { '.dll' }
|
|
sub defext { '.def' }
|
|
|
|
# Other extra that aren't defined in platform::BASE
|
|
sub resext { '.res.obj' }
|
|
sub shlibext { '.dll' }
|
|
sub shlibextimport { $target{shared_import_extension} || '.dll.a' }
|
|
sub shlibextsimple { undef }
|
|
sub makedepprog { $disabled{makedepend} ? undef : $config{makedepprog} }
|
|
|
|
(my $sover_filename = $config{shlib_version}) =~ s|\.|_|g;
|
|
sub shlib_version_as_filename {
|
|
return $sover_filename;
|
|
}
|
|
sub sharedname {
|
|
return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
|
|
"-",
|
|
$_[0]->shlib_version_as_filename(),
|
|
($config{target} eq "mingw64"
|
|
? "-x64" : ""));
|
|
}
|
|
|
|
# With Mingw and other DLL producers, there isn't any "simpler" shared
|
|
# library name. However, there is a static import library.
|
|
sub sharedlib_simple {
|
|
return undef;
|
|
}
|
|
|
|
sub sharedlib_import {
|
|
return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
|
|
$_[0]->shlibextimport());
|
|
}
|
|
|
|
1;
|