aboutsummaryrefslogtreecommitdiffstats
path: root/Config.mk
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-17 16:48:05 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-17 16:48:05 +0100
commita278bc0ea1507c7241733804bb66fdb90cc44e6f (patch)
treeb472df5441e4d0d0157813534017319a8e615f20 /Config.mk
parent6f007b178f8d71d8d84adfc2f1403ca38a31ab3a (diff)
downloadxen-a278bc0ea1507c7241733804bb66fdb90cc44e6f.tar.gz
xen-a278bc0ea1507c7241733804bb66fdb90cc44e6f.tar.bz2
xen-a278bc0ea1507c7241733804bb66fdb90cc44e6f.zip
Introduce Makefile config fragments for OS-specific differences.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'Config.mk')
-rw-r--r--Config.mk39
1 files changed, 9 insertions, 30 deletions
diff --git a/Config.mk b/Config.mk
index 92c829dede..5154d4b135 100644
--- a/Config.mk
+++ b/Config.mk
@@ -4,43 +4,19 @@
debug ?= n
XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
- -e s/ppc/powerpc/)
+ -e s/ppc/powerpc/ -e s/i86pc/x86_32/)
XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
XEN_TARGET_X86_PAE ?= n
+XEN_OS ?= $(shell uname -s)
# 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
-# Less than -O1 produces bad code and large stack frames
-CFLAGS ?= -O1 -fno-omit-frame-pointer
-CFLAGS += -g
-endif
-
+include $(XEN_ROOT)/config/$(XEN_OS).mk
include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
ifneq ($(EXTRA_PREFIX),)
@@ -50,6 +26,12 @@ endif
test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
+ifneq ($(debug),y)
+CFLAGS += -DNDEBUG
+else
+CFLAGS += -g
+endif
+
CFLAGS += -Wall -Wstrict-prototypes
# -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
@@ -62,9 +44,6 @@ 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