blob: 45eb8072f168a55682bd11531c7aa1c8d7e315fc (
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
|
# -*-Makefile-*-
SUBDIRS += hw/test/
HW_TEST := hw/test/phys-map-test hw/test/run-port80h
.PHONY : hw-check
hw-check: $(HW_TEST:%=%-check)
.PHONY : hw-coverage
hw-coverage: $(HW_TEST:%=%-gcov-run)
check: hw-check
coverage: hw-coverage
$(HW_TEST:%=%-gcov-run) : %-run: %
$(call QTEST, TEST-COVERAGE ,$< , $<)
$(HW_TEST:%=%-check) : %-check: %
$(call QTEST, RUN-TEST ,$(VALGRIND) $<, $<)
$(HW_TEST) : % : %.c hw/phys-map.o
$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $<, $<)
$(HW_TEST:%=%-gcov): %-gcov : %.c %
$(call QTEST, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) -I include -I . -lgcov -o $@ $<, $<)
clean: hw-clean
hw-clean:
$(RM) -f hw/test/*.[od] $(HW_TEST) $(HW_TEST:%=%-gcov)
|