If I tell the C preprocessor to #include a file and use CPPFLAGS to help find the needed file, then the file is included already, right? What, if any, use is telling the C compiler about the same include directory with CFLAGS?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think there is any use.
The implicit make rules indicates that
CFLAGSis only used when compiling C programs (from .c to .o). The value ofCPPFLAGSis also added to the compiler command line.CPPFLAGSis also used in the following rules:Since
CPPFLAGSis used in every case whereCFLAGSis used, there seems to be no point in adding-Idirectives toCFLAGSthat are already inCPPFLAGS.Of course, if your Makefile has custom rules that pass
CFLAGSto the compiler, but omitCPPFLAGS, it’s a different story.