blob: d4786b8fee330213e4d0d087ded9c9f038f5f0fc (
plain)
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
|
#!/usr/bin/perl
use strict;
use warnings;
BEGIN { push @INC, $ENV{SOURCEPATH}; }
use make::configure;
my $out = shift;
my $verbose;
if ($out =~ /^-/) {
$_ = $out;
$out = shift;
$verbose = /v/;
}
my $file = shift;
my $cflags = $ENV{CXXFLAGS};
$cflags =~ s/ -pedantic// if nopedantic($file);
$cflags .= ' ' . getcompilerflags($file);
my $flags;
if ($out =~ /\.so$/) {
$flags = join ' ', $cflags, $ENV{PICLDFLAGS}, getlinkerflags($file);
} else {
$flags = "$cflags -c";
}
my $execstr = "$ENV{RUNCC} $flags -o $out $file";
print "$execstr\n" if $verbose;
exec $execstr;
exit 1;
|