ia64/xen-unstable

view xen/Rules.mk @ 5755:be1153585cb0

Fix hgignore regexps some more.
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 12 16:19:59 2005 +0000 (2005-07-12)
parents 4ed21996131d
children 87cfe3f76045 a83ac0806d6b
line source
1 #
2 # If you change any of these configuration options then you must
3 # 'make clean' before rebuilding.
4 #
5 verbose ?= n
6 debug ?= n
7 perfc ?= n
8 perfc_arrays?= n
9 trace ?= n
10 optimize ?= y
11 domu_debug ?= n
12 crash_debug ?= n
14 # ACM_USE_SECURITY_POLICY is set to security policy of Xen
15 # Supported models are:
16 # ACM_NULL_POLICY (ACM will not be built with this policy)
17 # ACM_CHINESE_WALL_POLICY
18 # ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY
19 # ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY
20 ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLICY
22 include $(BASEDIR)/../Config.mk
24 # Set ARCH/SUBARCH appropriately.
25 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
26 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
27 override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
28 override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
30 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)
35 # Do not depend on auto-generated header files.
36 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
37 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
38 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
40 C_SRCS := $(wildcard *.c)
41 S_SRCS := $(wildcard *.S)
42 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
43 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
45 # Note that link order matters!
46 ALL_OBJS := $(BASEDIR)/common/common.o
47 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
48 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
49 ifneq ($(ACM_USE_SECURITY_POLICY),ACM_NULL_POLICY)
50 ALL_OBJS += $(BASEDIR)/acm/acm.o
51 endif
52 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
55 test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
57 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
59 ifneq ($(debug),y)
60 CFLAGS += -DNDEBUG
61 ifeq ($(verbose),y)
62 CFLAGS += -DVERBOSE
63 endif
64 else
65 CFLAGS += -g -DVERBOSE
66 endif
68 ifeq ($(domu_debug),y)
69 CFLAGS += -DDOMU_DEBUG
70 endif
72 ifeq ($(crash_debug),y)
73 CFLAGS += -g -DCRASH_DEBUG
74 endif
76 ifeq ($(perfc),y)
77 CFLAGS += -DPERF_COUNTERS
78 ifeq ($(perfc_arrays),y)
79 CFLAGS += -DPERF_ARRAYS
80 endif
81 endif
83 ifeq ($(trace),y)
84 CFLAGS += -DTRACE_BUFFER
85 endif
87 CFLAGS := $(strip $(CFLAGS))
89 %.o: %.c $(HDRS) Makefile
90 $(CC) $(CFLAGS) -c $< -o $@
92 %.o: %.S $(HDRS) Makefile
93 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@