|
Loading...
|
help-make@gnu.org
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Is my Makefile okay? Michael Ludwig Wed Feb 01 04:06:32 2012
Paul Smith schrieb am 08.01.2012 um 22:31 (-0500): > On Sun, 2012-01-08 at 22:18 -0500, Jeffrey Walton wrote: > > On Sun, Jan 8, 2012 at 9:36 PM, Pelias <[EMAIL PROTECTED]> wrote: > > > One thing I'm not sure whether to append -DDEBUG/-DNDEBUG to > > > CPPFLAGS or to CFLAGS. > > If your make file is using both C and C++ files (and using implicit > > rules), you will want to apply DEBUG/NDEBUG to both. Otherwise, use > > CFLAGS for C and CPPFLAGS for C++. > > It's a common misconception, but CPPFLAGS is not for C++. It's an > unfortunate overlap that "CPP" is appropriate for both "C plus plus" > and "C pre-processor", but the latter was common before C++ was even > invented, and make dates back to those earlier days as well. And to make it more confusing, with Microsoft NMAKE, CPPFLAGS and CXXFLAGS are both for C++, or more exactly, CPP and CPPFLAGS are for C++ files ending in ".cpp" while CXX and CXXFLAGS are for C++ files ending in ".cxx". Though this be madness, yet there is method in 't. > It breaks down like this: > > CFLAGS: Compiler flags for the C compiler > CXXFLAGS: Compiler flags for the C++ compiler > CPPFLAGS: Preprocessor flags for both C and C++ preprocessor. -- Michael Ludwig _______________________________________________ Help-make mailing list [EMAIL PROTECTED] https://lists.gnu.org/mailman/listinfo/help-make
- Is my Makefile okay? Pelias 2012/02/01
- Re: Is my Makefile okay? Jeffrey Walton 2012/02/01
- Re: Is my Makefile okay? Philip Guenther 2012/02/01
- Re: Is my Makefile okay? Jeffrey Walton 2012/02/01
- Re: Is my Makefile okay? Paul Smith 2012/02/01
- Re: Is my Makefile okay? Michael Ludwig 2012/02/01 <=
- Re: Is my Makefile okay? Jeffrey Walton 2012/02/01