C preprocessor versus C compiler

If I tell the C preprocessor to # include the file and use CPPFLAGS to find the file I need, then the file is already included, right? What, if any, tells the C compiler about the same include directory with CFLAGS?

+3
source share
1 answer

I do not think it will be useful.

implicit rules make indicates that it is CFLAGSused only when compiling C programs (from .c to .o). The value is CPPFLAGSalso added to the compiler command line.

CPPFLAGS also used in the following rules:

  • Compilation of programs in C ++
  • Compiling Fortran and Ratfor
  • Preprocessing Fortran and Ratfor.
  • Lint C, Yacc Lex

CPPFLAGS , CFLAGS, , -I CFLAGS, CPPFLAGS.

, Makefile , CFLAGS , CPPFLAGS, .

+2

Source: https://habr.com/ru/post/1743774/


All Articles