direct-io.hg

view xen/Rules.mk @ 12477:7f7aeaa0cba6

[HVMLOADEr] Reserve MMIO 0xa0000 to 0xc0000 in ACPI dsdt.

Avoids possible vga driver loading problem in HVM Windows guest.
Also fixes a Makefile bug in hvmloader directory.

Signed-off-by: Qing He <qing.he@intel.com>
author kfraser@localhost.localdomain
date Fri Nov 17 10:02:54 2006 +0000 (2006-11-17)
parents 3409c35a0b0e
children e98b092c2057
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
11 XEN_ROOT=$(BASEDIR)/..
12 include $(XEN_ROOT)/Config.mk
14 # Hardcoded configuration implications and dependencies.
15 # Do this is a neater way if it becomes unwieldy.
16 ifeq ($(debug),y)
17 verbose := y
18 endif
19 ifeq ($(perfc_arrays),y)
20 perfc := y
21 endif
23 # Set ARCH/SUBARCH appropriately.
24 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
25 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
26 override COMPILE_ARCH := $(shell echo $(XEN_COMPILE_ARCH) | \
27 sed -e 's/x86.*/x86/' \
28 -e 's/powerpc.*/powerpc/')
29 override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
30 sed -e 's/x86.*/x86/' \
31 -e 's/powerpc.*/powerpc/')
33 TARGET := $(BASEDIR)/xen
35 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
36 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
37 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
38 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
40 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
42 # Do not depend on auto-generated header files.
43 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
44 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
46 # Note that link order matters!
47 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
48 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
49 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
50 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
52 CFLAGS-y += -g -D__XEN__
53 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
54 CFLAGS-$(verbose) += -DVERBOSE
55 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
56 CFLAGS-$(perfc) += -DPERF_COUNTERS
57 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
59 ifneq ($(max_phys_cpus),)
60 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
61 endif
63 AFLAGS-y += -D__ASSEMBLY__
65 ALL_OBJS := $(ALL_OBJS-y)
67 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
69 # Most CFLAGS are safe for assembly files:
70 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
71 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
72 AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
74 # LDFLAGS are only passed directly to $(LD)
75 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
77 include Makefile
79 # Ensure each subdirectory has exactly one trailing slash.
80 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
81 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
83 # Add explicitly declared subdirectories to the object list.
84 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
86 # Add implicitly declared subdirectories (in the object list) to the
87 # subdirectory list, and rewrite the object-list entry.
88 subdir-y += $(filter %/,$(obj-y))
89 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
91 subdir-all := $(subdir-y) $(subdir-n)
93 built_in.o: $(obj-y)
94 $(LD) $(LDFLAGS) -r -o $@ $^
96 # Force execution of pattern rules (for which PHONY cannot be directly used).
97 .PHONY: FORCE
98 FORCE:
100 %/built_in.o: FORCE
101 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
103 .PHONY: clean
104 clean:: $(addprefix _clean_, $(subdir-all))
105 rm -f *.o *~ core
106 _clean_%/: FORCE
107 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
109 %.o: %.c $(HDRS) Makefile
110 $(CC) $(CFLAGS) -c $< -o $@
112 %.o: %.S $(HDRS) Makefile
113 $(CC) $(AFLAGS) -c $< -o $@
115 %.i: %.c $(HDRS) Makefile
116 $(CPP) $(CFLAGS) $< -o $@
118 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
119 %.s: %.S $(HDRS) Makefile
120 $(CPP) $(AFLAGS) $< -o $@