Skip to content

Commit

Permalink
hw/test: generalise makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Feb 20, 2019
1 parent 7ac85e4 commit 40b377a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hw/test/Makefile.check
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# -*-Makefile-*-
PHYS_MAP_TEST := hw/test/phys-map-test
HW_TEST := hw/test/phys-map-test

.PHONY : hw-phys-map-check
hw-phys-map-check: $(PHYS_MAP_TEST:%=%-check)
.PHONY : hw-check
hw-check: $(HW_TEST:%=%-check)

check: hw-phys-map-check
check: hw-check

$(PHYS_MAP_TEST:%=%-check) : %-check: %
$(HW_TEST:%=%-check) : %-check: %
$(call Q, RUN-TEST ,$(VALGRIND) $<, $<)

$(PHYS_MAP_TEST) : % : %.c hw/phys-map.o
$(HW_TEST) : % : %.c hw/phys-map.o
$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -o $@ $<, $<)

clean: hw-phys-map-clean
clean: hw-clean

hw-phys-map-clean:
$(RM) -f hw/test/*.[od] $(PHYS_MAP_TEST)
hw-clean:
$(RM) -f hw/test/*.[od] $(HW_TEST)

0 comments on commit 40b377a

Please sign in to comment.