Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
tutorials:makefile-system [2010/01/15 09:33]
andrei example of saving parameters with make cfg
tutorials:makefile-system [2011/12/03 02:39]
109.230.216.225 AIEcKZpfMpizwTwzG
Line 1: Line 1:
-====== SIP Router Makefile System ====== +Well done article that. I'll make sure to use it wseily.
- +
-===== Generate Main Binary ===== +
- +
-<code> +
-make +
-</code> +
- +
-===== Compile Everything ===== +
- +
-<code> +
-make all +
-</code> +
- +
-===== Install Everything ===== +
- +
-<code> +
-make install +
-</code> +
- +
-===== Clean Source Tree ===== +
- +
-  * clean object files +
- +
-<code> +
-make clean +
-</code> +
- +
-  * clean all generated files +
- +
-<code> +
-make proper +
-</code> +
- +
-===== Generate Modules ===== +
- +
-<code> +
-make modules +
-make modules_k +
-make modules_s +
-</code> +
- +
-===== Generate Config for Makefile ===== +
- +
-<code> +
-make cfg +
-</code> +
- +
-  * add extra defines in makefile config +
- +
-<code> +
-make EXTRA_DEFS="-DSTATISTICS" cfg +
-</code> +
- +
-  * 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: <code>make modules-cfg include_modules=<name_of_the_module></code>+
- +
-The same can be accomplished with <code>make cfg include_modules=<name_of_the_module> </code> +
-, but this will remake the whole config.  +
- +
-===== Combined Parameters ===== +
- +
-Various parameters can be given to make command, an example: +
- +
-<code c> +
-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 +
- +
-</code> +
- +
- +
-or you can save them in the config (they will be used by future make invocations) by givin the same parameters to make cfg: +
-<code c> +
-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" +
-</code> +
- +
-===== Generate README For Modules ===== +
- +
-  * all READMEs for modules located in directory **modules** +
-<code> +
-make modules-readme +
-</code> +
-  * all READMEs for modules located in directory **modules_k** +
-<code> +
-make modules_k-readme +
-</code> +
-  * all READMEs for modules located in directory **modules_s** +
-<code> +
-make modules_s-readme +
-</code> +
-  * README for one moduleExample for **modules_k/dispatcher**: +
-<code> +
-make modules-readme modules=modules_k/dispatcher +
-</code> +
- +
-or +
- +
-<code> +
-make -C modules_k/dispatcher/doc readme +
-</code> +
- +
-===== 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: +
-<code> +
-make modules-doc doc_format=format modules=path/to/module +
-</code> +
- +
-Example: generate single xhtml file for **auth** module: +
-<code> +
-make modules-doc doc_format=xhtml modules=modules_k/auth +
-</code>+

Navigation

Wiki

Other

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