%% Lin George <[EMAIL PROTECTED]> writes:

  lg> A great answer! I often use -I -D -l -L to
  lg> compile/build program/shared library. Do you have any
  lg> comments or suggestions about whether I should add -I
  lg> (-D, -l and -L) to CXXFLAGS or CPPFLAGS?

  lg> What about other options -Wall, -Wl, ... etc.

Look in the documentation for your C preprocessor.  Any flag that
appears in that documentation should go in CPPFLAGS.

Other flags belong somewhere else.

Typically, that means -I, -D, -U (not used much) would appear in
CPPFLAGS, and just about everything else would appear somewhere else.

-l, -L, and -Wl,... are _LINKER_ flags.  Obviously not appropriate for
the preprocessor.  In fact, you should put these into LDFLAGS or
similar.

-Wall is a compiler flag.  CFLAGS and/or CXXFLAGS.

Etc.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to