build_system.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. =============================
  2. Sofia-SIP build system README
  3. =============================
  4. :Author: Kai Vehmanen <kai -dot vehmanen -at- nokia -dot- com>
  5. :Author: Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
  6. :Version: 20051011-5
  7. :Formatting: reStructuredText, http://docutils.sourceforge.net/rst.html
  8. Introduction
  9. ============
  10. The Sofia-SIP build system practices are documented in this
  11. file. The instructions are aimed at developers.
  12. Quick start
  13. ===========
  14. To build Sofia-IP::
  15. sh> ``./autogen.sh`` (if building from a fresh CVS checkout)
  16. sh> ``./configure``
  17. sh> ``make``
  18. Autotool notes
  19. ==============
  20. Macros
  21. ------
  22. Sofia-SIP specific macros are prefixed with "``SAC\_``" and are
  23. defined in files under the toplevel "m4/" directory.
  24. Makefile target notes
  25. ---------------------
  26. - all optionally compiled source files should be listed
  27. separately in ``DIST_SOURCES`` variable (otherwise ``make dist``
  28. will fail)
  29. Makefile fragments
  30. ------------------
  31. Some common makefile rules are in 'rules' subdirectory.
  32. Maintainer mode
  33. ---------------
  34. Sofia-SIP tree is by default configured with automake
  35. maintainer mode disable. In other words, Makefiles do not
  36. contain rules for recreating or updating configure, Makefiles
  37. or other autotool-generated files. To update these files,
  38. you need to run top-level autogen.sh script.
  39. Those developers who need to often modify configure.ac, Makefile.am
  40. and macro files, can enable maintainer mode with configure
  41. option '--enable-maintainer-mode'.
  42. Running tests
  43. =============
  44. Sofia-SIP has quite complete suite of test cases. It is prudent to run
  45. them while making changes and before committing them to revision control
  46. system. However, running certain tests takes quite a long time to
  47. execture. Therefore, they are run only if the environment variable
  48. EXPENSIVE_CHECKS has been set. EXPENSIVE_CHECKS is also set by the build
  49. system if configure option '--enable-expensive-checks' has been used.
  50. On hosts with i386 architecture, it is possible to run tests under
  51. valgrind. Use the make target 'valcheck' for that purpose.
  52. Code-tree layout
  53. ================
  54. Most of the code resides in the libsofia-sip-ua directory.
  55. The main library, libsofia-sip-ua.so, is created by
  56. collecting object files (for example bnf/bnf_objs.o) from
  57. individual modules.
  58. There are some portability issues with the way the
  59. shared library is currently built, and we are looking
  60. for ways to improve the situation.
  61. Making releases
  62. ===============
  63. See sofia-sip/docs/release_management.txt
  64. Developer documentation
  65. =======================
  66. Generating reference documentation from source code
  67. ---------------------------------------------------
  68. The libsofia-sip-ua library has a top-level make target
  69. "doxygen" for generating the HTML reference documentation.
  70. The pages will be created to libsofia-sip-ua/docs
  71. subdirectory.
  72. This special target is primarily meant for use by
  73. the Sofia-SIP website admins, but can be used by anyone
  74. with the proper set of tools:
  75. - Doxygen, http://www.stack.nl/~dimitri/doxygen/
  76. - Dot graph tool, http://www.research.att.com/sw/tools/graphviz/