[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lib seach path
From: |
Joakim Tjernlund |
Subject: |
Re: lib seach path |
Date: |
Mon, 14 Dec 2009 09:42:51 +0100 |
Ralf Wildenhues <address@hidden> wrote on 14/12/2009 07:46:30:
>
> * Joakim Tjernlund wrote on Sun, Dec 13, 2009 at 12:04:23PM CET:
> > Ralf Wildenhues wrote on 13/12/2009 11:14:58:
> > > For dependencies on libraries within the build tree, prefer relative
> > > file references over link flags; i.e., write
> > > ../lib/libfoo.la rather than -L../lib -lfoo
> > >
> > > That way, automake (which I assume you're using) will know to rebuild
> > > the output when libfoo changes.
> >
> > I am using automake. I didn't know automake didn't handle -lfoo dependency
> > wise
> > I hope ../lib/libfoo.a works though because some apps wants the static
> > lib even though there is a shared one too?
>
> Add -static to link flags for that. Don't refer to files below .libs.
How do I add -static on a per lib basis?
I got libs such as:
xxx_LDADD += $(top_builddir)/ne/cp_hw_if/libcphwif.a
xxx_LDADD += $(top_builddir)/ne/nlib_lib_if/libnlib_lib_if.a
xxx_LDADD += ../../alib_tsi_if/libtsiif.la
xxx_LDADD += -lcsif
xxx_LDADD += -liciif
xxx_LDADD += -lteif
(I note that the -l should be changed to .la)
The two first libs should always be static even though there
my be a shared version too.
Jocke