meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

peerhood:build [2011/09/02 12:05] (current)
Line 1: Line 1:
 +====== PeerHood build, configure and porting system ======
 +
 +[[PeerHood_core]] (and maybe other projects) contains one level directory structure for building simplicity. Sub level directiories are **modules** that contain source code or other artifacts that are build to **result/** directory. Build process can use **build/** directory to procuce temporary files, like object or dependency files.
 +
 +For [[PeerHood_core]] initial information see [[PeerHood_core_readme|README.txt]].
 +
 +The first build system is implemented by [[gnumake]].
 +
 +==== Build system objectives ====
 +  * One-level directory structure: shows directly contents of the software.
 +  * Result based division.
 +
 +==== Build functionalities ====
 +  - Make c++ translation unit (TU) file dependencies to included files.
 +  - Prepare result/​include/​peerhood include directory
 +  - Compile a shared library from c++ source files.
 +  - Make needed directory structure for result and build files. ​
 +  - Clean result and build files (opposite to make all build).
 +
 +==== Strcture ====
 +<​code>​
 +PeeHood_core/ ​       - project
 +  Makefile ​          - top level Makefile
 +  MakeCommonDefs.mk ​ - common definitions
 +  MakeCommonRules.mk - common rules
 +  libpeerhood/ ​      - module libpeerhood
 +    Makefile ​        - module Makefile: own definitions and rules
 +    ..  ​
 +  peerhoodd/ ​        - module peerhoodd
 +    Makefile ​        - module Makefile: own definitions and rules
 +    ..
 +  otherModule/ ​      - other modules
 +    Makefile ​        - module Makefile: own definitions and rules
 +    ..
 +  result/ ​           - result directory, ready to install
 +  build/ ​            - temporary build files
 +  ..
 +</​code>​
 +See [[PeerHood_core]] about more detailed peerhood contents.
 +
 +==== Project top Makefile ====
 +Project top level Makefile just dispatches make targets to the module Makefiles.
 +
 +==== Module Makefile ====
 +Module Makefile has four parts in effect.
 +  - Common definitions included from ../​MakeCommonDefs.mk
 +  - Module own definitions
 +  - Common rules included from ../​MakeCommonRules.mk
 +  - Module own rules
 +
 +Although GNU Make execution is based on depth-first traversal of dependency graph, the order of definitions and rules is markable, therefore these parts.
 +
 +==== Build targets ====
 +<​code>​
 +> make help
 +Make targets:
 +  build        - build all
 +  clean        - clean results
 +  install ​     - install results [not implemented]
 +  check        - run test cases [no impl]
 +  help         - this help [default]
 +  ​
 +</​code>​
 +
 +Target phases:
 +  * target-do: ​
 +  * target-pre:
 +  * target-post:​