perl functions in a perl code fragment enclosed with "{-" and "-}".
They are all expected to return a string with the lines they produce.
- src2dep - function that produces build file lines to get the
- dependencies for an object file into a dependency
- file.
-
- It's called like this:
-
- src2dep(obj => "PATH/TO/objectfile",
- srcs => [ "PATH/TO/sourcefile", ... ],
- deps => [ "dep1", ... ],
- incs => [ "INCL/PATH", ... ]);
-
- 'obj' has the dependent object file as well as
- object file the dependencies are for; it's *without*
- extension, src2dep() is expected to add that.
- 'srcs' has the list of source files to build the
- object file, with the first item being the source
- file that directly corresponds to the object file.
- 'deps' is a list of explicit dependencies. 'incs'
- is a list of include file directories.
-
src2obj - function that produces build file lines to build an
object file from source files and associated data.
src2obj(obj => "PATH/TO/objectfile",
srcs => [ "PATH/TO/sourcefile", ... ],
deps => [ "dep1", ... ],
- incs => [ "INCL/PATH", ... ]);
+ incs => [ "INCL/PATH", ... ]
+ intent => one of "lib", "dso", "bin" );
'obj' has the intended object file *without*
extension, src2obj() is expected to add that.
object file, with the first item being the source
file that directly corresponds to the object file.
'deps' is a list of explicit dependencies. 'incs'
- is a list of include file directories.
+ is a list of include file directories. Finally,
+ 'intent' indicates what this object file is going
+ to be used for.
obj2lib - function that produces build file lines to build a
static library file ("libfoo.a" in Unix terms) from
corresponding static library as input to make the
shared library, or the list of object files.
- obj2dynlib - function that produces build file lines to build a
- dynamically loadable library file ("libfoo.so" on
- Unix) from object files.
+ obj2dso - function that produces build file lines to build a
+ dynamic shared object file from object files.
called like this:
- obj2dynlib(lib => "PATH/TO/libfile",
- objs => [ "PATH/TO/objectfile", ... ],
- deps => [ "PATH/TO/otherlibfile",
- ... ]);
+ obj2dso(lib => "PATH/TO/libfile",
+ objs => [ "PATH/TO/objectfile", ... ],
+ deps => [ "PATH/TO/otherlibfile",
+ ... ]);
This is almost the same as libobj2shlib, but the
intent is to build a shareable library that can be