The main purpose of Make-Effect is for use on projects that consist of large number of subprojects, that are to be compiled to executable files or static libraries.
Make-Effect allows specification of configurations settings for different stages of software development and for working under different subprojects.
The set of configuration settings is known as a build session.
Build sessions are managed via the make
utility. The Make-Effect command is only used to create the project.
A project created with Make-Effect consists of the following types of files:
Type | Location | Number of instances |
---|---|---|
Project makefile | Makefile in the project root directory |
one |
Subproject configuration file | Makefile.in in a subproject's directory |
one file per each subproject |
Session configuration file | Makefile.in in the session directory or mk-<session_name>.in file in the project root directory |
one file per each session |
project makefile
contains common project settings such as: project name, list of subproject directories, paths to third-party utilities used, and provides targets for:
build
); tests
); install
); pack
, pack-src
).session configuration file
contains individual settings that take effect on a particular session only: list of supplementary subprojects, list of supplementary compilation flags, list of subprojects excluded from build.
subproject configuration file
contains subproject settings: compilation flags, list of source file directories, list of external libraries needed.
Subproject configuration files can be created manually, however in most cases use of one of the following templates is more suitable:
Make-Effect allows the creation of two types of build sessions: Release and Debug.
Build sessions differ from each other by their intended purpose. Release sessions are intended for building a delivery-ready version of the software product. Debug sessions are for building a working version of the software product and has more parameters for configuration.
If a product is to be distributed with the source code then a release session should be included in the delivered package.
Sessions can be arbitrarily named, however, as a rule release sessions have the prefix "Release" and debug sessionshave prefix "Debug" in their names.
Building of the project can only be accomplished from within a build session. A project example with two build sessions, Debug and Release, is shown in the figure above.
In order to build a project within a Debug session, specify the session in the .me-session
file of the project root directory:
session=Debug
and run the make
command.
Alternatively, a session can be specified as a command line parameter when running the
command make
, in this case the definition in the .me-session
file will be ignored.
$ make session=Debug
If no session is explicitly specified (see above) then default session will be applied. Default session can be defined in the project makefile:
session=Release
Tip:
A session that is delivered with the source code should be specified as the default session. A project can then be built and installed with the following commands:
$ make
$ make install
Make-Effect allows the organization of team work under a project for a group of developers since projects are divided into a common part and an individual part. The common part can be put into a version control system repository, but the individual (developer's workspace) part should not be included in a repository.
The following items belong to the individual part:
The following items belong to the common part:
Make-Effect defaults to using the WppUnit library for unit testing (http://sourceforge.net/projects/wppunit). If the library is installed and subprojects have Tests subdirectories then unit tests can be started by the command:
$ make tests
Tests will be performed within the current build session. Unit tests are built and performed individually for each of the subprojects.