direct-io.hg

view xen/Rules.mk @ 15456:eb2b7ce05f97

hvm vlapic: Fix one_shot argument passed to create_periodic_time().
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
author kfraser@localhost.localdomain
date Tue Jul 03 11:47:08 2007 +0100 (2007-07-03)
parents a7601de2f733
children
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-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
56 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
58 CFLAGS-y += -g -D__XEN__
59 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
60 CFLAGS-$(verbose) += -DVERBOSE
61 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
62 CFLAGS-$(perfc) += -DPERF_COUNTERS
63 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
64 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
66 ifneq ($(max_phys_cpus),)
67 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
68 endif
70 AFLAGS-y += -D__ASSEMBLY__
72 ALL_OBJS := $(ALL_OBJS-y)
74 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
76 # Most CFLAGS are safe for assembly files:
77 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
78 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
79 AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
81 # LDFLAGS are only passed directly to $(LD)
82 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
84 include Makefile
86 # Ensure each subdirectory has exactly one trailing slash.
87 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
88 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
90 # Add explicitly declared subdirectories to the object list.
91 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
93 # Add implicitly declared subdirectories (in the object list) to the
94 # subdirectory list, and rewrite the object-list entry.
95 subdir-y += $(filter %/,$(obj-y))
96 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
98 subdir-all := $(subdir-y) $(subdir-n)
100 built_in.o: $(obj-y)
101 $(LD) $(LDFLAGS) -r -o $@ $^
103 # Force execution of pattern rules (for which PHONY cannot be directly used).
104 .PHONY: FORCE
105 FORCE:
107 %/built_in.o: FORCE
108 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
110 .PHONY: clean
111 clean:: $(addprefix _clean_, $(subdir-all))
112 rm -f *.o *~ core
113 _clean_%/: FORCE
114 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
116 %.o: %.c $(HDRS) Makefile
117 $(CC) $(CFLAGS) -c $< -o $@
119 %.o: %.S $(AHDRS) Makefile
120 $(CC) $(AFLAGS) -c $< -o $@
122 %.i: %.c $(HDRS) Makefile
123 $(CPP) $(CFLAGS) $< -o $@
125 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
126 %.s: %.S $(AHDRS) Makefile
127 $(CPP) $(AFLAGS) $< -o $@