Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building aggregate libraries from other libraries
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-05-28 07:45:59


On Friday, May 27, 2011 22:19:24 Matthew Chambers wrote:
> I have a project that's split into a nice array of library targets. But
> some of my clients want a monolithic way of accessing these. Instead of:
> lib_pwiz_A.a
> lib_pwiz_B.a
> lib_pwiz_C.a
> (+15 others)
>
> They just want:
> lib_pwiz.a
>
> Is there a way to make an explicit target simply the aggregate all the
> individual libraries into a monolithic one? Preferably for either
> link=shared or link=static, but only working for link=static would be
> acceptable.

There is no tool in gcc toolchain that can do that. So, the only way is
to write a script that would extract every member from every .a file
(remember, that it is nothing but archive), and then compose them
together -- both using the 'ar' utility.

Does this help?

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk