Files
xen/tools/console/Makefile
T
Roger Pau Monne e8b42a4e88 tools/console: use xenforeigmemory to map console ring
This patch replaces the usage of xc_map_foreign_range with
xenforeignmemory_map from the stable xenforeignmemory library. Note
there are still other uses of libxc functions which prevents removing
the dependency.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
2021-10-11 12:05:38 +01:00

59 lines
1.6 KiB
Makefile

XEN_ROOT=$(CURDIR)/../..
include $(XEN_ROOT)/tools/Rules.mk
CFLAGS += -Werror
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenstore)
LDLIBS += $(LDLIBS_libxenctrl)
LDLIBS += $(LDLIBS_libxenstore)
LDLIBS += $(SOCKET_LIBS)
LDLIBS_xenconsoled += $(UTIL_LIBS)
LDLIBS_xenconsoled += -lrt
CONSOLE_CFLAGS-$(CONFIG_ARM) = -DCONFIG_ARM
BIN = xenconsoled xenconsole
.PHONY: all
all: $(BIN)
.PHONY: clean
clean:
$(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS_RM)
$(RM) client/*.o daemon/*.o
$(RM) client/_paths.h
$(RM) daemon/_paths.h
.PHONY: distclean
distclean: clean
daemon/main.o: daemon/_paths.h
daemon/io.o: CFLAGS += $(CFLAGS_libxenevtchn) $(CFLAGS_libxengnttab) $(CFLAGS_libxenforeignmemory) $(CONSOLE_CFLAGS-y)
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab) $(LDLIBS_libxenforeignmemory) $(LDLIBS_xenconsoled) $(APPEND_LDFLAGS)
client/main.o: client/_paths.h
xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_xenconsole) $(APPEND_LDFLAGS)
genpath-target = $(call buildmakevars2header,client/_paths.h)
$(eval $(genpath-target))
genpath-target = $(call buildmakevars2header,daemon/_paths.h)
$(eval $(genpath-target))
.PHONY: install
install: $(BIN)
$(INSTALL_DIR) $(DESTDIR)/$(sbindir)
$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir)
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
$(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN)
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(LIBEXEC_BIN)/xenconsole
rm -f $(DESTDIR)$(sbindir)/xenconsoled
-include $(DEPS_INCLUDE)