2
0

mingw.pm 1.4 KB

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