aboutsummaryrefslogtreecommitdiffstats
path: root/Config.mk
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-09 22:31:45 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-09 22:31:45 +0100
commitd27fbb006132147f73795ca4ad60a0e38b050b58 (patch)
tree3c3bc0319cb6cd84555d44e1aa98c2f8050c8f57 /Config.mk
parent326450f67e011c6cb6ced17c8dcb5e7a8442057d (diff)
downloadxen-d27fbb006132147f73795ca4ad60a0e38b050b58.tar.gz
xen-d27fbb006132147f73795ca4ad60a0e38b050b58.tar.bz2
xen-d27fbb006132147f73795ca4ad60a0e38b050b58.zip
Move 'debug' build option into the outermost Config.mk file.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'Config.mk')
-rw-r--r--Config.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/Config.mk b/Config.mk
index 180f932fc1..a7c975d2bc 100644
--- a/Config.mk
+++ b/Config.mk
@@ -1,5 +1,8 @@
# -*- 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)
@@ -9,6 +12,14 @@ XEN_TARGET_X86_PAE ?= n
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+ifneq ($(debug),y)
+# Optimisation flags are overridable
+CFLAGS ?= -O3 -fomit-frame-pointer
+CFLAGS += -DNDEBUG
+else
+CFLAGS += -g
+endif
+
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc