ia64/xen-unstable

view xen/Rules.mk @ 8723:61e7afb7344b

The memset in init_switch_stack is overwriting the processor stack.
We need to avoid manipulating the switch stack area of the currently
running cpu. Original patch by Kevin Tian.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Feb 01 00:56:19 2006 +0100 (2006-02-01)
parents f1b361b05bf3
children 2687e3fc5dd4
line source
1 #
2 # If you change any of these configuration options then you must
3 # 'make clean' before rebuilding.
4 #
5 verbose ?= n
6 debug ?= n
7 perfc ?= n
8 perfc_arrays?= n
9 crash_debug ?= n
11 XEN_ROOT=$(BASEDIR)/..
12 include $(XEN_ROOT)/Config.mk
14 # Set ARCH/SUBARCH appropriately.
15 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
16 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
17 override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
18 override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
20 TARGET := $(BASEDIR)/xen
21 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
22 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
23 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
24 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
25 # Do not depend on auto-generated header files.
26 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
27 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
28 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
30 C_SRCS := $(wildcard *.c)
31 S_SRCS := $(wildcard *.S)
32 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
33 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
35 # Note that link order matters!
36 ALL_OBJS := $(BASEDIR)/common/common.o
37 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
38 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
39 ifeq ($(ACM_SECURITY),y)
40 ALL_OBJS += $(BASEDIR)/acm/acm.o
41 CFLAGS += -DACM_SECURITY
42 endif
43 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
45 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
47 ifneq ($(debug),y)
48 CFLAGS += -DNDEBUG
49 ifeq ($(verbose),y)
50 CFLAGS += -DVERBOSE
51 endif
52 else
53 CFLAGS += -g -DVERBOSE
54 endif
56 # There is no real reason to compile without it
57 CFLAGS += -g
59 ifeq ($(crash_debug),y)
60 CFLAGS += -g -DCRASH_DEBUG
61 endif
63 ifeq ($(perfc),y)
64 CFLAGS += -DPERF_COUNTERS
65 ifeq ($(perfc_arrays),y)
66 CFLAGS += -DPERF_ARRAYS
67 endif
68 endif
70 CFLAGS := $(strip $(CFLAGS))
72 %.o: %.c $(HDRS) Makefile
73 $(CC) $(CFLAGS) -c $< -o $@
75 %.o: %.S $(HDRS) Makefile
76 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@