blob: d6aac3cb72d226298d94e68769294b5e1bf4a124 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# -*-Makefile-*-
LIBFLASH_TEST := libflash/test/test-flash
check: $(LIBFLASH_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
coverage: $(LIBFLASH_TEST:%=%-gcov-run)
$(LIBFLASH_TEST:%=%-gcov-run) : %-run: %
$<
$(LIBFLASH_TEST:%=%-check) : %-check: %
$(VALGRIND) $<
libflash/test/stubs.o: libflash/test/stubs.c
$(HOSTCC) $(HOSTCFLAGS) -g -c -o $@ $<
$(LIBFLASH_TEST) : libflash/test/stubs.o libflash/libflash.c
$(LIBFLASH_TEST) : % : %.c
$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $< libflash/test/stubs.o
$(LIBFLASH_TEST:%=%-gcov): %-gcov : %.c %
$(HOSTCC) $(HOSTCFLAGS) -fprofile-arcs -ftest-coverage -lgcov -O0 -g -I include -I . -o $@ $< libflash/test/stubs.o
-include $(wildcard libflash/test/*.d)
clean: libflash-test-clean
libflash-test-clean:
$(RM) libflash/test/*.o $(LIBFLASH_TEST)
$(RM) libflash/test/*-gcov
|