[asterisk-dev] Compiling Module outside of source tree
Russell Bryant
russell at digium.com
Thu Sep 11 12:41:00 CDT 2008
Joe Lewis wrote:
> Many thanks for the responses. Following Murphy's instructions, it
> works. Outside of it, it fails. I will attempt one of Tilghman's
> Makefiles, but I'm starting to think Murphy had that one pegged. Again,
> many thanks to Tzafrir, Steve, and Tilghman for the responses! You have
> all been most helpful!
The one thing to keep in mind with dropping it into the Asterisk source
tree, is that is only going to work if the module has no dependencies.
In this case, the module depends on mysql. So, at a minimum, you would
need to add something like this to the Asterisk cdr/Makefile:
cdr_mysql.so: ASTCFLAGS+=$(shell mysql_config --cflags)
cdr_mysql.so: LIBS+=$(shell mysql_config --libs)
Note that without this, the failure would be a run-time, not compile-time.
--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.
More information about the asterisk-dev
mailing list