automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why configure script says to link this library with LIBADDinstead of


From: Steve M. Robbins
Subject: Re: Why configure script says to link this library with LIBADDinstead of LDADD?
Date: Tue, 29 Apr 2003 08:16:45 -0400
User-agent: Mutt/1.5.4i

On Tue, Apr 29, 2003 at 07:30:37AM -0400, Dale E Martin wrote:
> > Try either of these instead:
> > 
> >   myprogram_LDADD = ../lib/libmynoinstlib.a
> > 
> > Or:
> > 
> >   myprogram_LDADD = $(top_builddir)/lib/libmynoinstlib.a
> 
> I would HIGHLY recommend the second form here, and I'd also highly
> recommend refering to source files using $(top_srcdir)/path/to/source.
> Someday you or someone wanting to use your software will want to use VPATH
> builds and if you use the second style above, it should be possible.

Certainly you need to use $(top_srcdir) to support VPATH.  

But the two _LDADD lines above are equivalent, because top_builddir
will be set to ".." !

The rule is: you can always refer to stuff in the build directory with
relative paths (../blah/whatever), but you need $(srcdir) or
$(top_srcdir) to get to stuff in the source directory.

-S




reply via email to

[Prev in Thread] Current Thread [Next in Thread]