1*e0c4386eSCy Schubertpackage platform::Windows; 2*e0c4386eSCy Schubert 3*e0c4386eSCy Schubertuse strict; 4*e0c4386eSCy Schubertuse warnings; 5*e0c4386eSCy Schubertuse Carp; 6*e0c4386eSCy Schubert 7*e0c4386eSCy Schubertuse vars qw(@ISA); 8*e0c4386eSCy Schubert 9*e0c4386eSCy Schubertrequire platform::BASE; 10*e0c4386eSCy Schubert@ISA = qw(platform::BASE); 11*e0c4386eSCy Schubert 12*e0c4386eSCy Schubert# Assume someone set @INC right before loading this module 13*e0c4386eSCy Schubertuse configdata; 14*e0c4386eSCy Schubert 15*e0c4386eSCy Schubertsub binext { '.exe' } 16*e0c4386eSCy Schubertsub dsoext { '.dll' } 17*e0c4386eSCy Schubertsub shlibext { '.dll' } 18*e0c4386eSCy Schubertsub libext { '.lib' } 19*e0c4386eSCy Schubertsub defext { '.def' } 20*e0c4386eSCy Schubertsub objext { '.obj' } 21*e0c4386eSCy Schubertsub depext { '.d' } 22*e0c4386eSCy Schubertsub asmext { '.asm' } 23*e0c4386eSCy Schubert 24*e0c4386eSCy Schubert# Other extra that aren't defined in platform::BASE 25*e0c4386eSCy Schubertsub resext { '.res' } 26*e0c4386eSCy Schubertsub shlibextimport { '.lib' } 27*e0c4386eSCy Schubertsub shlibvariant { $target{shlib_variant} || '' } 28*e0c4386eSCy Schubert 29*e0c4386eSCy Schubertsub staticname { 30*e0c4386eSCy Schubert # Non-installed libraries are *always* static, and their names remain 31*e0c4386eSCy Schubert # the same, except for the mandatory extension 32*e0c4386eSCy Schubert my $in_libname = platform::BASE->staticname($_[1]); 33*e0c4386eSCy Schubert return $in_libname 34*e0c4386eSCy Schubert if $unified_info{attributes}->{libraries}->{$_[1]}->{noinst}; 35*e0c4386eSCy Schubert 36*e0c4386eSCy Schubert # To make sure not to clash with an import library, we make the static 37*e0c4386eSCy Schubert # variant of our installed libraries get '_static' added to their names. 38*e0c4386eSCy Schubert return platform::BASE->staticname($_[1]) 39*e0c4386eSCy Schubert . ($disabled{shared} ? '' : '_static'); 40*e0c4386eSCy Schubert} 41*e0c4386eSCy Schubert 42*e0c4386eSCy Schubert# To mark forward compatibility, we include the OpenSSL major release version 43*e0c4386eSCy Schubert# number in the installed shared library names. 44*e0c4386eSCy Schubert(my $sover_filename = $config{shlib_version}) =~ s|\.|_|g; 45*e0c4386eSCy Schubertsub shlib_version_as_filename { 46*e0c4386eSCy Schubert return $sover_filename 47*e0c4386eSCy Schubert} 48*e0c4386eSCy Schubertsub sharedname { 49*e0c4386eSCy Schubert return platform::BASE::__concat(platform::BASE->sharedname($_[1]), 50*e0c4386eSCy Schubert "-", 51*e0c4386eSCy Schubert $_[0]->shlib_version_as_filename(), 52*e0c4386eSCy Schubert ($_[0]->shlibvariant() // '')); 53*e0c4386eSCy Schubert} 54*e0c4386eSCy Schubert 55*e0c4386eSCy Schubertsub sharedname_import { 56*e0c4386eSCy Schubert return platform::BASE::__isshared($_[1]) ? $_[1] : undef; 57*e0c4386eSCy Schubert} 58*e0c4386eSCy Schubert 59*e0c4386eSCy Schubertsub sharedlib_import { 60*e0c4386eSCy Schubert return platform::BASE::__concat($_[0]->sharedname_import($_[1]), 61*e0c4386eSCy Schubert $_[0]->shlibextimport()); 62*e0c4386eSCy Schubert} 63*e0c4386eSCy Schubert 64*e0c4386eSCy Schubert1; 65