[asterisk-dev] Developing asterisk module: seeking for build template

Tilghman Lesher tilghman at meg.abyt.es
Mon Jul 4 13:46:02 CDT 2011


On Monday 04 July 2011 11:55:41 Yaroslav Panych wrote:
> 2011/7/4 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
> > On Mon, Jul 04, 2011 at 04:12:03PM +0300, Yaroslav Panych wrote:
> >> Hello to all
> >> 
> >>    I have implemented some urgently required for me feature which
> >> Asterisk do not have out of box. I've built module(spying into
> >> app_skel.c, but locating it into addons subdirectory). And so have
> > 
> >> such problems:
> > Why do you put it in addons?
> 
> Only because it is smallest part of asterisk sources. Contains only 4
> of modules, and historically(pre-1.8) it contained modules that was
> optional in asterisk.

No, it contains modules whose licenses conflict with the dual license nature
of Asterisk's licensing.  They are therefore separated and disabled by
default.

> >> 1. I must patch a bunch of asterisk files(menuselect-tree,
> >> addons/Makefile, and some others) in order to teach make menuselect
> >> and make addons to build it)
> > 
> > No, you should not have to do this. What kind of patching did you
> > need?
> > 
> > menuselect-tree is generated.
> 
> Generated from what source. Did not found any. Downloaded source
> tarball and there is already menuselect-tree file, even before run
> ./configure  I forced to modify Makefile in order to put there
> instructions to buil my module(module.c -> module.o -> module.so)

It's generated based upon Makefile rules, based upon the comparison of
the age of the menuselect-tree file and all .c and .cc files within the
various module directories.  If you need to link in external libraries to
your module, it's a bit more complicated, because the library needs to be
detected via autoconf (configure.ac; build-tools/menuselect-deps.in;
bootstrap.sh; configure) and the library needs to be indicated in the module
source (see the *** MODULEINFO comments).

-- 
Tilghman



More information about the asterisk-dev mailing list