OpenAB
1.0.1
|
https://github.com/GENIVI/open-adress-book
In the main source tree, the file autogen.sh can be used to generate all the required files (Makefiles, Configure)
This example explain the few steps required to build and install OpenAB in any folder (i.e. /tmp/OpenAB_inst)
As reference I'm using this folder structure:
The autogen.sh script is responsible to launch the autoreconf and the configure script.
It accept all the parameters that will be passed to the configure script.
To show the configure options, just type:
To start creating the building environment, use all the required configure parameters with autogen.
All the Makefiles are generated using the previous command, it is time to build and install.
1) Copy the source examples in the OpenAB_examples folder
2) Since the package has been installed in a non standard folder, the pkg-config tool is not able to find it unless specified in the PKG_CONFIG_PATH variable
all the OpenAB libraries have their own .pc file defined. A full list of OpenAB libraries can be retrieved using:
3) Everything is on place to build any source code using the OpenAB tools
These files are explained in Detailed Example
To build the plugin object, use:
To build the executable, use:
To enable unit tests build provide –enable-tests option to configure script (enabled by default). Unit tests require GTest to be installed, in case where it won't be detected, unit tests will be simply disabled. To build and run unit tests just type make check after configuring project with unit tests support.
To be able to generate coverage report provide –enable-coverage option to configure script (disabled by default). This feature requires LCov and Genhtml tools to be installed, simillar like in case of unit tests, if one of these tools won't ba available, coverage will be automatically disabled. To generate coverage report just type make generate-coverage, it will build unit tests, run them and generate HTML coverage report in tests/coveragereport folder. To clear coverage calculations use make clean-coverage.
If Cppcheck if installed additional make taget will be available - cppcheck - that will run static code analysis using Cppcheck