Possible Duplicate:
How to include header file through makefile
I am using gcc for compiling my code. I have a few make files also. Can I tell the compiler to include a particular header file to be automatically included in the all CPP files.
How can I do this?
Add the appropriate preprocessor option for
gccto yourMakefile-s and have acommon_feature_header.hheader file defining these.If you just want to define some preprocessor flags, you don’t need a
common_feature_header.hfile, but simply add into yourMakefilethe following definitionSee also this answer.
P.S. You may want to use remake (notably with its
-xoption) to debug yourMakefile.