> From: automake-bounces+jeff.daily=pnl....@gnu.org 
> [automake-bounces+jeff.daily=pnl....@gnu.org] On Behalf Of Ralf Hemmecke 
> [hemme...@gmail.com]
> Sent: Friday, February 11, 2011 11:18 AM
> To: automake@gnu.org
> Subject: Test support for automake
> 
> I have a non-recursive Makefile.am with which I build a library foo. I
> list all my tests (quite a lot) in check_PROGRAMS.
> 
> All those tests should (of course) get libfoo.la as LDADD, but how
> exactly do I do that _without_ doing a per-target *_LDADD specification.
> Per target specification sounds like a lot of redundancy since all my
> _LDADD specification would just be libfoo.la.
> I'd like to add libfoo.la in only _one_ place.
> 
> Ralf

Use the LDADD variable.  It's similar to the AM_* variables e.g. AM_LDFLAGS, 
AM_CPPFLAGS.  All programs use LDADD for linking unless it is overridden by a 
maude_LDADD per-target variable.

See http://sources.redhat.com/automake/automake.html#Linking

Jeff



Reply via email to