Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2013 20:50:05 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Building library that depends on another library.
Message-ID:  <20130507185005.GB1888@garage.freebsd.pl>
In-Reply-To: <86r4hkgd04.fsf@nine.des.no>
References:  <20130505201436.GJ1374@garage.freebsd.pl> <86r4hkgd04.fsf@nine.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--rS8CxjVDS/+yyDmU
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 06, 2013 at 08:49:15PM +0200, Dag-Erling Sm=F8rgrav wrote:
> Pawel Jakub Dawidek <pjd@FreeBSD.org> writes:
> > It looks like to make such dependency work one HAS TO add libnv to
> > _prebuild_libs in src/Makefile.inc1, which seems wrong.
>=20
> It may seem wrong, but it is correct, cf the following comment in
> Makefile.inc1:
>=20
> # The list of libraries with dependents (${_prebuild_libs}) and their
> # interdependencies (__L) are built automatically by the
> # ${.CURDIR}/tools/make_libdeps.sh script.

Yes, this also means SUBDIR_ORDERED in lib/Makefile doesn't make sense.

All in all I really don't like to add libraries to Makefile.inc1, it
doesn't sound right. I'd like this to be self-contained. For bsd.prog.mk
it is enough to specify DPADD/LDADD in program's Makefile instead of
hacking some central Makefile.

I came up with something like the following. Instead of:

DPADD=3D	${LIBNV}
LDADD=3D	-lnv
(plus modifying src/Makefile.inc1)

I only add:

LDADD=3D	-L${.OBJDIR}/../libnv -lnv

What do people think?

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com

--rS8CxjVDS/+yyDmU
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlGJTN0ACgkQForvXbEpPzQynACdG9bsv2qpBsUu+9fEk1IzDc6T
CJYAoNVWNy5l+DKFJVIaHC8m2gHQM80p
=IZ85
-----END PGP SIGNATURE-----

--rS8CxjVDS/+yyDmU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130507185005.GB1888>