ia64/xen-unstable

view Config.mk @ 11835:db3d58d30e9d

Don't use -Wunused-value. It's too aggressive with GCC4.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Oct 17 15:53:42 2006 +0100 (2006-10-17)
parents ed20a5addce4
children be8039f8bc14
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/ppc/powerpc/)
8 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
9 XEN_TARGET_X86_PAE ?= n
11 # Tools to run on system hosting the build
12 HOSTCC = gcc
13 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
15 AS = $(CROSS_COMPILE)as
16 LD = $(CROSS_COMPILE)ld
17 CC = $(CROSS_COMPILE)gcc
18 CPP = $(CROSS_COMPILE)gcc -E
19 AR = $(CROSS_COMPILE)ar
20 RANLIB = $(CROSS_COMPILE)ranlib
21 NM = $(CROSS_COMPILE)nm
22 STRIP = $(CROSS_COMPILE)strip
23 OBJCOPY = $(CROSS_COMPILE)objcopy
24 OBJDUMP = $(CROSS_COMPILE)objdump
26 DISTDIR ?= $(XEN_ROOT)/dist
27 DESTDIR ?= /
29 INSTALL = install
30 INSTALL_DIR = $(INSTALL) -d -m0755
31 INSTALL_DATA = $(INSTALL) -m0644
32 INSTALL_PROG = $(INSTALL) -m0755
34 ifneq ($(debug),y)
35 # Optimisation flags are overridable
36 CFLAGS ?= -O2 -fomit-frame-pointer
37 CFLAGS += -DNDEBUG
38 else
39 # Less than -O1 produces bad code and large stack frames
40 CFLAGS ?= -O1 -fno-omit-frame-pointer
41 CFLAGS += -g
42 endif
44 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
46 ifneq ($(EXTRA_PREFIX),)
47 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
48 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
49 endif
51 test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
53 CFLAGS += -Wall -Wstrict-prototypes
55 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
56 # result of any casted expression causes a warning.
57 CFLAGS += -Wno-unused-value
59 HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement)
60 CFLAGS += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement)
62 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
63 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
65 # Choose the best mirror to download linux kernel
66 KERNEL_REPO = http://www.kernel.org
68 # If ACM_SECURITY = y, then the access control module is compiled
69 # into Xen and the policy type can be set by the boot policy file
70 # y - Build the Xen ACM framework
71 # n - Do not build the Xen ACM framework
72 ACM_SECURITY ?= n
74 # If ACM_SECURITY = y and no boot policy file is installed,
75 # then the ACM defaults to the security policy set by
76 # ACM_DEFAULT_SECURITY_POLICY
77 # Supported models are:
78 # ACM_NULL_POLICY
79 # ACM_CHINESE_WALL_POLICY
80 # ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
81 # ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
82 ACM_DEFAULT_SECURITY_POLICY ?= ACM_NULL_POLICY
84 # Optional components
85 XENSTAT_XENTOP ?= y
87 VTPM_TOOLS ?= n
89 -include $(XEN_ROOT)/.config