Makefile structure for BEL Applications


R. Huhmann


To enable a common build structure for the complete application tree we defined some fixed standard makefiles for libraries, executables, Java jar-packages and executables, Fortran libraries and executables, documentation, utility programs, etc.

Each source-code project has its own user-defined makefile in which one of the variables

determines the kind of project and which standard makefile is used for further processing. The contents of this variable gives the name of the executable, the library, the jar-file, the document-name, etc. The necessary project and target specific definitions, e.g. dependencies, object or source modules, public headers and so on, are supplied in the project makefile either.

After the project-specific and user-defined settings the master makefile makefile.dispatch must included which determines which of the standard makefiles for the defined target type is to be loaded (s. List of target specific makefiles ). The absolute path of makefile.dispatch is referenced by the environment variable BELA_MAKE. See Makefile Organisation for the scheme of included files.

List of target specific makefiles

The default behaviour of all makefiles (just type make) is to compile/link/build all neccessary components and complete the code generation process locally (where you checked out the project). Each project then has some specific targets to install the generated code in a global directory-structure (controlled by the enviroment variable BELA_BUILD_MASTER_DIR). Anyway, there is a common target install for all kind of makefiles to install the objects in their installation directory (make install ).

There are template user makefiles for the corresponding kind of target with some in-file documentation of variables to set

The common preferences used for the complete code generation process are stored in makefile.gen

The build order

To enable a master buildtool to build all projects in proper order there is for each project a list of projects it depends on.

In the project's makefile use

DEPS += relative/path/of-a-project-we-depend-on/@version()/<target_type>

DEPS += relative/path/of-another-project-we-depend-on/@version()/<target_type>

DEPS += ...

to define the projects we depend on. The tag @version() is replaced at build time by the build version. At time of software development you can give in brackets an alternative version, usually either @version(develop), @version(ready) or @version(release). For binary target projects <target-type> is 'target-dflt', 'target-dbg', 'target-dflt-64', 'target-dbg-64'

Generated on 25 Feb 2014 for prefs by  doxygen 1.4.7