build_system.txt 3.04 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1 2 3 4 5
=============================
Sofia-SIP build system README
=============================

:Author: Kai Vehmanen <kai -dot vehmanen -at- nokia -dot- com>
6 7
:Author: Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
:Version: 20051011-5
Pekka Pessi's avatar
Pekka Pessi committed
8 9 10
:Formatting: reStructuredText, http://docutils.sourceforge.net/rst.html

Introduction
11
============
Pekka Pessi's avatar
Pekka Pessi committed
12 13 14 15 16

The Sofia-SIP build system practices are documented in this
file. The instructions are aimed at developers.

Quick start
17
===========
Pekka Pessi's avatar
Pekka Pessi committed
18 19 20

To build Sofia-IP::

21 22 23 24
  sh> ``./autogen.sh`` (if building from a fresh CVS checkout)
  sh> ``./configure``
  sh> ``make``

Pekka Pessi's avatar
Pekka Pessi committed
25
Autotool notes
26
==============
Pekka Pessi's avatar
Pekka Pessi committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40

Macros
------

Sofia-SIP specific macros are prefixed with "``SAC\_``" and are
defined in files under the toplevel "m4/" directory.

Makefile target notes
---------------------

- all optionally compiled source files should be listed
  separately in ``DIST_SOURCES`` variable (otherwise ``make dist``
  will fail)

41 42 43 44 45
Makefile fragments
------------------

Some common makefile rules are in 'rules' subdirectory.

Pekka Pessi's avatar
Pekka Pessi committed
46 47 48 49 50 51 52 53 54 55 56 57 58
Maintainer mode
---------------

Sofia-SIP tree is by default configured with automake
maintainer mode disable. In other words, Makefiles do not
contain rules for recreating or updating configure, Makefiles
or other autotool-generated files. To update these files,
you need to run top-level autogen.sh script.

Those developers who need to often modify configure.ac, Makefile.am
and macro files, can enable maintainer mode with configure
option '--enable-maintainer-mode'.

Pekka Pessi's avatar
Pekka Pessi committed
59
Running tests
60
=============
Pekka Pessi's avatar
Pekka Pessi committed
61

62 63 64 65
Sofia-SIP has quite complete suite of test cases. It is prudent to run
them while making changes and before committing them to revision control
system. However, running certain tests takes quite a long time to
execture. Therefore, they are run only if the environment variable
Pekka Pessi's avatar
Pekka Pessi committed
66 67 68
EXPENSIVE_CHECKS has been set. EXPENSIVE_CHECKS is also set by the build
system if configure option '--enable-expensive-checks' has been used.

69 70 71
On hosts with i386 architecture, it is possible to run tests under
valgrind. Use the make target 'valcheck' for that purpose.

Pekka Pessi's avatar
Pekka Pessi committed
72
Code-tree layout
73
================
Pekka Pessi's avatar
Pekka Pessi committed
74 75 76 77 78 79 80 81 82 83 84

Most of the code resides in the libsofia-sip-ua directory.
The main library, libsofia-sip-ua.so, is created by 
collecting object files (for example bnf/bnf_objs.o) from 
individual modules.

There are some portability issues with the way the
shared library is currently built, and we are looking
for ways to improve the situation.

Making releases
85
===============
Pekka Pessi's avatar
Pekka Pessi committed
86

87
See sofia-sip/docs/release_management.txt
Pekka Pessi's avatar
Pekka Pessi committed
88 89

Developer documentation
90
=======================
Pekka Pessi's avatar
Pekka Pessi committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

Generating reference documentation from source code 
---------------------------------------------------

The libsofia-sip-ua library has a top-level make target
"doxygen" for generating the HTML reference documentation.
The pages will be created to libsofia-sip-ua/docs 
subdirectory. 

This special target is primarily meant for use by
the Sofia-SIP website admins, but can be used by anyone
with the proper set of tools:

- Doxygen, http://www.stack.nl/~dimitri/doxygen/
- Dot graph tool, http://www.research.att.com/sw/tools/graphviz/