Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tutorials:makefile-system [2010/01/15 09:30] andrei note aboute using make modules-cfg to include a module. |
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' |
- | + | ||
- | ===== 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=" | + | |
- | </ | + | |
- | + | ||
- | * 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: < | + | |
- | + | ||
- | The same can be accomplished with < | + | |
- | , but this will remake the whole config. | + | |
- | + | ||
- | ===== Combined Parameters ===== | + | |
- | + | ||
- | Various parameters can be given to make command, an example: | + | |
- | + | ||
- | <code c> | + | |
- | make prefix=/ | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | all | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | ===== 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/ | + | |
- | < | + | |
- | make modules-readme modules=modules_k/ | + | |
- | </ | + | |
- | + | ||
- | or | + | |
- | + | ||
- | < | + | |
- | make -C modules_k/ | + | |
- | </ | + | |
- | + | ||
- | ===== 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/ | + | |
- | </ | + | |
- | + | ||
- | Example: generate single xhtml file for **auth** module: | + | |
- | < | + | |
- | make modules-doc doc_format=xhtml modules=modules_k/ | + | |
- | </ | + |