Scroll to navigation

ExtUtils::Builder::BuildTools::Base(3pm) User Contributed Perl Documentation ExtUtils::Builder::BuildTools::Base(3pm)

NAME

ExtUtils::Builder::BuildTools::Base - A base class for BuildTools implementations.

VERSION

version 0.035

DESCRIPTION

This is a base-class for providers of compiler configuration. It defines the following delegates:

compile($source, $target, %options)

This compiles $source to $target. It takes the following optional arguments:

The type of the final product. This must be one of:
  • executable

    An executable to be run. This is the default.

  • static-library

    A static library to link against.

  • shared-library

    A dynamic library to link against.

  • loadable-object

    A loadable extension. On most platforms this is the same as a dynamic library, but some (Mac) make a distinction between these two.

Note that if you first compile for a static library that will later be linked into a shared library, you need to pick 'shared-library' here.

A list of profile that can be used when compiling and linking. One profile comes with this distribution: '@Perl', which sets up the appropriate things to compile/link with "libperl".
A list of directories to add to the include path, e.g. "['include', '.']".
A hash of preprocessor defines, e.g. "{DEBUG => 1, HAVE_FEATURE => 0 }"
The language to use for compilation. Valid values are "C" or "C++".
The language standard to use, e.g. "c99", "c11".
A list of additional arguments to the compiler.

link(\@sources, $target, %options)

This works the same as with "compile".
This works the same as with "compile".
This works the same as with "compile".
A list of libraries to link to. E.g. "['z']".
A list of directories to find libraries in. E.g. "['/opt/my-app/lib/']".
A list of additional arguments to the linker.

object_file($basename, $dir = undef)

Given a basename this will return the matching object file name.

library_file($basename, $dir = undef)

Given a basename this will return the matching shared library file name.

static_library_file($basename, $dir = undef)

Given a basename this will return the matching static library file name.

loadable_file($basename, $dir = undef)

Given a basename this will return the matching loadable library file name.

executable_file($basename, $dir = undef)

Given a basename this will return the matching executable file name.

AUTHOR

Leon Timmermans <fawaka@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2026-01-01 perl v5.40.1