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