%% "Fred J." <[EMAIL PROTECTED]> writes:

  fj> I think I have a wrong syntax for the flags, I need to
  fj> compile my c++ code for gdb debugging, that is include
  fj> the (-g) flage. is this correct?

  fj> proj1: $(OBJS)
  fj> <TAB> $(CXX) -og $@ $(OBJS)

This question isn't about make, actually: it's about your compiler.  The
flags that your compiler accepts are something you'll have to check the
docs for the compiler to discover.


However, in a traditional UNIX-type C compiler the -o flag takes the
output file as an argument.  So, what you have above:

    -og $@ $(OBJS)

is wrong: it means "link a bunch of files including $@ and $(OBJS), then
write the output to the file 'g'".

You need to write it like this:

    -g -o $@ $(OBJS)

-- 
-------------------------------------------------------------------------------
 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