Thanks Joost!
Sorry that I may not make myself understood. The point which confuse me is not the function of CPPFLAGS or CFLAGS, the confusion point is that, I think Paul mean variable CXXFLAGS automatically includes variable CPPFLAGS, which I have not found from GNU make manual -- if I correctly understand Paul's points. :-) regards, George --- "Leeuwesteijn,Joost" <[EMAIL PROTECTED]> wrote: > > > but I can not find the relationship between > CXXFLAGS and > > CPPFLAGS (for example, CXXFLAGS includes CPPFLAGS) > -- > > to my surprise, instead I found that CPPFLAGS is > used > > for C (not C++)? Here is the original text from > GNU > > make manual, > > -------------------- > > CXXFLAGS Extra flags to give to the C++ compiler. > > CPPFLAGS Extra flags to give to the C preprocessor > and > > programs that use it (the C and Fortran > compilers). > > -------------------- > > Example of compile commands: > > To compile C++: > $(CXX) $(CPPFLAGS) $(CXXFLAGS) etc. > > To compile C: > $(CC) $(CPPFLAGS) $(CFLAGS) etc. > > CPPFLAGS contains include directories (-I) and > defines (-D), which can be > reused between C++ and C. > > When you need to call the preprocessor (for example > to generate dependencies > automagically), you only need to specify the > $(CPPFLAGS) because you put > them in the separate $(CPPFLAGS) variable. Otherwise > you would have to strip > them from the $(CFLAGS) because it also contains > parameters that the > preprocessor can't handle. > > Hope this helps. > > -- > Joost Leeuwesteijn > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
