added openssl app 'kdf' and 'mac' to the NEWS and CHANGES docs
[openssl.git] / Configurations / platform / Unix.pm
1 package platform::Unix;
2
3 use strict;
4 use warnings;
5 use Carp;
6
7 use vars qw(@ISA);
8
9 require platform::BASE;
10 @ISA = qw(platform::BASE);
11
12 # Assume someone set @INC right before loading this module
13 use configdata;
14
15 sub binext              { $target{exe_extension} || '' }
16 sub dsoext              { $target{dso_extension} || '.so' }
17 # Because these are also used in scripts and not just Makefile, we must
18 # convert $(SHLIB_VERSION_NUMBER) to the actual number.
19 sub shlibext            { (my $x = $target{shared_extension}
20                                || '.so.$(SHLIB_VERSION_NUMBER)')
21                               =~ s|\.\$\(SHLIB_VERSION_NUMBER\)
22                                   |.$config{shlib_version}|x;
23                           $x; }
24 sub libext              { $target{lib_extension} || '.a' }
25 sub defext              { $target{def_extension} || '.ld' }
26 sub objext              { $target{obj_extension} || '.o' }
27 sub depext              { $target{obj_extension} || '.d' }
28
29 # Other extra that aren't defined in platform::BASE
30 sub shlibextsimple      { (my $x = $target{shared_extension} || '.so')
31                               =~ s|\.\$\(SHLIB_VERSION_NUMBER\)||;
32                           $x; }
33 sub shlibvariant        { $target{shlib_variant} || "" }
34 sub makedepprog         { $disabled{makedepend} ? undef : $config{makedepprog} }
35
36 # No conversion of assembler extension on Unix
37 sub asm {
38     return $_[1];
39 }
40
41 # At some point, we might decide that static libraries are called something
42 # other than the default...
43 sub staticname {
44     # Non-installed libraries are *always* static, and their names remain
45     # the same, except for the mandatory extension
46     my $in_libname = platform::BASE->staticname($_[1]);
47     return $in_libname if $unified_info{attributes}->{$_[1]}->{noinst};
48
49     # We currently return the same name anyway...  but we might choose to
50     # append '_static' or '_a' some time in the future.
51     return platform::BASE->staticname($_[1]);
52 }
53
54 sub sharedname {
55     return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
56                                     ($_[0]->shlibvariant() // ''));
57 }
58
59 sub sharedname_simple {
60     return platform::BASE::__isshared($_[1]) ? $_[1] : undef;
61 }
62
63 sub sharedlib_simple {
64     return platform::BASE::__concat($_[0]->sharedname_simple($_[1]),
65                                     $_[0]->shlibextsimple());
66 }
67
68 1;