%% Barry D Benowitz <[EMAIL PROTECTED]> writes:

  bdb> VPATH =/my/library/path

  bdb> target : target.o -lmylib

  bdb> What happened was it found the library (libmylib.a) generated the
  bdb> full path to it (ie /my/library/path/libmylib.a) and included
  bdb> that.

Yes, this is exactly what the manual says will happen.

  bdb> What I hoped would happen is that it would maintain the -l so
  bdb> that the library would be searched, instead of included. How can
  bdb> I do this?

Any number of ways.  For example:

  LIBS = -lmylib

  VPATH = /my/library/path

  target: target.o $(LIBS)
        $(CC) -o $@ $(filter-out %.a,$^) $(VPATH:%=-L%) $(LIBS)

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

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to