ia64/xen-unstable

view xen/Rules.mk @ 9594:133ce326febd

Clean up HDRS Makefile variable.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Apr 05 15:46:01 2006 +0100 (2006-04-05)
parents c1d53788a25e
children 68ef2efa929b
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 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
38 # Do not depend on auto-generated header files.
39 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
40 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
41 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
43 # Note that link order matters!
44 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
45 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
46 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
47 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
49 CFLAGS-y += -g -D__XEN__
50 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
51 CFLAGS-$(verbose) += -DVERBOSE
52 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
53 CFLAGS-$(perfc) += -DPERF_COUNTERS
54 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
56 ifneq ($(max_phys_cpus),)
57 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
58 endif
60 AFLAGS-y += -D__ASSEMBLY__
62 ALL_OBJS := $(ALL_OBJS-y)
63 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
64 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
66 %.o: %.c $(HDRS) Makefile
67 $(CC) $(CFLAGS) -c $< -o $@
69 %.o: %.S $(HDRS) Makefile
70 $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@