2 coverage_opts = -ftest-coverage -fprofile-arcs
6 tests:: unit_test jhash_test
12 unit_test:: unit_test.cpp rmr_em.o
13 # do NOT link the xapp lib; we include all modules in the test programme
14 g++ -g $(coverage_opts) -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o -lpthread
16 # build a special jwrapper object with coverage settings
17 jwrapper_test.o:: ../src/json/jwrapper.c ../src/json/jwrapper.h
18 cc $(coverage_opts) -g -I ../src/json -I ../ext/jsmn ../src/json/jwrapper.c -c -o jwrapper_test.o
20 jhash_test:: jwrapper_test.o jhash_test.cpp
21 # do NOT link the xapp lib; we include all modules in the test programme
22 g++ -g $(coverage_opts) -I ../src/json -I ../ext/jsmn jhash_test.cpp -o jhash_test jwrapper_test.o -lrmr_si -lpthread
24 # prune gcov files generated by system include files
26 rm -f *.h.gcov *.c.gcov
28 # ditch anything that can be rebuilt
30 rm -f *.a *.o *.gcov *.gcda *.gcno core a.out $(binaries)