Name
SPVM::Builder::Util::API - Defining Public Functions of SPVM::Builder::Util
Description
The SPVM::Builder::Util::API class defines the public functions of the SPVM::Builder::Util class.
Usage
my $native_make_rule = SPVM::Builder::Util::API::create_make_rule_native('Foo');
my $precompile_make_rule = SPVM::Builder::Util::API::create_make_rule_precompile('Foo');
Functions
create_make_rule_native
my $make_rule = SPVM::Builder::Util::API::create_make_rule_native($basic_type_name);
Creates a rule written by make
commands to generate a dynamic library for the class $basic_type_name that contains native methods, and returns the rule.
Examples:
# Makefile.PL
sub MY::postamble {
my $make_rule = '';
# Native compile make rule
$make_rule .= SPVM::Builder::Util::API::create_make_rule_native('Foo');
return $make_rule;
}
create_make_rule_precompile
my $make_rule = SPVM::Builder::Util::API::create_make_rule_precompile($basic_type_name);
Creates a rule written by make
commands to generate a dynamic library for the class $basic_type_name that contains precompiled methods, and returns the rule.
Examples:
# Makefile.PL
sub MY::postamble {
my $make_rule = '';
# Precompile make rule
$make_rule .= SPVM::Builder::Util::API::create_make_rule_precompile('Foo');
return $make_rule;
}
create_default_config
my $config = SPVM::Builder::Util::API::create_default_config();
Creates a default config, and returns it. The config is a SPVM::Builder::Config object.
The current implementation is the following one.
my $config = SPVM::Builder::Config->new_gnu99(file_optional => 1);
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License