5
chmod(0666,'Makefile');
10
if ($Config{'cc'} =~ /gcc/ && $Config{'make'} =~ /dmake/)
12
# This is the StrawberryPerl configuration
13
$file = 'scripts/makefile.gcc';
15
elsif ($Config{'cc'} =~ /gcc/)
17
$file = 'scripts/makefile.mingw';
19
elsif ($Config{'cc'} =~ /bcc/)
21
$file = 'scripts/makefile.bc32';
25
$file = 'scripts/makefile.vcwin32';
26
warn "Assuming ".$Config{'cc'}." is visual C of some kind\n";
31
if ($Config{'gccversion'})
33
$file = 'scripts/makefile.gcc';
37
if (($Config{archname} =~ /^IA64\./) && ($^O eq "hpux"))
39
$file = 'scripts/makefile.hp64';
43
$file = 'scripts/makefile.std';
44
my %makefiles = map { /makefile\.(.*)/ && ($1 => $_) } glob('scripts/makefile.*');
45
foreach my $arch (sort keys %makefiles)
49
$file = $makefiles{$arch};
54
warn "Using $file for $^O\nIf make fails read PNG/libpng/INSTALL\n";
57
copy($file,"Makefile")
58
|| die "Cannot copy $file to Makefile:$!";
60
if ($^O eq 'darwin' || $Config{'archname'} =~ m{^amd64-freebsd($|-.*)})
62
system(sh => "./configure");
63
open my $fh, ">> Makefile" or die "Can't write to Makefile: $!";
67
cp .libs/libpng.a libpng.a
72
# Empty rule needed since ExtUtils::MakeMaker 6.36 (ca.)