Files
xen/Config.mk
T
kaf24@firebug.cl.cam.ac.uk 4886bb64c1 build: Make sure that DESTDIR is set
In the case where XEN_PYTHON_NATIVE_INSTALL is in effect,
if DESTDIR is not set then the install will go into a relative
directory rather than under the default prefix (usually /usr).

An alternate solution would be to update the fragments
that do the python install to use $(DESTDIR)/ instead of
$(DESTDIR). This is not an incredible burden as there
are only two such fragments in the tree. However, it
seems prone to error as new makefiles are created
in the future.

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 16:31:53 +01:00

96 lines
2.4 KiB
Makefile

# -*- mode: Makefile; -*-
# A debug build of Xen and tools?
debug ?= n
# Currently supported architectures: x86_32, x86_64
XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/)
XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
XEN_TARGET_X86_PAE ?= n
# Tools to run on system hosting the build
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CPP = $(CROSS_COMPILE)gcc -E
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /
INSTALL = install
INSTALL_DIR = $(INSTALL) -d -m0755
INSTALL_DATA = $(INSTALL) -m0644
INSTALL_PROG = $(INSTALL) -m0755
ifneq ($(debug),y)
# Optimisation flags are overridable
CFLAGS ?= -O2 -fomit-frame-pointer
CFLAGS += -DNDEBUG
else
CFLAGS += -g
endif
ifeq ($(XEN_TARGET_ARCH),x86_32)
CFLAGS += -m32 -march=i686
endif
ifeq ($(XEN_TARGET_ARCH),x86_64)
CFLAGS += -m64
endif
ifeq ($(XEN_TARGET_ARCH),x86_64)
LIBDIR = lib64
else
LIBDIR = lib
endif
ifneq ($(EXTRA_PREFIX),)
EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
endif
test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
CFLAGS += -Wall -Wstrict-prototypes
HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement)
CFLAGS += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement)
LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
# Choose the best mirror to download linux kernel
KERNEL_REPO = http://www.kernel.org
# If ACM_SECURITY = y, then the access control module is compiled
# into Xen and the policy type can be set by the boot policy file
# y - Build the Xen ACM framework
# n - Do not build the Xen ACM framework
ACM_SECURITY ?= n
# If ACM_SECURITY = y and no boot policy file is installed,
# then the ACM defaults to the security policy set by
# ACM_DEFAULT_SECURITY_POLICY
# Supported models are:
# ACM_NULL_POLICY
# ACM_CHINESE_WALL_POLICY
# ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
# ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
ACM_DEFAULT_SECURITY_POLICY ?= ACM_NULL_POLICY
# Optional components
XENSTAT_XENTOP ?= y
VTPM_TOOLS ?= n
-include $(XEN_ROOT)/.config