mirror of
https://github.com/openssl/openssl.git
synced 2024-12-21 06:09:35 +08:00
2e535eb50a
Previously, we had dependency making pretty much hard coded in the build file templates, with a bit of an exception for Unix family platforms, where we had different cases depending on what dependency making program was found. With the Embarcadero C++ builder, a separate scheme appeared, with a different logic. This change merges the two, and introduces two config target attributes: makedepcmd The program to use, where this is relevant. This replaces the earlier configuration attribute 'makedepprog'. makedep_scheme This is a keyword that can be used by build files templates to produce different sorts of commands, but most importantly, to pass as argument to util/add-depend.pl, which uses this keyword as a "producer" for the dependency lines. If the config target doesn't define the 'makedep_scheme' attribute, Configure tries to figure it out by looking for GCC compatible compilers or for the 'makedepend' command. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/15006)
52 lines
1.5 KiB
Perl
52 lines
1.5 KiB
Perl
package platform::mingw;
|
|
|
|
use strict;
|
|
use warnings;
|
|
use Carp;
|
|
|
|
use vars qw(@ISA);
|
|
|
|
require platform::Unix;
|
|
@ISA = qw(platform::Unix);
|
|
|
|
# Assume someone set @INC right before loading this module
|
|
use configdata;
|
|
|
|
sub binext { '.exe' }
|
|
sub objext { '.obj' }
|
|
sub libext { '.a' }
|
|
sub dsoext { '.dll' }
|
|
sub defext { '.def' }
|
|
|
|
# Other extra that aren't defined in platform::BASE
|
|
sub resext { '.res.obj' }
|
|
sub shlibext { '.dll' }
|
|
sub shlibextimport { $target{shared_import_extension} || '.dll.a' }
|
|
sub shlibextsimple { undef }
|
|
sub makedepcmd { $disabled{makedepend} ? undef : $config{makedepcmd} }
|
|
|
|
(my $sover_filename = $config{shlib_version}) =~ s|\.|_|g;
|
|
sub shlib_version_as_filename {
|
|
return $sover_filename;
|
|
}
|
|
sub sharedname {
|
|
return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
|
|
"-",
|
|
$_[0]->shlib_version_as_filename(),
|
|
($config{target} eq "mingw64"
|
|
? "-x64" : ""));
|
|
}
|
|
|
|
# With Mingw and other DLL producers, there isn't any "simpler" shared
|
|
# library name. However, there is a static import library.
|
|
sub sharedlib_simple {
|
|
return undef;
|
|
}
|
|
|
|
sub sharedlib_import {
|
|
return platform::BASE::__concat(platform::BASE->sharedname($_[1]),
|
|
$_[0]->shlibextimport());
|
|
}
|
|
|
|
1;
|