-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
55 lines (43 loc) · 1.35 KB
/
Makefile.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use strict;
use warnings;
use ExtUtils::MakeMaker;
WriteMakefile(
PREREQ_FATA => 1,
PREREQ_PM => {
'ExtUtils::PkgConfig' => 0,
},
) unless eval q[use ExtUtils::PkgConfig; 1];
my %pkginfo = ExtUtils::PkgConfig->find('webkit-1.0');
WriteMakefile(
NAME => 'JavaScript::JSCore',
VERSION_FROM => 'lib/JavaScript/JSCore.pm',
ABSTRACT_FROM => 'lib/JavaScript/JSCore.pm',
XSPROTOARG => '-noprototypes',
INC => '-Wall -Iperl_glue '. $pkginfo{cflags},
LIBS => $pkginfo{libs},
do {
my (@clean, @OBJECT, %XS);
for my $xs (<xs/*.xs>) {
(my $c = $xs) =~ s/\.xs/.c/i;
(my $o = $xs) =~ s/\.xs/\$(OBJ_EXT)/i;
$XS{$xs} = $c;
push @OBJECT, $o;
push @clean, $o;
}
for my $c (<perl_glue/*.c>) {
(my $o = $c) =~ s/\.c/\$(OBJ_EXT)/i;
push @OBJECT, $o;
push @clean, $o;
}
clean => { FILES => join(q[ ], @clean) },
OBJECT => join(q[ ], @OBJECT),
XS => \%XS,
},
);
package MY;
sub const_cccmd {
my $inherited = shift->SUPER::const_cccmd(@_);
return '' unless $inherited;
$inherited .= ' -o $@';
return $inherited;
}