ia64/xen-unstable

annotate Config.mk @ 19731:01748ccc4da3

Intel VT-d: fix Stoakley boot issue with iommu=1

Signed-off-by: Weidong Han <Weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 09:25:50 2009 +0100 (2009-06-05)
parents 6e100efd4b48
children 112680f620bf
rev   line source
kaf24@4252 1 # -*- mode: Makefile; -*-
cl349@4443 2
keir@19533 3 # A debug build of Xen and tools?
keir@19533 4 debug ?= n
kaf24@9213 5
kaf24@10742 6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
keir@17617 7 -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
kaf24@4252 8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
kfraser@11840 9 XEN_OS ?= $(shell uname -s)
kaf24@4252 10
kfraser@11847 11 CONFIG_$(XEN_OS) := y
kfraser@11847 12
ack@13291 13 SHELL ?= /bin/sh
ack@13291 14
kaf24@4444 15 # Tools to run on system hosting the build
keir@15533 16 HOSTCC = gcc
keir@15533 17 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
keir@15533 18 HOSTCFLAGS += -fno-strict-aliasing
kaf24@4252 19
kaf24@7225 20 DISTDIR ?= $(XEN_ROOT)/dist
kaf24@9652 21 DESTDIR ?= /
kaf24@7216 22
keir@17303 23 # Allow phony attribute to be listed as dependency rather than fake target
keir@17303 24 .PHONY: .phony
keir@17303 25
kfraser@11840 26 include $(XEN_ROOT)/config/$(XEN_OS).mk
kfraser@10229 27 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
katzj@4544 28
keir@19477 29 SHAREDIR ?= $(PREFIX)/share
keir@19477 30 DOCDIR ?= $(SHAREDIR)/doc/xen
keir@19477 31 MANDIR ?= $(SHAREDIR)/man
keir@19477 32
kaf24@4252 33 ifneq ($(EXTRA_PREFIX),)
kaf24@4252 34 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
keir@16952 35 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
kaf24@4252 36 endif
kaf24@4252 37
keir@19594 38 PYTHON ?= python
keir@19594 39 PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
keir@19594 40 # The above requires that PREFIX contains *no spaces*. This variable is here
keir@19594 41 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
keir@19594 42 # https://bugs.launchpad.net/ubuntu/+bug/362570
keir@19594 43
kfraser@14589 44 # cc-option: Check if compiler supports first option, else fall back to second.
kfraser@11893 45 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
kfraser@11893 46 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
kfraser@11893 47 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
kaf24@7991 48
keir@19031 49 # cc-option-add: Add an option to compilation flags, but only if supported.
keir@19031 50 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
keir@19031 51 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
keir@19031 52 define cc-option-add-closure
keir@19031 53 ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
keir@19031 54 $(1) += $(3)
keir@19031 55 endif
keir@19031 56 endef
keir@19031 57
kfraser@14589 58 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
keir@14451 59 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
keir@14451 60 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
keir@14451 61 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
keir@14451 62 then echo y; else echo n; fi ;)
keir@14451 63
kfraser@14589 64 # cc-ver-check: Check compiler is at least specified version, else fail.
kfraser@14589 65 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
kfraser@14589 66 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
kfraser@14589 67 define cc-ver-check-closure
kfraser@14589 68 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
kfraser@14589 69 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
kfraser@14589 70 cc-option := n
kfraser@14589 71 endif
kfraser@14589 72 endef
kfraser@14589 73
keir@18488 74 define absolutify_xen_root
keir@18488 75 case "$(XEN_ROOT)" in \
keir@18488 76 /*) XEN_ROOT=$(XEN_ROOT) ;; \
keir@18488 77 *) xen_root_lhs=`pwd`; \
keir@18488 78 xen_root_rhs=$(XEN_ROOT)/; \
keir@18488 79 while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \
keir@18488 80 xen_root_rhs="$${xen_root_rhs#../}"; \
keir@18488 81 xen_root_rhs="$${xen_root_rhs#/}"; \
keir@18488 82 xen_root_rhs="$${xen_root_rhs#/}"; \
keir@18488 83 xen_root_lhs="$${xen_root_lhs%/*}"; \
keir@18488 84 done; \
keir@18488 85 XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;; \
keir@18488 86 esac; \
keir@18488 87 export XEN_ROOT
keir@18488 88 endef
keir@18488 89
keir@16722 90 ifeq ($(debug),y)
kfraser@11840 91 CFLAGS += -g
kfraser@11840 92 endif
kfraser@11840 93
keir@15533 94 CFLAGS += -fno-strict-aliasing
keir@15533 95
kfraser@11872 96 CFLAGS += -std=gnu99
kfraser@11872 97
kaf24@9224 98 CFLAGS += -Wall -Wstrict-prototypes
kaf24@9212 99
kfraser@11835 100 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
kfraser@11835 101 # result of any casted expression causes a warning.
kfraser@11835 102 CFLAGS += -Wno-unused-value
kfraser@11835 103
keir@19031 104 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
keir@19031 105 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
kaf24@7989 106
kaf24@4252 107 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
kaf24@4252 108 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
iap10@5507 109
kfraser@15815 110 # Enable XSM security module. Enabling XSM requires selection of an
kfraser@15819 111 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
kfraser@15815 112 XSM_ENABLE ?= n
kfraser@15816 113 FLASK_ENABLE ?= n
kaf24@7935 114 ACM_SECURITY ?= n
kaf24@7935 115
keir@18986 116 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
keir@18986 117 # All the files at that location were downloaded from elsewhere on
keir@18986 118 # the internet. The original download URL is preserved as a comment
keir@18986 119 # near the place in the Xen Makefiles where the file is used.
keir@18986 120
keir@18007 121 QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
keir@17956 122
keir@17956 123 # Specify which qemu-dm to use. This may be `ioemu' to use the old
keir@17956 124 # Mercurial in-tree version, or a local directory, or a git URL.
keir@18514 125 # CONFIG_QEMU ?= ../qemu-xen.git
keir@18514 126 CONFIG_QEMU ?= $(QEMU_REMOTE)
keir@17956 127
keir@19710 128 QEMU_TAG ?= c9c1a645fcfdba8c4a15a56e29d5ea7b7bcd7aa6
keir@19710 129 # Wed Jun 3 15:47:52 2009 +0100
keir@19710 130 # add a few missing statics and consts
keir@19692 131
keir@19620 132 OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
keir@19620 133
keir@19620 134 # Build OCAML version of xenstored instead of the in-tree C version?
keir@19620 135 # This will cause $(OCAML_XENSTORED_REPO) to be cloned.
keir@19620 136 CONFIG_OCAML_XENSTORED ?= n
keir@19620 137
josht@6335 138 # Optional components
kfraser@14281 139 XENSTAT_XENTOP ?= y
kfraser@14281 140 VTPM_TOOLS ?= n
jfehlig@12637 141 LIBXENAPI_BINDINGS ?= n
kfraser@14281 142 PYTHON_TOOLS ?= y
keir@16742 143 CONFIG_MINITERM ?= n
keir@16742 144 CONFIG_LOMOUNT ?= n
kaf24@7216 145
kaf24@7216 146 -include $(XEN_ROOT)/.config