ia64/xen-unstable

view xen/Rules.mk @ 9917:42c73f3d7ac1

This patch changes to format in which EIP is printed to be consistent on 64-bit regardless of whether the addresses
leading bits are set or clear. It additionally changes the formatting so that trailing spaces are avoided, and it
suppresses the printing of empty records. It also prevents combining records with identical EIP but from different
domains.

It further changes the type of some variables from plain int to unsigned int, as that is yielding more efficient code
on x86-64 (signed 32-bit array indices require explicit sign extension, whereas in most cases an extra copy can be
avoided when the index type is unsigned, since all 32-bit operations already zero-extend their results).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 02 15:36:07 2006 +0100 (2006-05-02)
parents b454a09cddb1
children 35a29c8f0bab
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 # Hardcoded configuration implications and dependencies.
12 # Do this is a neater way if it becomes unwieldy.
13 ifeq ($(debug),y)
14 verbose := y
15 endif
16 ifeq ($(perfc_arrays),y)
17 perfc := y
18 endif
20 XEN_ROOT=$(BASEDIR)/..
21 include $(XEN_ROOT)/Config.mk
23 # Set ARCH/SUBARCH appropriately.
24 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
25 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
26 override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
27 override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
29 TARGET := $(BASEDIR)/xen
31 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
32 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
33 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
34 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
36 INSTALL := install
37 INSTALL_DATA := $(INSTALL) -m0644
38 INSTALL_DIR := $(INSTALL) -d -m0755
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/banner.h,,$(HDRS))
45 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
47 # Note that link order matters!
48 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
49 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
50 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
51 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
53 CFLAGS-y += -g -D__XEN__
54 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
55 CFLAGS-$(verbose) += -DVERBOSE
56 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
57 CFLAGS-$(perfc) += -DPERF_COUNTERS
58 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
60 ifneq ($(max_phys_cpus),)
61 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
62 endif
64 AFLAGS-y += -D__ASSEMBLY__
66 ALL_OBJS := $(ALL_OBJS-y)
67 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
68 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
70 include Makefile
72 # Ensure each subdirectory has exactly one trailing slash.
73 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
74 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
76 # Add explicitly declared subdirectories to the object list.
77 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
79 # Add implicitly declared subdirectories (in the object list) to the
80 # subdirectory list, and rewrite the object-list entry.
81 subdir-y += $(filter %/,$(obj-y))
82 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
84 subdir-all := $(subdir-y) $(subdir-n)
86 built_in.o: $(obj-y)
87 $(LD) $(LDFLAGS) -r -o $@ $^
89 # Force execution of pattern rules (for which PHONY cannot be directly used).
90 .PHONY: FORCE
91 FORCE:
93 %/built_in.o: FORCE
94 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
96 .PHONY: clean
97 clean:: $(addprefix _clean_, $(subdir-all))
98 rm -f *.o *~ core
99 _clean_%/: FORCE
100 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
102 %.o: %.c $(HDRS) Makefile
103 $(CC) $(CFLAGS) -c $< -o $@
105 %.o: %.S $(HDRS) Makefile
106 $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@