AI-ML
view release on metacpan or search on metacpan
inc/MyBuilder.pm view on Meta::CPAN
my $self = shift;
my $cbuilder = $self->cbuilder;
my $c_progs = $self->rscan_dir("C", qr/\.c$/);
for my $file (@$c_progs) {
my $object = $file;
$object =~ s/\.c$/.o/;
next if $self->up_to_date($file, $object);
$cbuilder->compile(
object_file => $object,
extra_compiler_flags => $EXTRA_O_FLAGS,
source => $file,
include_dirs => ["."]
);
}
}
sub ACTION_compile_xs {
my $self = shift;
my $cbuilder = $self->cbuilder;
inc/MyBuilder.pm view on Meta::CPAN
filename => $xs->stringify,
prototypes => 0,
output => $xs_c->stringify
);
}
my $xs_o = path("XS", "ML.o");
if (!$self->up_to_date($xs_c, $xs_o)) {
$cbuilder->compile(
source => $xs_c,
extra_compiler_flags => $EXTRA_O_FLAGS,
include_dirs => ["."],
object_file => $xs_o
);
}
my $bs_file = path( $archdir, "ML.bs");
if (!$self->up_to_date($xs_o, $bs_file) ) {
ExtUtils::Mkbootstrap::Mkbootstrap($bs_file);
if (!-f $bs_file) {
$bs_file->touch;
}
}
my $objects = $self->rscan_dir("C", qr/\.o$/);
push @$objects, $xs_o;
my $lib_file = path($archdir, "ML.$Config{dlext}");
if (!$self->up_to_date( $objects, $lib_file )) {
$cbuilder->link(
module_name => 'AI::ML',
extra_linker_flags => $EXTRA_FLAGS,
objects => $objects,
lib_file => $lib_file,
);
}
}
1;
lib/AI/ML.pm view on Meta::CPAN
# ABSTRACT: Perl interface to ML
use strict;
use warnings;
package AI::ML;
use parent 'DynaLoader';
use Math::Lapack;
bootstrap AI::ML;
#sub dl_load_flags { 1 }
1;
( run in 0.524 second using v1.01-cache-2.11-cpan-94b05bcf43c )