ia64/xen-unstable

view xen/Rules.mk @ 17062:0769835cf50f

x86 shadow: Reduce scope of shadow lock.

emulate_map_dest doesn't require holding lock, since
only shadow related operation possibly involved is to
remove shadow which is less frequent and can acquire
lock inside. Rest are either guest table walk or
per-vcpu monitor table manipulation

Signed-off-by Kevin Tian <kevin.tian@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 14 10:33:12 2008 +0000 (2008-02-14)
parents d6c12530c69d
children b0d7780794eb
line source
2 #
3 # If you change any of these configuration options then you must
4 # 'make clean' before rebuilding.
5 #
6 verbose ?= n
7 perfc ?= n
8 perfc_arrays ?= n
9 crash_debug ?= n
10 frame_pointer ?= n
12 XEN_ROOT=$(BASEDIR)/..
13 include $(XEN_ROOT)/Config.mk
15 # Hardcoded configuration implications and dependencies.
16 # Do this is a neater way if it becomes unwieldy.
17 ifeq ($(debug),y)
18 verbose := y
19 frame_pointer := y
20 else
21 CFLAGS += -DNDEBUG
22 endif
23 ifeq ($(perfc_arrays),y)
24 perfc := y
25 endif
26 ifeq ($(frame_pointer),y)
27 CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-f[^ ]*omit-frame-pointer//g')
28 endif
30 # Set ARCH/SUBARCH appropriately.
31 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
32 override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
33 sed -e 's/x86.*/x86/' \
34 -e 's/powerpc.*/powerpc/')
36 TARGET := $(BASEDIR)/xen
38 HDRS := $(wildcard *.h)
39 HDRS += $(wildcard $(BASEDIR)/include/xen/*.h)
40 HDRS += $(wildcard $(BASEDIR)/include/xen/hvm/*.h)
41 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
42 HDRS += $(wildcard $(BASEDIR)/include/public/*/*.h)
43 HDRS += $(wildcard $(BASEDIR)/include/compat/*.h)
44 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
45 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
47 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
49 # Do not depend on auto-generated header files.
50 AHDRS := $(filter-out %/include/xen/compile.h,$(HDRS))
51 HDRS := $(filter-out %/asm-offsets.h,$(AHDRS))
53 # Note that link order matters!
54 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
55 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
56 ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o
57 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
59 CFLAGS-y += -g -D__XEN__
60 CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE
61 CFLAGS-$(FLASK_ENABLE) += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
62 CFLAGS-$(FLASK_ENABLE) += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
63 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY -DXSM_MAGIC=0xbcde0100
64 CFLAGS-$(verbose) += -DVERBOSE
65 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
66 CFLAGS-$(perfc) += -DPERF_COUNTERS
67 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
68 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
70 ifneq ($(max_phys_cpus),)
71 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
72 endif
74 AFLAGS-y += -D__ASSEMBLY__
76 ALL_OBJS := $(ALL_OBJS-y)
78 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
80 # Most CFLAGS are safe for assembly files:
81 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
82 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
83 AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
85 # LDFLAGS are only passed directly to $(LD)
86 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
88 include Makefile
90 # Ensure each subdirectory has exactly one trailing slash.
91 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
92 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
94 # Add explicitly declared subdirectories to the object list.
95 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
97 # Add implicitly declared subdirectories (in the object list) to the
98 # subdirectory list, and rewrite the object-list entry.
99 subdir-y += $(filter %/,$(obj-y))
100 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
102 subdir-all := $(subdir-y) $(subdir-n)
104 built_in.o: $(obj-y)
105 $(LD) $(LDFLAGS) -r -o $@ $^
107 # Force execution of pattern rules (for which PHONY cannot be directly used).
108 .PHONY: FORCE
109 FORCE:
111 %/built_in.o: FORCE
112 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
114 .PHONY: clean
115 clean:: $(addprefix _clean_, $(subdir-all))
116 rm -f *.o *~ core
117 _clean_%/: FORCE
118 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
120 %.o: %.c $(HDRS) Makefile
121 $(CC) $(CFLAGS) -c $< -o $@
123 %.o: %.S $(AHDRS) Makefile
124 $(CC) $(AFLAGS) -c $< -o $@
126 %.i: %.c $(HDRS) Makefile
127 $(CPP) $(CFLAGS) $< -o $@
129 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
130 %.s: %.S $(AHDRS) Makefile
131 $(CPP) $(AFLAGS) $< -o $@