Added bear command for LSP support
Changed to MIT license
Better intro.
This project shows an example Makefile project with nice functionalities built in.
Make cannot know if a C target object depends on an header file. Typically the target depends only on the corresponding source, as only the compiler knows which header files are included.
Here this knowledge is added to Makefile, via GCC "-MM" functionality.
Only the list of SOURCES
is needed, everything else is automatic.
One .d file per each is created from each source file, containing the list of headers as a target dependency for the object. The .d file depends itself on the list of source inputs, as an include may be added in the code making it obsolete.
It is enhanced with the Makefile.version
file that provides
GIT_COMMIT_HASH
variable to use, for example, in preprocessors #defineno-uncommitted-changes
target to append as a dependency to all
targets that need everything to be committed before building themIf the release program
no-uncommitted-changes
as a dependencyone can exactly match each release executable with a commit.
This hopefully makes support easier, as developers can see the exact code that is run in the user machine.