[SR-Users] kamailio's Makefile system : Enabling CFLAGS/LDFLAGS for udp_server.c
Daniel-Constantin Mierla
miconda at gmail.com
Tue Dec 1 11:13:02 CET 2015
Hello,
On 26/11/15 08:33, aft wrote:
> Hi,
>
> I'm doing some experimentation on kamailio's udp_server.c. Now i need
> libpcre for that. So i first thought if i enable the regex module, the
> CFLAGS/LDFLAGS would be available from udp_server.c. But it turns out
> it doesn't build(doesn't *link* to be more precise).
>
> Kamailio's build system is pretty unfamiliar for me. Although i
> absolutely hate autotools based build system(I prefer Scons), but i'm
> pretty familiar with these. But Kamailio's build system is pretty much
> cryptic for me(Is it based on CMake?).
>
> There is a page on devel wiki for kamailio's build system. it turns
> out i can do stuff like :
>
> make cfg prefix=/opt/kamailio \
> SCTP=1 \
> CC_EXTRA_OPTS=-I/usr/gnu/include \
> group_include="standard postgres presence" \
> include_modules="snmpstats lcr tls"
>
> So there might be a LD_EXTRA_OPTS or stuff like that. Which than would
> be defined (I guess) globally so the core c files(like udp_server.c)
> would be able to use that. One way i guess would be to sharpen my
> egrep and find that variable name. But it all feels a bit hacky. As i
> have already included regex module, there should be a way to reuse the
> CFLAGS/LDFLAGS for that module for core files like udp_server.c.
>
the compiler options for modules are not propagated to the core.
You should be able to add more compiler options to core compilation via
CC_EXTRA_OPS and LD_EXTRA_OPS.
You can add also Q=0 to make command to see the full compile command output.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu
More information about the sr-users
mailing list