build_system.txt 3.17 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
To build Sofia-SIP::
Pekka Pessi's avatar
Pekka Pessi committed
20

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

25 26 27
Note that autogen.sh expects to have automake 1.9. If using a newer
automake, generate the GNU autotool files using the command autoreconf.

Pekka Pessi's avatar
Pekka Pessi committed
28
Autotool notes
29
==============
Pekka Pessi's avatar
Pekka Pessi committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43

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)

44 45 46 47 48
Makefile fragments
------------------

Some common makefile rules are in 'rules' subdirectory.

Pekka Pessi's avatar
Pekka Pessi committed
49 50 51 52
Maintainer mode
---------------

Sofia-SIP tree is by default configured with automake
53
maintainer mode disabled. In other words, Makefiles do not
Pekka Pessi's avatar
Pekka Pessi committed
54 55 56 57 58 59 60 61
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
62
Running tests
63
=============
Pekka Pessi's avatar
Pekka Pessi committed
64

65 66 67 68
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
69 70 71
EXPENSIVE_CHECKS has been set. EXPENSIVE_CHECKS is also set by the build
system if configure option '--enable-expensive-checks' has been used.

72 73
On selectes architectures, it is possible to run tests under valgrind.
Use the make target 'valcheck' for that purpose.
74

Pekka Pessi's avatar
Pekka Pessi committed
75
Code-tree layout
76
================
Pekka Pessi's avatar
Pekka Pessi committed
77 78

Most of the code resides in the libsofia-sip-ua directory.
79 80
The main library, libsofia-sip-ua.so, is created by
collecting object files (for example bnf/bnf_objs.o) from
Pekka Pessi's avatar
Pekka Pessi committed
81 82 83 84 85 86 87
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
88
===============
Pekka Pessi's avatar
Pekka Pessi committed
89

90
See sofia-sip/docs/release_management.txt
Pekka Pessi's avatar
Pekka Pessi committed
91 92

Developer documentation
93
=======================
Pekka Pessi's avatar
Pekka Pessi committed
94

95
Generating reference documentation from source code
Pekka Pessi's avatar
Pekka Pessi committed
96 97 98 99
---------------------------------------------------

The libsofia-sip-ua library has a top-level make target
"doxygen" for generating the HTML reference documentation.
100 101
The pages will be created to libsofia-sip-ua/docs
subdirectory.
Pekka Pessi's avatar
Pekka Pessi committed
102 103 104 105 106 107 108

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/