Building & makefile

Building is done via a hand-written Makefile which exists in the root directory. At present autconf or any such tools are not used in order to reduce dependencies of the software.

All .cc files in src/ will automatically compiled into the graphtool.a which is a library that can be statically linked with any front end, as is done with GraphTool bbband GraphToolUI.

The all target builds three binaries - GraphTool which is a console version of the program, GraphToolUI which is a QT version and GraphToolTestRunner which runs the test as per Google Test.

It also compiles the included Google Test framework library as well as the included pugixml library. They can be found under lib/ and the appropriate targets exist for them in the Makefile in the root directory.

The build of GraphToolUI is controlled by a qmake project file. If you want to include any .cc files into that build, you have to add that file to the file src/gui/graphtool.pro.

Tests are built using all files named *_test.cc in the tests/ directory. They are compiled together into the Google Test Binary called GraphToolTestRunner.

QT builds

The QT UI is built via a separate Makefile which is automatically genereted using the qmake program from the file graphtool.pro. All customization of the QT Makefile is made via the project file. Qmake is run via the makefile in the target bin/GraphToolUI. If both QT4 and QT5 is present in the system the correct command to run is qmake-qt4.

Debugging symbols

In order to include debugging symbols define the environment variable DEBUG and set it to 1

Code coverage

In order to include symbols for code coverage, then define the variable COVERAGE and set it to 1. For example: DEBUG=1 COVERAGE=1 make all

You will require libgcov to be able to link with the coverage library to generate code coverage reports.

Special targets

If doxygen is available make doxygen will build the documentation into the doc/doxygen directory

Test coverage reports can be built by using make coverage

Each individual binary can be built in the following way:

A few test examples can be built using make spikes