XEN_ROOT=$(CURDIR)/../../../..
include $(XEN_ROOT)/tools/Rules.mk

CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenguest)
CFLAGS += $(CFLAGS_libxenstore)
CFLAGS += $(CFLAGS_xeninclude)

.PHONY: all
all: xen-mceinj

install: xen-mceinj
	$(INSTALL_PROG) xen-mceinj $(DESTDIR)$(sbindir)

.PHONY: clean
clean:
	$(RM) *.o xen-mceinj

.PHONY: distclean
distclean: clean

xen-mceinj: xen-mceinj.o Makefile
	$(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore)
