5788a36e7782baa9157e12698f03ed5f99f849d8
[openssl.git] / Configurations / platform / mingw.pm
1 package platform::mingw;
2
3 use strict;
4 use warnings;
5 use Carp;
6
7 use vars qw(@ISA);
8
9 require platform::Unix;
10 @ISA = qw(platform::Unix);
11
12 # Assume someone set @INC right before loading this module
13 use configdata;
14
15 sub binext              { '.exe' }
16 sub objext              { '.obj' }
17 sub libext              { '.a' }
18 sub dsoext              { '.dll' }
19 sub defext              { '.def' }
20 sub shlibext            { '.dll' }
21 sub shlibextimport      { $target{shared_import_extension} || '.dll.a' }
22 sub shlibextsimple      { undef }
23 sub makedepprog         { $disabled{makedepend} ? undef : $config{makedepprog} }
24
25 (my $sover_filename = $config{shlib_version}) =~ s|\.|_|g;
26 sub shlib_version_as_filename {
27     return $sover_filename;
28 }
29 sub sharedname {
30     return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
31                                     "-",
32                                     $_[0]->shlib_version_as_filename(),
33                                     ($config{target} eq "mingw64"
34                                          ? "-x64" : ""));
35 }
36
37 # With Mingw and other DLL producers, there isn't really any "simpler"
38 # shared library name.  However, there is a static import library, so
39 # we return that instead.
40 sub sharedlib_simple {
41     return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
42                                     $_[0]->shlibextimport());
43 }
44
45 1;