Add API allowing xAPPs to send alarm messages
[ric-plt/xapp-frame-cpp.git] / test / Makefile
1
2 coverage_opts = -ftest-coverage -fprofile-arcs
3
4 binaries = unit_test
5
6 tests:: unit_test jhash_test
7
8 # RMR emulation
9 rmr_em.o::      rmr_em.c
10         cc -g rmr_em.c -c
11
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/alarm -I ../src/messaging unit_test.cpp -o unit_test rmr_em.o  -lpthread
15
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
19
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
23
24 # prune gcov files generated by system include files
25 clean::
26         rm -f *.h.gcov *.c.gcov
27
28 # ditch anything that can be rebuilt
29 nuke::
30         rm -f *.a *.o *.gcov *.gcda *.gcno core a.out $(binaries)
31