What's the difference between CPPFLAGS and CXXFLAGS in GNU Make?
+4
A:
By default, CPPFLAGS
will be given to the C preprocessor, while CXXFLAGS
will be given to the C++ compiler. You could have easily found this out yourself if you had taken a look at the manual (see Implicit Variables).
Christoph
2009-01-30 14:16:03
I was staring right at the manual when I had this exact same question. I typed CPPFLAGS into stackoverflow and got the answer much quicker than searching the manual.
Dan Hook
2009-08-11 18:00:58
+13
A:
CPPFLAGS
is supposed to be for flags for the C Pre**P**rocessor; 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++.
Kieron
2009-01-30 14:23:40