NAME
SPVM::Builder::Util - Build Utilities
Create defaulgt build config
use SPVM::Builder::Util;
my $build_config = SPVM::Builder::Util::new_default_build_config();
$build_config->set_optimize('-O3');
Add Build shared object make rule in Makefile.PL
sub MY::postamble {
my $make_rule = '';
# Native compile make rule
$make_rule .= SPVM::Builder::Util::create_make_rule_native('Foo');
# Precompile make rule
$make_rule .= SPVM::Builder::Util::create_make_rule_precompile('Foo');
return $make_rule;
}
DESCRIPTION
SPVM::Builder::Util is building utilities.
FUNCTIONS
new_default_build_config
my $build_config = SPVM::Builder::Util::new_default_build_config;
Create defaulgt build config. This is SPVM::Builder::Config object.
This function is used in native config file.
# Foo.spvm.bconf
use strict;
use warnings;
use SPVM::Builder::Util;
my $build_config = SPVM::Builder::Util::new_default_build_config();
$build_config->set_config(optimize => '-O2');
$build_config;
create_make_rule_native
Create native compile make rule.
This is used in Makefile.PL of your distributed module.
# Makefile.PL
sub MY::postamble {
my $make_rule = '';
# Native compile make rule
$make_rule .= SPVM::Builder::Util::create_make_rule_native('Foo');
return $make_rule;
}
create_make_rule_precompile
Create precompile make rule.
This is used in Makefile.PL of your distributed module.
sub MY::postamble {
my $make_rule = '';
# Precompile make rule
$make_rule .= SPVM::Builder::Util::create_make_rule_precompile('Foo');
return $make_rule;
}