Files
xen/tools/tests/vpci/Makefile
T
Roger Pau Monne 738301591c vpci: do not expose unneeded functions to the user-space test harness
Some functions in vpci.c (vpci_remove_device and vpci_add_handlers)
are not used by the user-space test harness, so guard them with
__XEN__ in order to avoid exposing them to the user-space test
harness.

Requested-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2018-03-23 10:27:50 +01:00

34 lines
651 B
Makefile

XEN_ROOT=$(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
TARGET := test_vpci
.PHONY: all
all: $(TARGET)
.PHONY: run
run: $(TARGET)
./$(TARGET)
$(TARGET): vpci.c vpci.h list.h main.c emul.h
$(HOSTCC) -g -o $@ vpci.c main.c
.PHONY: clean
clean:
rm -rf $(TARGET) *.o *~ vpci.h vpci.c list.h
.PHONY: distclean
distclean: clean
.PHONY: install
install:
vpci.c: $(XEN_ROOT)/xen/drivers/vpci/vpci.c
# Remove includes and add the test harness header
sed -e '/#include/d' -e '1s/^/#include "emul.h"/' <$< >$@
list.h: $(XEN_ROOT)/xen/include/xen/list.h
vpci.h: $(XEN_ROOT)/xen/include/xen/vpci.h
list.h vpci.h:
sed -e '/#include/d' <$< >$@