build_system.txt 2.81 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 41 42 43 44 45 46 47 48 49 50 51 52 53

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)

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
54
Running tests
55
=============
Pekka Pessi's avatar
Pekka Pessi committed
56 57 58 59 60 61 62 63

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. Therefore, they are run only if the environment variable
EXPENSIVE_CHECKS has been set. EXPENSIVE_CHECKS is also set by the build
system if configure option '--enable-expensive-checks' has been used.

Pekka Pessi's avatar
Pekka Pessi committed
64
Code-tree layout
65
================
Pekka Pessi's avatar
Pekka Pessi committed
66 67 68 69 70 71 72 73 74 75 76

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
77
===============
Pekka Pessi's avatar
Pekka Pessi committed
78

79
See sofia-sip/docs/release_management.txt
Pekka Pessi's avatar
Pekka Pessi committed
80 81

Developer documentation
82
=======================
Pekka Pessi's avatar
Pekka Pessi committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97

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/