mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
fix
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@643 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
66
pl/utils.pl
66
pl/utils.pl
@@ -1,73 +1,75 @@
|
||||
# $Id$
|
||||
sub add_incdir {
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
|
||||
$incdir = "${incdir} ${input}";
|
||||
$incdir = "${incdir} ${input}";
|
||||
}
|
||||
|
||||
sub add_cflags {
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
|
||||
$cflags = "${cflags} ${input}";
|
||||
$cflags = "${cflags} ${input}";
|
||||
}
|
||||
|
||||
sub add_libdir {
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
|
||||
$libdir = "${libdir} ${input}";
|
||||
$libdir = "${libdir} ${input}";
|
||||
}
|
||||
|
||||
sub add_ldflags {
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
|
||||
$ldflags = "${ldflags} ${input}";
|
||||
$ldflags = "${ldflags} ${input}";
|
||||
}
|
||||
|
||||
sub add_libs {
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
my $input = $_[0];
|
||||
$input =~ s/\r?\n/ /g;
|
||||
|
||||
$libs = "${libs} ${input}";
|
||||
$libs = "${libs} ${input}";
|
||||
}
|
||||
|
||||
sub new_example {
|
||||
if(@_ == 2){
|
||||
$examples_libs{"$_[0]${executable_suffix}"} = $_[1];
|
||||
}
|
||||
push(@examples_targets, "${_[0]}${executable_suffix}");
|
||||
if (@_ == 2) {
|
||||
$examples_libs{"$_[0]${executable_suffix}"} = $_[1];
|
||||
}
|
||||
push(@examples_targets, "${_[0]}${executable_suffix}");
|
||||
}
|
||||
|
||||
sub new_object {
|
||||
my @l = glob($_[0]);
|
||||
foreach my $e (@l){
|
||||
$e =~ s/\.c$/$object_suffix/;
|
||||
push(@library_targets, $e);
|
||||
}
|
||||
my @l = glob($_[0]);
|
||||
foreach my $e (@l) {
|
||||
$e =~ s/\.c$/$object_suffix/;
|
||||
push(@library_targets, $e);
|
||||
}
|
||||
}
|
||||
|
||||
sub use_backend {
|
||||
$backend = $_[0];
|
||||
$backend = $_[0];
|
||||
}
|
||||
|
||||
our %params = ();
|
||||
|
||||
sub param_set {
|
||||
$params{$_[0]} = $_[1];
|
||||
$params{ $_[0] } = $_[1];
|
||||
}
|
||||
|
||||
sub param_get {
|
||||
if(not(defined($params{$_[0]}))){
|
||||
return 0;
|
||||
}else{
|
||||
return $params{$_[0]};
|
||||
}
|
||||
if (not(defined($params{ $_[0] }))) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
return $params{ $_[0] };
|
||||
}
|
||||
}
|
||||
|
||||
sub param_list {
|
||||
return sort(keys(%params));
|
||||
return sort(keys(%params));
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user