Search code examples
omnet++veins

code coverage calculation and profiling in VEINS/OMNeT++


I'm trying to get code coverage and profiling information from my VEINS implementation using gcov/llvm-cov and gprof. What I have figured until now is I will have to change the Makefile to add the --coverage -O0 and -pg for gcov and gprof, respectively. However, the build process for VEINS is a little complex for me to add this viz. ./configure that calls opp_makemake and then run make. I would appreciate some help on this.


Solution

  • The OMNeT++ opp_makemake build system which Veins uses combines a variety of files into src/Makefile. If you want to adapt how the final Makefile looks, the easiest way I can think of is to modify src/makefrag, a fragment that gets included verbatim in the finished Makefile. An example is already included with Veins 5.0: https://github.com/sommer/veins/blob/veins-5.0/src/makefrag