ia64/xen-unstable

view xen/Rules.mk @ 8400:6b1d39a56c2b

Add debugging flag for domains to make domu debugging a run-time option
Signed-off-by: Kip Macy kmacy@fsmware.ckm
author kaf24@firebug.cl.cam.ac.uk
date Thu Dec 15 21:50:12 2005 +0100 (2005-12-15)
parents 28bd01c9b596
children f1b361b05bf3
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 crash_debug ?= n
11 XEN_ROOT=$(BASEDIR)/..
12 include $(XEN_ROOT)/Config.mk
14 # Set ARCH/SUBARCH appropriately.
15 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
16 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
17 override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
18 override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
20 TARGET := $(BASEDIR)/xen
21 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
22 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
23 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
24 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
25 # Do not depend on auto-generated header files.
26 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
27 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
28 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
30 C_SRCS := $(wildcard *.c)
31 S_SRCS := $(wildcard *.S)
32 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
33 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
35 # Note that link order matters!
36 ALL_OBJS := $(BASEDIR)/common/common.o
37 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
38 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
39 ifeq ($(ACM_SECURITY),y)
40 ALL_OBJS += $(BASEDIR)/acm/acm.o
41 CFLAGS += -DACM_SECURITY
42 endif
43 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
45 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
47 ifneq ($(debug),y)
48 CFLAGS += -DNDEBUG
49 ifeq ($(verbose),y)
50 CFLAGS += -DVERBOSE
51 endif
52 else
53 CFLAGS += -g -DVERBOSE
54 endif
56 ifeq ($(crash_debug),y)
57 CFLAGS += -g -DCRASH_DEBUG
58 endif
60 ifeq ($(perfc),y)
61 CFLAGS += -DPERF_COUNTERS
62 ifeq ($(perfc_arrays),y)
63 CFLAGS += -DPERF_ARRAYS
64 endif
65 endif
67 CFLAGS := $(strip $(CFLAGS))
69 %.o: %.c $(HDRS) Makefile
70 $(CC) $(CFLAGS) -c $< -o $@
72 %.o: %.S $(HDRS) Makefile
73 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@