From 16504669c5cbb8b195d20412aadc838da5c428f7 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 30 Aug 2005 13:15:20 +0000 Subject: [PATCH] Cross-compilation fixes. Signed-off-by: Michal Ostrowski --- tools/Makefile | 8 ++++++-- tools/console/Makefile | 3 +-- tools/examples/Makefile | 3 +++ tools/xcs/Makefile | 3 +-- tools/xcutils/Makefile | 2 -- tools/xenstat/Makefile | 4 ++++ 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index e9a9d3c482..57b63ae5f4 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -7,15 +7,19 @@ SUBDIRS += xenstore SUBDIRS += misc SUBDIRS += examples SUBDIRS += xentrace -SUBDIRS += python SUBDIRS += xcs SUBDIRS += xcutils -#SUBDIRS += pygrub SUBDIRS += firmware SUBDIRS += security SUBDIRS += console SUBDIRS += xenstat +# These don't cross-compile +ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) +SUBDIRS += python +#SUBDIRS += pygrub +endif + .PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean all: check diff --git a/tools/console/Makefile b/tools/console/Makefile index 35bac3aaf9..cd88497f5f 100644 --- a/tools/console/Makefile +++ b/tools/console/Makefile @@ -9,8 +9,7 @@ INSTALL = install INSTALL_PROG = $(INSTALL) -m0755 INSTALL_DIR = $(INSTALL) -d -m0755 -CC = gcc -CFLAGS = -Wall -Werror -g3 +CFLAGS += -Wall -Werror -g3 CFLAGS += -I $(XEN_XCS) CFLAGS += -I $(XEN_LIBXC) diff --git a/tools/examples/Makefile b/tools/examples/Makefile index 5513807d47..c196978f85 100644 --- a/tools/examples/Makefile +++ b/tools/examples/Makefile @@ -1,3 +1,6 @@ +XEN_ROOT = ../../ +include $(XEN_ROOT)/tools/Rules.mk + INSTALL = install INSTALL_DIR = $(INSTALL) -d -m0755 INSTALL_PROG = $(INSTALL) -m0755 diff --git a/tools/xcs/Makefile b/tools/xcs/Makefile index ad08e1c23d..46e875ffe6 100644 --- a/tools/xcs/Makefile +++ b/tools/xcs/Makefile @@ -10,8 +10,7 @@ INSTALL = install INSTALL_PROG = $(INSTALL) -m0755 INSTALL_DIR = $(INSTALL) -d -m0755 -CC = gcc -CFLAGS = -Wall -Werror -g3 -D _XOPEN_SOURCE=600 +CFLAGS += -Wall -Werror -g3 -D _XOPEN_SOURCE=600 CFLAGS += -I $(XEN_XC) CFLAGS += -I $(XEN_LIBXC) diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile index 77343b71e8..2a0d13b4ce 100644 --- a/tools/xcutils/Makefile +++ b/tools/xcutils/Makefile @@ -19,8 +19,6 @@ PROGRAMS_INSTALL_DIR = /usr/libexec/xen INCLUDES += -I $(XEN_LIBXC) -CC := gcc - CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing CFLAGS += $(INCLUDES) diff --git a/tools/xenstat/Makefile b/tools/xenstat/Makefile index 4caec1a6da..1daa628bcb 100644 --- a/tools/xenstat/Makefile +++ b/tools/xenstat/Makefile @@ -3,7 +3,11 @@ include $(XEN_ROOT)/tools/Rules.mk SUBDIRS := SUBDIRS += libxenstat + +# This doesn't cross-compile (cross-compile environments rarely have curses) +ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) SUBDIRS += xentop +endif .PHONY: all install clean -- 2.30.2