Feature: Fake build settings now supports compiling only object files.
I've observed that many programs like to compile each source file separately by passing "-c" to GCC.
Then the linking is done separately.
I believe unit tests may benefit from compiling individual object files for cases when mocking needs to be performed only for select functions.
With an upcoming stable release planned, I felt that now is the time to get this in.
Due to limitations of the compilers, only a single object file may be generated at a time.
Multiple generated object files may be combined into either a library or a program.
Object file generation is shared vs static aware.
Custom defines and flags may be specified for building objects.
It is now possible to compile different objects files for the generated library and for the generated program.
These are improvements to the build settings build process.
The make build process is still available for more advanced compiling.
An example project, called "example-objects", is provided to demostrate how to utilize the build settings and a fakefile to compile multiple objects separately and then combine them into a single program.
Additional fixes and improvement were necessary to properly complete this feature.
Summary of additional fixes and improvements:
- Improve default handling behavior in both fake and bootstrap.sh.
- Provide more defaults, such as having "compiler" default to "gcc".
- Massive cleanup of the bootstrap.sh (bootstrap.sh is now much closer to matching the functionality of the fake build settings).
- Update documentation.
- Add an error message for when an unknown build mode is passed to the boostrap-example.sh script.
- Fix bug in f_path_directory_cleanup() where the termnating NULL is being included in the count.