[asterisk-dev] Corydon76 Issue Deleted: 0006925, 04-28-06 17:49 Corydon76 Issue Deleted: 0006920

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue May 2 00:20:33 MST 2006


On Monday 01 May 2006 22:28, Luigi Rizzo wrote:
> On Mon, May 01, 2006 at 04:45:58PM -0500, Kevin P. Fleming wrote:
> > So far I see two examples of _applications_ that live in the
> > Asterisk source tree that might benefit from being able to use a
> > very small part of Asterisk as a library, but I don't see the
> > benefit of having to move the entire API into a library at all.
> > Most of the code that would live in that library is totally
> > useless without a running Asterisk instance
>
> if the entire API is overkill then move just part of it to the
> library, and do it gradually if all at once is too unconvenient.
>
> In terms of the Makefiles, the only difference will be individual
> objects moving from the list used for the asterisk binary to the
> list used to build the library.
>
> E.g. all the wrappers for string handling and memory allocation,
> logging, config file parsing, module loading could (gradually)
> be moved there and be of general use.
>
> enough for me. if you are not convinced, there is nothing
> else i can say on the subject.

I'm thinking we could gain the benefits of this without creating a
mess by creating a common static library in the build process and
linking in that static library to all executables which need access
to those common routines.  This avoids the problems that Kevin is
concerned with, while gaining the benefits that Luigi (and others) are
advocating.  We do this already for libtime.a in the stdtime
directory, and it wouldn't be difficult to do this for additional
sections of code.

The other way to go about this is to directly link in a particular
object file during the final build stage.  This avoids the extra step
of creating a library while still ensuring that common code only gets
built in a single source location.  Note that we already do this for
utils/astman, as we link in the object file md5.o.

-- 
Tilghman



More information about the asterisk-dev mailing list