mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
pygrub currently has a hardcoded path of /usr/bin/python which is not correct if the version of python at install time is not the same as that at build time. This patch uses the existing install-wrap and python/get-path machinery. (It does not address the currently-existing bug that the get-path machinery works by assuming that `python' is a symlink, rather than querying the python interpreter for its version.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
XEN_ROOT=../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
|
|
INCLUDES += -I $(XEN_XC)
|
|
INCLUDES += -I $(XEN_LIBXC)
|
|
INCLUDES += -I $(XEN_INCLUDE)
|
|
CFLAGS += $(INCLUDES)
|
|
|
|
HDRS = $(wildcard *.h)
|
|
|
|
TARGETS-y := xenperf xenpm xen-tmem-list-parse gtraceview gtracestat
|
|
TARGETS-$(CONFIG_X86) += xen-detect xen-hvmctx
|
|
TARGETS := $(TARGETS-y)
|
|
|
|
SUBDIRS-$(CONFIG_LOMOUNT) += lomount
|
|
SUBDIRS-$(CONFIG_MINITERM) += miniterm
|
|
SUBDIRS := $(SUBDIRS-y)
|
|
|
|
INSTALL_BIN-y := xencons
|
|
INSTALL_BIN-$(CONFIG_X86) += xen-detect
|
|
INSTALL_BIN := $(INSTALL_BIN-y)
|
|
|
|
INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview xenpm xen-tmem-list-parse gtraceview gtracestat
|
|
INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx
|
|
INSTALL_SBIN := $(INSTALL_SBIN-y)
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build: $(TARGETS)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d; done
|
|
|
|
.PHONY: install
|
|
install: build
|
|
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
|
|
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
|
|
$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
|
|
$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.o $(TARGETS) *~ $(DEPS)
|
|
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d clean; done
|
|
|
|
%.o: %.c $(HDRS) Makefile
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
xen-hvmctx xenperf xenpm gtracestat: %: %.o Makefile
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl)
|
|
|
|
gtraceview: %: %.o Makefile
|
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(CURSES_LIBS)
|
|
|
|
-include $(DEPS)
|