coverage_opts = -ftest-coverage -fprofile-arcs
-binaries = unit_test
+binaries = unit_test
+
+tests:: unit_test jhash_test
# RMR emulation
rmr_em.o:: rmr_em.c
# do NOT link the xapp lib; we include all modules in the test programme
g++ -g $(coverage_opts) -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o -lpthread
+# build a special jwrapper object with coverage settings
+jwrapper_test.o:: ../src/json/jwrapper.c ../src/json/jwrapper.h
+ cc $(coverage_opts) -I ../src/json -I ../ext/jsmn ../src/json/jwrapper.c -c -o jwrapper_test.o
+
+jhash_test:: jwrapper_test.o jhash_test.cpp
+ # do NOT link the xapp lib; we include all modules in the test programme
+ g++ -g $(coverage_opts) -I ../src/json -I ../ext/jsmn jhash_test.cpp -o jhash_test jwrapper_test.o -lrmr_si -lpthread
+
# prune gcov files generated by system include files
clean::
rm -f *.h.gcov *.c.gcov