Debian Codegraph @

tools/tests/vpci/Makefile

raw
1 XEN_ROOT=$(CURDIR)/../../..
2 include $(XEN_ROOT)/tools/Rules.mk
3
4 TARGET := test_vpci
5
6 .PHONY: all
7 all: $(TARGET)
8
9 .PHONY: run
10 run: $(TARGET)
11 ./$(TARGET)
12
13 $(TARGET): vpci.c vpci.h list.h main.c emul.h
14 $(HOSTCC) $(CFLAGS_xeninclude) -g -o $@ vpci.c main.c
15
16 .PHONY: clean
17 clean:
18 rm -rf $(TARGET) *.o *~ vpci.h vpci.c list.h
19
20 .PHONY: distclean
21 distclean: clean
22
23 .PHONY: install
24 install:
25
26 vpci.c: $(XEN_ROOT)/xen/drivers/vpci/vpci.c
27 # Remove includes and add the test harness header
28 sed -e '/#include/d' -e '1s/^/#include "emul.h"/' <$< >$@
29
30 list.h: $(XEN_ROOT)/xen/include/xen/list.h
31 vpci.h: $(XEN_ROOT)/xen/include/xen/vpci.h
32 list.h vpci.h:
33 sed -e '/#include/d' <$< >$@