Files
xen/tools/xs-clients/Makefile
T
Juergen Gross 5c293058b1 tools/xenstore: move xenstored sources into dedicated directory
In tools/xenstore there are living xenstored and xenstore clients.
They are no longer sharing anything apart from the "xenstore" in their
names.

Move the xenstored sources into a new directory tools/xenstored while
dropping the "xenstored_" prefix from their names. This will make it
clearer that xenstore clients and xenstored are independent from each
other.

In order to avoid two very similar named directories below tools,
rename tools/xenstore to tools/xs-clients.

Drop the make targets [un]install-clients as those are not used in
the Xen tree.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
2023-08-23 19:10:37 +01:00

70 lines
1.8 KiB
Makefile

XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenguest)
CFLAGS += $(CFLAGS_libxentoolcore)
CFLAGS += $(CFLAGS_libxenstore)
xenstore: LDLIBS += $(LDLIBS_libxenstore)
xenstore: LDLIBS += $(LDLIBS_libxentoolcore)
xenstore: LDLIBS += $(SOCKET_LIBS)
xenstore-control: LDLIBS += $(LDLIBS_libxenstore)
xenstore-control: LDLIBS += $(LDLIBS_libxenctrl)
xenstore-control: LDLIBS += $(LDLIBS_libxenguest)
xenstore-control: LDLIBS += $(LDLIBS_libxentoolcore)
xenstore-control: LDLIBS += $(SOCKET_LIBS)
CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
CLIENTS += xenstore-write xenstore-ls xenstore-watch
TARGETS := xenstore $(CLIENTS) xenstore-control
.PHONY: all
all: $(TARGETS)
.PHONY: clients
clients: xenstore $(CLIENTS) xenstore-control
$(CLIENTS): xenstore
ln -f xenstore $@
xenstore: xenstore_client.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS)
xenstore-control: xenstore_control.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS)
.PHONY: clean
clean::
$(RM) $(TARGETS) $(DEPS_RM)
.PHONY: distclean
distclean: clean
.PHONY: TAGS
TAGS:
etags `find . -name '*.[ch]'`
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir)
$(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
set -e ; for c in $(CLIENTS) ; do \
ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
done
.PHONY: uninstall
uninstall:
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS))
rm -f $(DESTDIR)$(bindir)/xenstore
rm -f $(DESTDIR)$(bindir)/xenstore-control
if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat; \
fi
-include $(DEPS_INCLUDE)