debuggers.hg

annotate Config.mk @ 20996:912295f1b1f3

Update Xen version to 4.0.0-rc4
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 16 18:11:04 2010 +0000 (2010-02-16)
parents 7d565d58f498
children 0fa4ead4ed0f
rev   line source
kaf24@4290 1 # -*- mode: Makefile; -*-
cl349@4481 2
keir@19568 3 # A debug build of Xen and tools?
keir@19977 4 debug ?= y
kaf24@9227 5
kaf24@10721 6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
keir@17637 7 -e s/i86pc/x86_32/ -e s/amd64/x86_64/)
kaf24@4290 8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
kfraser@11805 9 XEN_OS ?= $(shell uname -s)
kaf24@4290 10
kfraser@11812 11 CONFIG_$(XEN_OS) := y
kfraser@11812 12
ack@13293 13 SHELL ?= /bin/sh
ack@13293 14
kaf24@4482 15 # Tools to run on system hosting the build
keir@15535 16 HOSTCC = gcc
keir@15535 17 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
keir@15535 18 HOSTCFLAGS += -fno-strict-aliasing
kaf24@4290 19
kaf24@7254 20 DISTDIR ?= $(XEN_ROOT)/dist
kaf24@9637 21 DESTDIR ?= /
kaf24@7245 22
keir@17317 23 # Allow phony attribute to be listed as dependency rather than fake target
keir@17317 24 .PHONY: .phony
keir@17317 25
kfraser@11805 26 include $(XEN_ROOT)/config/$(XEN_OS).mk
kfraser@10235 27 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
katzj@4582 28
keir@19513 29 SHAREDIR ?= $(PREFIX)/share
keir@19513 30 DOCDIR ?= $(SHAREDIR)/doc/xen
keir@19513 31 MANDIR ?= $(SHAREDIR)/man
keir@19513 32
kaf24@4290 33 ifneq ($(EXTRA_PREFIX),)
kaf24@4290 34 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
keir@16988 35 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
kaf24@4290 36 endif
kaf24@4290 37
keir@19632 38 PYTHON ?= python
keir@19632 39 PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
keir@19632 40 # The above requires that PREFIX contains *no spaces*. This variable is here
keir@19632 41 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
keir@19632 42 # https://bugs.launchpad.net/ubuntu/+bug/362570
keir@19632 43
kfraser@14619 44 # cc-option: Check if compiler supports first option, else fall back to second.
kfraser@11858 45 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
kfraser@11858 46 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
kfraser@11858 47 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
kaf24@8013 48
keir@19068 49 # cc-option-add: Add an option to compilation flags, but only if supported.
keir@19068 50 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
keir@19068 51 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
keir@19068 52 define cc-option-add-closure
keir@19068 53 ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
keir@19068 54 $(1) += $(3)
keir@19068 55 endif
keir@19068 56 endef
keir@19068 57
kfraser@14619 58 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
keir@14458 59 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
keir@14458 60 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
keir@14458 61 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
keir@14458 62 then echo y; else echo n; fi ;)
keir@14458 63
kfraser@14619 64 # cc-ver-check: Check compiler is at least specified version, else fail.
kfraser@14619 65 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
kfraser@14619 66 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
kfraser@14619 67 define cc-ver-check-closure
kfraser@14619 68 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
kfraser@14619 69 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
kfraser@14619 70 cc-option := n
kfraser@14619 71 endif
kfraser@14619 72 endef
kfraser@14619 73
keir@18512 74 define absolutify_xen_root
keir@18512 75 case "$(XEN_ROOT)" in \
keir@18512 76 /*) XEN_ROOT=$(XEN_ROOT) ;; \
keir@18512 77 *) xen_root_lhs=`pwd`; \
keir@18512 78 xen_root_rhs=$(XEN_ROOT)/; \
keir@18512 79 while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \
keir@18512 80 xen_root_rhs="$${xen_root_rhs#../}"; \
keir@18512 81 xen_root_rhs="$${xen_root_rhs#/}"; \
keir@18512 82 xen_root_rhs="$${xen_root_rhs#/}"; \
keir@18512 83 xen_root_lhs="$${xen_root_lhs%/*}"; \
keir@18512 84 done; \
keir@18512 85 XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;; \
keir@18512 86 esac; \
keir@18512 87 export XEN_ROOT
keir@18512 88 endef
keir@18512 89
keir@19856 90 define buildmakevars2shellvars
keir@19856 91 PREFIX="$(PREFIX)"; \
keir@19856 92 XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)"; \
keir@19856 93 export PREFIX; \
keir@19856 94 export XEN_SCRIPT_DIR
keir@19856 95 endef
keir@19856 96
keir@19856 97 buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
keir@19856 98 define buildmakevars2file-closure
keir@19856 99 .PHONY: genpath
keir@19856 100 genpath:
keir@19856 101 rm -f $(1); \
keir@19856 102 echo "SBINDIR=\"$(SBINDIR)\"" >> $(1); \
keir@19856 103 echo "BINDIR=\"$(BINDIR)\"" >> $(1); \
keir@19856 104 echo "LIBEXEC=\"$(LIBEXEC)\"" >> $(1); \
keir@19856 105 echo "LIBDIR=\"$(LIBDIR)\"" >> $(1); \
keir@19874 106 echo "SHAREDIR=\"$(SHAREDIR)\"" >> $(1); \
keir@19856 107 echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> $(1); \
keir@19856 108 echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1); \
keir@19856 109 echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1); \
keir@19856 110 echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1)
keir@19856 111 endef
keir@19856 112
keir@16760 113 ifeq ($(debug),y)
kfraser@11805 114 CFLAGS += -g
kfraser@11805 115 endif
kfraser@11805 116
keir@15535 117 CFLAGS += -fno-strict-aliasing
keir@15535 118
kfraser@11837 119 CFLAGS += -std=gnu99
kfraser@11837 120
kaf24@9238 121 CFLAGS += -Wall -Wstrict-prototypes
kaf24@9226 122
kfraser@11800 123 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
kfraser@11800 124 # result of any casted expression causes a warning.
kfraser@11800 125 CFLAGS += -Wno-unused-value
kfraser@11800 126
keir@19068 127 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
keir@19068 128 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
kaf24@8011 129
kaf24@4290 130 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
kaf24@4290 131 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
iap10@5545 132
kfraser@15846 133 # Enable XSM security module. Enabling XSM requires selection of an
kfraser@15850 134 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
kfraser@15846 135 XSM_ENABLE ?= n
kfraser@15847 136 FLASK_ENABLE ?= n
kaf24@7938 137 ACM_SECURITY ?= n
kaf24@7938 138
keir@19007 139 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
keir@19007 140 # All the files at that location were downloaded from elsewhere on
keir@19007 141 # the internet. The original download URL is preserved as a comment
keir@19007 142 # near the place in the Xen Makefiles where the file is used.
keir@19007 143
keir@20062 144 # GIT protocol can be faster than HTTP, if your firewall lets it through.
keir@20062 145 # QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git
keir@20062 146 QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
keir@17991 147
keir@17991 148 # Specify which qemu-dm to use. This may be `ioemu' to use the old
keir@17991 149 # Mercurial in-tree version, or a local directory, or a git URL.
keir@18549 150 # CONFIG_QEMU ?= ../qemu-xen.git
keir@18549 151 CONFIG_QEMU ?= $(QEMU_REMOTE)
keir@17991 152
keir@20996 153 QEMU_TAG := xen-4.0.0-rc4
keir@20994 154 #QEMU_TAG ?= d463cfee458bacfe1ee3cb9c3b4ce46a6be06edf
keir@20949 155 # Thu Feb 4 17:04:48 2010 +0000
keir@20949 156 # passthrough: support Intel IGD passthrough with VT-D
keir@19730 157
keir@19658 158 OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
keir@19658 159
keir@19658 160 # Build OCAML version of xenstored instead of the in-tree C version?
keir@19658 161 # This will cause $(OCAML_XENSTORED_REPO) to be cloned.
keir@19658 162 CONFIG_OCAML_XENSTORED ?= n
keir@19658 163
josht@6358 164 # Optional components
kfraser@14309 165 XENSTAT_XENTOP ?= y
kfraser@14309 166 VTPM_TOOLS ?= n
jfehlig@12634 167 LIBXENAPI_BINDINGS ?= n
kfraser@14309 168 PYTHON_TOOLS ?= y
keir@16780 169 CONFIG_MINITERM ?= n
keir@16780 170 CONFIG_LOMOUNT ?= n
kaf24@7245 171
kaf24@7245 172 -include $(XEN_ROOT)/.config