This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why configure script says to link this library with LIBADDinsteadof LDADD?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]