blob: 3a40457f2932a93b89171917cc274beefe9151e0 (
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, '..'; }
use make::configure;
my $file = shift;
my $verbose;
if ($file =~ /^-/) {
$_ = $file;
$file = shift;
$verbose = /v/;
}
my $out = 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;
|