Files
xen/tools/debugger/kdd/Makefile
T
Petre Pircalabu f2b40dabab Makefile: Fix uninstall target
Running "make uninstall" does not remove all installed files, a
situation which might cause link related issues if xen is re-installed
in a different location.
In order to make uninstall correctly remove the files it is best
the process should be done recursively by mirroring each "install"
target with an "uninstall" who removes the installed files.

An exception to this rule is uninstalling the files produced by
"qemu-xen-dir-remote" and "qemu-xen-traditional-dir", which are external
to the project. These projects do not implement an "uninstall" target so
the files have to be removed manually.

Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-07-28 17:47:42 +01:00

32 lines
618 B
Makefile

XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += -DXC_WANT_COMPAT_MAP_FOREIGN_API
LDLIBS += $(LDLIBS_libxenctrl)
CFILES := kdd.c kdd-xen.c
OBJS := $(CFILES:.c=.o)
all: kdd
kdd: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS)
.PHONY: clean
clean:
rm -f $(OBJS) $(DEPS) kdd
.PHONY: distclean
distclean: clean
.PHONY: install
install: all
[ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
$(INSTALL_PROG) kdd $(DESTDIR)$(sbindir)/kdd
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(sbindir)/kdd