perl/ext/Win32CORE/Makefile.PL

19 lines
461 B
Makefile
Raw Normal View History

2022-05-14 02:40:32 +08:00
use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'Win32CORE',
'VERSION_FROM' => 'Win32CORE.pm',
);
# undef USEIMPORTLIB for static compilation
sub MY::cflags {
package MY; # so that "SUPER" works right
my ($self, $libperl)=@_;
return '' unless $self->needs_linking();
my $base = $self->SUPER::cflags($libperl);
if ($self->{LINKTYPE} eq 'static') {
$base =~ s/CCFLAGS =(.*)$/CCFLAGS =\1 -UUSEIMPORTLIB /m;
}
return $base;
}