xref: /openssl/Configurations/platform/VMS.pm (revision a1181fbd)
1package platform::VMS;
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
15# VMS has a cultural standard where all installed libraries are prefixed.
16# For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
17# conversation with VSI, Tuesday January 26 2016)
18sub osslprefix          { 'OSSL$' }
19
20sub binext              { '.EXE' }
21sub dsoext              { '.EXE' }
22sub shlibext            { '.EXE' }
23sub libext              { '.OLB' }
24sub defext              { '.OPT' }
25sub objext              { '.OBJ' }
26sub depext              { '.D' }
27sub asmext              { '.ASM' }
28
29# Other extra that aren't defined in platform::BASE
30sub shlibvariant        { $target{shlib_variant} || '' }
31
32sub optext              { '.OPT' }
33sub optname             { return $_[1] }
34sub opt                 { return $_[0]->optname($_[1]) . $_[0]->optext() }
35
36# Other projects include the pointer size in the name of installed libraries,
37# so we do too.
38sub staticname {
39    # Non-installed libraries are *always* static, and their names remain
40    # the same, except for the mandatory extension
41    my $in_libname = platform::BASE->staticname($_[1]);
42    return $in_libname
43        if $unified_info{attributes}->{libraries}->{$_[1]}->{noinst};
44
45    return platform::BASE::__concat($_[0]->osslprefix(),
46                                    platform::BASE->staticname($_[1]),
47                                    $target{pointer_size});
48}
49
50# To enable installation of multiple major OpenSSL releases, we include the
51# version number in installed shared library names.
52my $sover_filename =
53    join('', map { sprintf "%02d", $_ } split(m|\.|, $config{shlib_version}));
54sub shlib_version_as_filename {
55    return $sover_filename;
56}
57sub sharedname {
58    return platform::BASE::__concat($_[0]->osslprefix(),
59                                    platform::BASE->sharedname($_[1]),
60                                    $_[0]->shlib_version_as_filename(),
61                                    ($_[0]->shlibvariant() // ''),
62                                    "_shr$target{pointer_size}");
63}
64
651;
66