1XEN_ROOT = $(CURDIR)/../../..
2include $(XEN_ROOT)/tools/Rules.mk
3
4CFLAGS  += -Werror
5CFLAGS  += $(CFLAGS_libxenctrl)
6CFLAGS  += -DXC_WANT_COMPAT_MAP_FOREIGN_API
7LDLIBS  += $(LDLIBS_libxenctrl)
8
9CFILES  := kdd.c kdd-xen.c
10OBJS    := $(CFILES:.c=.o)
11
12all: kdd
13
14kdd: $(OBJS)
15	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS)
16
17.PHONY: clean
18clean:
19	rm -f $(OBJS) $(DEPS_RM) kdd
20
21.PHONY: distclean
22distclean: clean
23
24.PHONY: install
25install: all
26	[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
27	$(INSTALL_PROG) kdd $(DESTDIR)$(sbindir)/xen-kdd
28
29.PHONY: uninstall
30uninstall:
31	rm -f $(DESTDIR)$(sbindir)/xen-kdd
32