1package platform::Windows;
2
3use strict;
4use warnings;
5use Carp;
6
7use vars qw(@ISA);
8
9require platform::BASE;
10@ISA = qw(platform::BASE);
11
12# Assume someone set @INC right before loading this module
13use configdata;
14
15sub binext              { '.exe' }
16sub dsoext              { '.dll' }
17sub shlibext            { '.dll' }
18sub libext              { '.lib' }
19sub defext              { '.def' }
20sub objext              { '.obj' }
21sub depext              { '.d' }
22sub asmext              { '.asm' }
23
24# Other extra that aren't defined in platform::BASE
25sub resext              { '.res' }
26sub shlibextimport      { '.lib' }
27sub shlibvariant        { $target{shlib_variant} || '' }
28
29sub staticname {
30    # Non-installed libraries are *always* static, and their names remain
31    # the same, except for the mandatory extension
32    my $in_libname = platform::BASE->staticname($_[1]);
33    return $in_libname
34        if $unified_info{attributes}->{libraries}->{$_[1]}->{noinst};
35
36    # To make sure not to clash with an import library, we make the static
37    # variant of our installed libraries get '_static' added to their names.
38    return platform::BASE->staticname($_[1])
39        . ($disabled{shared} ? '' : '_static');
40}
41
42# To mark forward compatibility, we include the OpenSSL major release version
43# number in the installed shared library names.
44(my $sover_filename = $config{shlib_version}) =~ s|\.|_|g;
45sub shlib_version_as_filename {
46    return $sover_filename
47}
48sub sharedname {
49    return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
50                                    "-",
51                                    $_[0]->shlib_version_as_filename(),
52                                    ($_[0]->shlibvariant() // ''));
53}
54
55sub sharedname_import {
56    return platform::BASE::__isshared($_[1]) ? $_[1] : undef;
57}
58
59sub sharedlib_import {
60    return platform::BASE::__concat($_[0]->sharedname_import($_[1]),
61                                    $_[0]->shlibextimport());
62}
63
641;
65