debuggers.hg

view Config.mk @ 19994:33447a5c6851

Use git smart server protocol for qemu tree by default

xenbits supports the git protocol now, which is much faster (and
produces less noise in the build log too).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 20 10:02:50 2009 +0100 (2009-07-20)
parents eac682b9c7bc
children 6e8f7f2a8f38
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= y
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 PYTHON ?= python
39 PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
40 # The above requires that PREFIX contains *no spaces*. This variable is here
41 # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
42 # https://bugs.launchpad.net/ubuntu/+bug/362570
44 # cc-option: Check if compiler supports first option, else fall back to second.
45 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
46 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
47 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
49 # cc-option-add: Add an option to compilation flags, but only if supported.
50 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
51 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
52 define cc-option-add-closure
53 ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
54 $(1) += $(3)
55 endif
56 endef
58 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
59 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
60 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
61 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
62 then echo y; else echo n; fi ;)
64 # cc-ver-check: Check compiler is at least specified version, else fail.
65 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
66 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
67 define cc-ver-check-closure
68 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
69 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
70 cc-option := n
71 endif
72 endef
74 define absolutify_xen_root
75 case "$(XEN_ROOT)" in \
76 /*) XEN_ROOT=$(XEN_ROOT) ;; \
77 *) xen_root_lhs=`pwd`; \
78 xen_root_rhs=$(XEN_ROOT)/; \
79 while [ "x$${xen_root_rhs#../}" != "x$$xen_root_rhs" ]; do \
80 xen_root_rhs="$${xen_root_rhs#../}"; \
81 xen_root_rhs="$${xen_root_rhs#/}"; \
82 xen_root_rhs="$${xen_root_rhs#/}"; \
83 xen_root_lhs="$${xen_root_lhs%/*}"; \
84 done; \
85 XEN_ROOT="$$xen_root_lhs/$$xen_root_rhs" ;; \
86 esac; \
87 export XEN_ROOT
88 endef
90 define buildmakevars2shellvars
91 PREFIX="$(PREFIX)"; \
92 XEN_SCRIPT_DIR="$(XEN_SCRIPT_DIR)"; \
93 export PREFIX; \
94 export XEN_SCRIPT_DIR
95 endef
97 buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
98 define buildmakevars2file-closure
99 .PHONY: genpath
100 genpath:
101 rm -f $(1); \
102 echo "SBINDIR=\"$(SBINDIR)\"" >> $(1); \
103 echo "BINDIR=\"$(BINDIR)\"" >> $(1); \
104 echo "LIBEXEC=\"$(LIBEXEC)\"" >> $(1); \
105 echo "LIBDIR=\"$(LIBDIR)\"" >> $(1); \
106 echo "SHAREDIR=\"$(SHAREDIR)\"" >> $(1); \
107 echo "PRIVATE_BINDIR=\"$(PRIVATE_BINDIR)\"" >> $(1); \
108 echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1); \
109 echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1); \
110 echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1)
111 endef
113 ifeq ($(debug),y)
114 CFLAGS += -g
115 endif
117 CFLAGS += -fno-strict-aliasing
119 CFLAGS += -std=gnu99
121 CFLAGS += -Wall -Wstrict-prototypes
123 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
124 # result of any casted expression causes a warning.
125 CFLAGS += -Wno-unused-value
127 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
128 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
130 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
131 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
133 # Enable XSM security module. Enabling XSM requires selection of an
134 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
135 XSM_ENABLE ?= n
136 FLASK_ENABLE ?= n
137 ACM_SECURITY ?= n
139 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
140 # All the files at that location were downloaded from elsewhere on
141 # the internet. The original download URL is preserved as a comment
142 # near the place in the Xen Makefiles where the file is used.
144 QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git
146 # Specify which qemu-dm to use. This may be `ioemu' to use the old
147 # Mercurial in-tree version, or a local directory, or a git URL.
148 # CONFIG_QEMU ?= ../qemu-xen.git
149 CONFIG_QEMU ?= $(QEMU_REMOTE)
151 QEMU_TAG ?= 5cc34ea27f1cbd1a0560cfca91fb89ccd6d5726f
152 # Thu Jul 9 15:33:48 2009 +0100
153 # portability fixes for qemu-ifup
155 OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
157 # Build OCAML version of xenstored instead of the in-tree C version?
158 # This will cause $(OCAML_XENSTORED_REPO) to be cloned.
159 CONFIG_OCAML_XENSTORED ?= n
161 # Optional components
162 XENSTAT_XENTOP ?= y
163 VTPM_TOOLS ?= n
164 LIBXENAPI_BINDINGS ?= n
165 PYTHON_TOOLS ?= y
166 CONFIG_MINITERM ?= n
167 CONFIG_LOMOUNT ?= n
169 -include $(XEN_ROOT)/.config