ia64/xen-unstable

view xen/Rules.mk @ 15841:c5f735271e22

[IA64] Foreign p2m: Fix vti domain builder.

It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Sep 06 13:48:43 2007 -0600 (2007-09-06)
parents 7e7e0ea6a0bb
children 49323c8b8633
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 endif
21 ifeq ($(perfc_arrays),y)
22 perfc := y
23 endif
24 ifeq ($(frame_pointer),y)
25 CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/-f[^ ]*omit-frame-pointer//g')
26 endif
28 # Set ARCH/SUBARCH appropriately.
29 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
30 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
31 override COMPILE_ARCH := $(shell echo $(XEN_COMPILE_ARCH) | \
32 sed -e 's/x86.*/x86/' \
33 -e 's/powerpc.*/powerpc/')
34 override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
35 sed -e 's/x86.*/x86/' \
36 -e 's/powerpc.*/powerpc/')
38 TARGET := $(BASEDIR)/xen
40 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
41 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
42 HDRS += $(wildcard $(BASEDIR)/include/compat/*.h)
43 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
44 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
46 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
48 # Do not depend on auto-generated header files.
49 AHDRS := $(filter-out %/include/xen/compile.h,$(HDRS))
50 HDRS := $(filter-out %/asm-offsets.h,$(AHDRS))
52 # Note that link order matters!
53 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
54 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
55 ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o
56 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
58 CFLAGS-y += -g -D__XEN__
59 CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE
60 CFLAGS-$(FLASK_ENABLE) += -DFLASK_ENABLE -DXSM_MAGIC=0xf97cff8c
61 CFLAGS-$(FLASK_ENABLE) += -DFLASK_DEVELOP -DFLASK_BOOTPARAM -DFLASK_AVC_STATS
62 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY -DXSM_MAGIC=0xbcde0100
63 CFLAGS-$(verbose) += -DVERBOSE
64 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
65 CFLAGS-$(perfc) += -DPERF_COUNTERS
66 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
67 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
69 ifneq ($(max_phys_cpus),)
70 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
71 endif
73 AFLAGS-y += -D__ASSEMBLY__
75 ALL_OBJS := $(ALL_OBJS-y)
77 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
79 # Most CFLAGS are safe for assembly files:
80 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
81 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
82 AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
84 # LDFLAGS are only passed directly to $(LD)
85 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
87 include Makefile
89 # Ensure each subdirectory has exactly one trailing slash.
90 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
91 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
93 # Add explicitly declared subdirectories to the object list.
94 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
96 # Add implicitly declared subdirectories (in the object list) to the
97 # subdirectory list, and rewrite the object-list entry.
98 subdir-y += $(filter %/,$(obj-y))
99 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
101 subdir-all := $(subdir-y) $(subdir-n)
103 built_in.o: $(obj-y)
104 $(LD) $(LDFLAGS) -r -o $@ $^
106 # Force execution of pattern rules (for which PHONY cannot be directly used).
107 .PHONY: FORCE
108 FORCE:
110 %/built_in.o: FORCE
111 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
113 .PHONY: clean
114 clean:: $(addprefix _clean_, $(subdir-all))
115 rm -f *.o *~ core
116 _clean_%/: FORCE
117 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
119 %.o: %.c $(HDRS) Makefile
120 $(CC) $(CFLAGS) -c $< -o $@
122 %.o: %.S $(AHDRS) Makefile
123 $(CC) $(AFLAGS) -c $< -o $@
125 %.i: %.c $(HDRS) Makefile
126 $(CPP) $(CFLAGS) $< -o $@
128 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
129 %.s: %.S $(AHDRS) Makefile
130 $(CPP) $(AFLAGS) $< -o $@