xref: /freebsd-src/crypto/openssl/Configurations/platform/mingw.pm (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1*e0c4386eSCy Schubertpackage platform::mingw;
2*e0c4386eSCy Schubert
3*e0c4386eSCy Schubertuse strict;
4*e0c4386eSCy Schubertuse warnings;
5*e0c4386eSCy Schubertuse Carp;
6*e0c4386eSCy Schubert
7*e0c4386eSCy Schubertuse vars qw(@ISA);
8*e0c4386eSCy Schubert
9*e0c4386eSCy Schubertrequire platform::Unix;
10*e0c4386eSCy Schubert@ISA = qw(platform::Unix);
11*e0c4386eSCy Schubert
12*e0c4386eSCy Schubert# Assume someone set @INC right before loading this module
13*e0c4386eSCy Schubertuse configdata;
14*e0c4386eSCy Schubert
15*e0c4386eSCy Schubertsub binext              { '.exe' }
16*e0c4386eSCy Schubertsub objext              { '.obj' }
17*e0c4386eSCy Schubertsub libext              { '.a' }
18*e0c4386eSCy Schubertsub dsoext              { '.dll' }
19*e0c4386eSCy Schubertsub defext              { '.def' }
20*e0c4386eSCy Schubert
21*e0c4386eSCy Schubert# Other extra that aren't defined in platform::BASE
22*e0c4386eSCy Schubertsub resext              { '.res.obj' }
23*e0c4386eSCy Schubertsub shlibext            { '.dll' }
24*e0c4386eSCy Schubertsub shlibextimport      { $target{shared_import_extension} || '.dll.a' }
25*e0c4386eSCy Schubertsub shlibextsimple      { undef }
26*e0c4386eSCy Schubertsub makedepcmd          { $disabled{makedepend} ? undef : $config{makedepcmd} }
27*e0c4386eSCy Schubert
28*e0c4386eSCy Schubert(my $sover_filename = $config{shlib_version}) =~ s|\.|_|g;
29*e0c4386eSCy Schubertsub shlib_version_as_filename {
30*e0c4386eSCy Schubert    return $sover_filename;
31*e0c4386eSCy Schubert}
32*e0c4386eSCy Schubertsub sharedname {
33*e0c4386eSCy Schubert    return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
34*e0c4386eSCy Schubert                                    "-",
35*e0c4386eSCy Schubert                                    $_[0]->shlib_version_as_filename(),
36*e0c4386eSCy Schubert                                    ($config{target} eq "mingw64"
37*e0c4386eSCy Schubert                                         ? "-x64" : ""));
38*e0c4386eSCy Schubert}
39*e0c4386eSCy Schubert
40*e0c4386eSCy Schubert# With Mingw and other DLL producers, there isn't any "simpler" shared
41*e0c4386eSCy Schubert# library name.  However, there is a static import library.
42*e0c4386eSCy Schubertsub sharedlib_simple {
43*e0c4386eSCy Schubert    return undef;
44*e0c4386eSCy Schubert}
45*e0c4386eSCy Schubert
46*e0c4386eSCy Schubertsub sharedlib_import {
47*e0c4386eSCy Schubert    return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
48*e0c4386eSCy Schubert                                    $_[0]->shlibextimport());
49*e0c4386eSCy Schubert}
50*e0c4386eSCy Schubert
51*e0c4386eSCy Schubert1;
52