ia64/xen-unstable

annotate Config.mk @ 16822:60ee6f97cb19

x86, xenoprof: Support Intel Penryn processors.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>=20
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 21 13:08:44 2008 +0000 (2008-01-21)
parents acb35c1088fd
children 226de1674b2f
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
keir@16722 60 ifeq ($(debug),y)
kfraser@11840 61 CFLAGS += -g
kfraser@11840 62 endif
kfraser@11840 63
keir@15533 64 CFLAGS += -fno-strict-aliasing
keir@15533 65
kfraser@11872 66 CFLAGS += -std=gnu99
kfraser@11872 67
kaf24@9224 68 CFLAGS += -Wall -Wstrict-prototypes
kaf24@9212 69
kfraser@11835 70 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
kfraser@11835 71 # result of any casted expression causes a warning.
kfraser@11835 72 CFLAGS += -Wno-unused-value
kfraser@11835 73
kfraser@11893 74 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
kfraser@11893 75 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
kaf24@7989 76
kaf24@4252 77 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
kaf24@4252 78 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
iap10@5507 79
kfraser@15815 80 # Enable XSM security module. Enabling XSM requires selection of an
kfraser@15819 81 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
kfraser@15815 82 XSM_ENABLE ?= n
kfraser@15816 83 FLASK_ENABLE ?= n
kaf24@7935 84 ACM_SECURITY ?= n
kaf24@7935 85
josht@6335 86 # Optional components
kfraser@14281 87 XENSTAT_XENTOP ?= y
kfraser@14281 88 VTPM_TOOLS ?= n
jfehlig@12637 89 LIBXENAPI_BINDINGS ?= n
kfraser@14281 90 PYTHON_TOOLS ?= y
keir@16742 91 CONFIG_MINITERM ?= n
keir@16742 92 CONFIG_LOMOUNT ?= n
kaf24@7216 93
kaf24@7216 94 -include $(XEN_ROOT)/.config