my
$running_on_windows
= $^O eq
'MSWin32'
|| $^O eq
'cygwin'
|| $^O eq
'msys'
;
die
qq(OS unsupported\n)
unless
$running_on_windows
or
$ENV
{WIN32_API_BUILD};
WriteMakefile(
NAME
=>
'Win32::ExeAsDll'
,
VERSION_FROM
=>
'lib/Win32/ExeAsDll.pm'
,
PREREQ_PM
=> {},
TEST_REQUIRES
=> {
'Win32::API'
=> 0.84},
ABSTRACT_FROM
=>
'lib/Win32/ExeAsDll.pm'
,
AUTHOR
=>
'Daniel Dragan <bulkdd@cpan.org>'
,
LICENSE
=>
'perl'
,
PL_FILES
=> {},
clean
=> {
FILES
=>
"*.bak *.obj *.o *.pdb tmp*"
}
);
sub
cflags {
my
(
$self
) =
shift
;
my
$dlib
=
$self
->SUPER::cflags(
@_
);
my
$pos
=
index
(
$dlib
,
'CCFLAGS = '
,0);
die
"bad CCFLAGS match"
if
$pos
== -1;
my
$len
=
$pos
+
length
(
'CCFLAGS = '
);
$dlib
=
substr
(
$dlib
, 0,
$len
)
.
substr
(
$dlib
,
$len
,
length
(
$dlib
)-
$len
);
return
$dlib
;
}