ia64/xen-unstable

view Config.mk @ 19590:f80cf52a4fb6

Update Xen version for 3.4.0-rc4-pre
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 30 14:34:15 2009 +0100 (2009-04-30)
parents 22e01301ff64
children bf946cc3008b
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
9 XEN_OS ?= $(shell uname -s)
11 CONFIG_$(XEN_OS) := y
13 SHELL ?= /bin/sh
15 # Tools to run on system hosting the build
16 HOSTCC = gcc
17 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
18 HOSTCFLAGS += -fno-strict-aliasing
20 DISTDIR ?= $(XEN_ROOT)/dist
21 DESTDIR ?= /
23 # Allow phony attribute to be listed as dependency rather than fake target
24 .PHONY: .phony
26 include $(XEN_ROOT)/config/$(XEN_OS).mk
27 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
29 SHAREDIR ?= $(PREFIX)/share
30 DOCDIR ?= $(SHAREDIR)/doc/xen
31 MANDIR ?= $(SHAREDIR)/man
33 ifneq ($(EXTRA_PREFIX),)
34 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
35 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
36 endif
38 # cc-option: Check if compiler supports first option, else fall back to second.
39 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
40 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
41 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
43 # cc-option-add: Add an option to compilation flags, but only if supported.
44 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
45 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
46 define cc-option-add-closure
47 ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
48 $(1) += $(3)
49 endif
50 endef
52 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
53 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
54 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
55 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
56 then echo y; else echo n; fi ;)
58 # cc-ver-check: Check compiler is at least specified version, else fail.
59 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
60 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
61 define cc-ver-check-closure
62 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
63 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
64 cc-option := n
65 endif
66 endef
68 define absolutify_xen_root
69 case "$(XEN_ROOT)" in \
70 /*) XEN_ROOT=$(XEN_ROOT) ;; \
71 *) xen_root_lhs=`pwd`; \
72 xen_root_rhs=$(XEN_ROOT)/; \
73 while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \
74 xen_root_rhs="$${xen_root_rhs#../}"; \
75 xen_root_rhs="$${xen_root_rhs#/}"; \
76 xen_root_rhs="$${xen_root_rhs#/}"; \
77 xen_root_lhs="$${xen_root_lhs%/*}"; \
78 done; \
79 XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;; \
80 esac; \
81 export XEN_ROOT
82 endef
84 ifeq ($(debug),y)
85 CFLAGS += -g
86 endif
88 CFLAGS += -fno-strict-aliasing
90 CFLAGS += -std=gnu99
92 CFLAGS += -Wall -Wstrict-prototypes
94 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
95 # result of any casted expression causes a warning.
96 CFLAGS += -Wno-unused-value
98 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
99 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
101 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
102 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
104 # Enable XSM security module. Enabling XSM requires selection of an
105 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
106 XSM_ENABLE ?= n
107 FLASK_ENABLE ?= n
108 ACM_SECURITY ?= n
110 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
111 # All the files at that location were downloaded from elsewhere on
112 # the internet. The original download URL is preserved as a comment
113 # near the place in the Xen Makefiles where the file is used.
115 QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
117 # Specify which qemu-dm to use. This may be `ioemu' to use the old
118 # Mercurial in-tree version, or a local directory, or a git URL.
119 # CONFIG_QEMU ?= ../qemu-xen.git
120 CONFIG_QEMU ?= $(QEMU_REMOTE)
122 # Optional components
123 XENSTAT_XENTOP ?= y
124 VTPM_TOOLS ?= n
125 LIBXENAPI_BINDINGS ?= n
126 PYTHON_TOOLS ?= y
127 CONFIG_MINITERM ?= n
128 CONFIG_LOMOUNT ?= n
130 -include $(XEN_ROOT)/.config