SIP Router Makefile System

Generate Main Binary

make

Compile Everything

make all

Install Everything

make install

Clean Source Tree

  • clean object files
make clean
  • clean all generated files
make proper

Generate Modules

make modules
make modules_k
make modules_s

Generate Config for Makefile

make cfg
  • add extra defines in makefile config
make EXTRA_DEFS="-DSTATISTICS" cfg
  • cfg for Makefile is config.mak
  • you can edit it and tune as you wish before compilation

Enable Module

If the module is not compiled by default:

  • edit modules.lst
  • remove the name of the module from exclude_modules variable

or type:

make modules-cfg include_modules=<name_of_the_module>

.

The same can be accomplished with

make cfg include_modules=<name_of_the_module> 

, but this will remake the whole config.

Combined Parameters

Various parameters can be given to make command, an example:

make prefix=/opt/sip-router \
     SCTP=1 \
     CC_EXTRA_OPTS=-I/usr/gnu/include \
     group_include="standard postgres presence" \
     include_modules="snmpstats perl tls" \
     all

or you can save them in the config (they will be used by future make invocations) by givin the same parameters to make cfg:

make cfg prefix=/opt/sip-router \
     SCTP=1 \
     CC_EXTRA_OPTS=-I/usr/gnu/include \
     group_include="standard postgres presence" \
     include_modules="snmpstats perl tls"

Generate README For Modules

  • all READMEs for modules located in directory modules
make modules-readme
  • all READMEs for modules located in directory modules_k
make modules_k-readme
  • all READMEs for modules located in directory modules_s
make modules_s-readme
  • README for one module. Example for modules_k/dispatcher:
make modules-readme modules=modules_k/dispatcher

or

make -C modules_k/dispatcher/doc readme

Generate Different Formats For Modules Documentation

Available formats: * txt - text plain * xhtml - single xhtml file * html - html files (chunks) split by sections * pdf - PDF file

Command to generate a specific format for a module:

make modules-doc doc_format=format modules=path/to/module

Example: generate single xhtml file for auth module:

make modules-doc doc_format=xhtml modules=modules_k/auth

Navigation

Wiki

Other

QR Code
QR Code tutorials:makefile-system (generated for current page)