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 | ||
devel:create-library [2008/11/20 23:18] miconda |
devel:create-library [2012/03/18 14:53] 216.194.53.237 old revision restored |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How-To: Create and use a library in SIP Router ====== | + | T6X3wL , [url=http://kssjclkwgnwi.com/ |
- | + | ||
- | ===== Create a library ===== | + | |
- | + | ||
- | * make a new directory in \' | + | |
- | * copy there the Makefile from lib/print/ and change the name in it | + | |
- | * add your .c and .h files. | + | |
- | + | ||
- | ===== Use a library from a module ===== | + | |
- | + | ||
- | * add to the module\' | + | |
- | + | ||
- | < | + | |
- | SERLIBPATH=../../lib | + | |
- | # libraries, in the format path/shortname | + | |
- | # what will be used for -l | + | |
- | SER_LIBS=$(SERLIBPATH)/print/print | + | |
- | </code> | + | |
- | + | ||
- | Compiling the module will re-compile the library automatically if needed (e.g. some change in it). make install will also re-link the module (needed to change the rpath). | + |