ia64/xen-unstable

annotate Config.mk @ 16389:270bd0fc3669

xentrace: Fix TypeError handling of xentrace_format.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Nov 16 17:05:20 2007 +0000 (2007-11-16)
parents 1ed990bc8da9
children 822d4ec5cfb1
rev   line source
kaf24@4252 1 # -*- mode: Makefile; -*-
cl349@4443 2
kaf24@9213 3 # A debug build of Xen and tools?
kaf24@9213 4 debug ?= n
kaf24@9213 5
kaf24@10742 6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
keir@16163 7 -e s/ppc/powerpc/ -e s/i86pc/x86_32/ \
keir@16163 8 -e s/amd64/x86_64/)
kaf24@4252 9 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
kfraser@11840 10 XEN_OS ?= $(shell uname -s)
kaf24@4252 11
kfraser@13507 12 ifeq ($(XEN_TARGET_ARCH),x86_32)
kfraser@13507 13 XEN_TARGET_X86_PAE ?= y
kfraser@13507 14 endif
kfraser@13507 15
kfraser@11847 16 CONFIG_$(XEN_OS) := y
kfraser@11847 17
ack@13291 18 SHELL ?= /bin/sh
ack@13291 19
kaf24@4444 20 # Tools to run on system hosting the build
keir@15533 21 HOSTCC = gcc
keir@15533 22 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
keir@15533 23 HOSTCFLAGS += -fno-strict-aliasing
kfraser@15770 24 HOSTCFLAGS_x86_32 = -m32
kfraser@15770 25 HOSTCFLAGS_x86_64 = -m64
kfraser@15770 26 HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH))
kaf24@4252 27
kaf24@7225 28 DISTDIR ?= $(XEN_ROOT)/dist
kaf24@9652 29 DESTDIR ?= /
kaf24@7216 30
kfraser@11840 31 include $(XEN_ROOT)/config/$(XEN_OS).mk
kfraser@10229 32 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
katzj@4544 33
kaf24@4252 34 ifneq ($(EXTRA_PREFIX),)
kaf24@4252 35 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
katzj@4544 36 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
kaf24@4252 37 endif
kaf24@4252 38
kfraser@14589 39 # cc-option: Check if compiler supports first option, else fall back to second.
kfraser@11893 40 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
kfraser@11893 41 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
kfraser@11893 42 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
kaf24@7991 43
kfraser@14589 44 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
keir@14451 45 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
keir@14451 46 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
keir@14451 47 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
keir@14451 48 then echo y; else echo n; fi ;)
keir@14451 49
kfraser@14589 50 # cc-ver-check: Check compiler is at least specified version, else fail.
kfraser@14589 51 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
kfraser@14589 52 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
kfraser@14589 53 define cc-ver-check-closure
kfraser@14589 54 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
kfraser@14589 55 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
kfraser@14589 56 cc-option := n
kfraser@14589 57 endif
kfraser@14589 58 endef
kfraser@14589 59
kfraser@11840 60 ifneq ($(debug),y)
kfraser@11840 61 CFLAGS += -DNDEBUG
kfraser@11840 62 else
kfraser@11840 63 CFLAGS += -g
kfraser@11840 64 endif
kfraser@11840 65
keir@15533 66 CFLAGS += -fno-strict-aliasing
keir@15533 67
kfraser@11872 68 CFLAGS += -std=gnu99
kfraser@11872 69
kaf24@9224 70 CFLAGS += -Wall -Wstrict-prototypes
kaf24@9212 71
kfraser@11835 72 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
kfraser@11835 73 # result of any casted expression causes a warning.
kfraser@11835 74 CFLAGS += -Wno-unused-value
kfraser@11835 75
kfraser@11893 76 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
kfraser@11893 77 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
kaf24@7989 78
kaf24@4252 79 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
kaf24@4252 80 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
iap10@5507 81
kfraser@15815 82 # Enable XSM security module. Enabling XSM requires selection of an
kfraser@15819 83 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
kfraser@15815 84 XSM_ENABLE ?= n
kfraser@15816 85 FLASK_ENABLE ?= n
kaf24@7935 86 ACM_SECURITY ?= n
kaf24@7935 87
josht@6335 88 # Optional components
kfraser@14281 89 XENSTAT_XENTOP ?= y
kfraser@14281 90 VTPM_TOOLS ?= n
jfehlig@12637 91 LIBXENAPI_BINDINGS ?= n
kfraser@14281 92 PYTHON_TOOLS ?= y
kaf24@7216 93
kaf24@7216 94 -include $(XEN_ROOT)/.config