Difference between CPPFLAGS and CXXFLAGS in GNU Make

gnu-makemakefile

What's the difference between CPPFLAGS and CXXFLAGS in GNU Make?

Best Solution

CPPFLAGS is supposed to be for flags for the C PreProcessor; CXXFLAGS is for flags for the C++ compiler.

The default rules in make (on my machine, at any rate) pass CPPFLAGS to just about everything, CFLAGS is only passed when compiling and linking C, and CXXFLAGS is only passed when compiling and linking C++.