If you specify the definitions in your source, there is a risk that the same header file may be included in several source files (translation units), but with different preprocessor definitions, which can lead to violation of the One Definition rule, which is often a pain debugging.
By defining definitions for the entire project, rather than in separate source files, the likelihood of such a violation of a rule of a certain value is minimized.
In addition, if it becomes necessary to add a new definition, you only modify one makefile, not all the source files.
Maxim Egorushkin
source share