ia64/xen-unstable

view xen/Rules.mk @ 4958:cc1c80ec8139

bitkeeper revision 1.1432 (428a0372Dg_Q9mIOPOkDIc7D3T4aww)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk
date Tue May 17 14:45:06 2005 +0000 (2005-05-17)
parents ddd290cc8f0d
children 2d1acc84d984
line source
2 verbose ?= n
3 debug ?= n
4 perfc ?= n
5 perfc_arrays?= n
6 trace ?= n
7 optimize ?= y
8 domu_debug ?= n
9 crash_debug ?= n
11 include $(BASEDIR)/../Config.mk
13 TARGET := $(BASEDIR)/xen
14 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
15 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
16 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
17 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
18 # Do not depend on auto-generated header files.
19 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
20 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
21 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
23 C_SRCS := $(wildcard *.c)
24 S_SRCS := $(wildcard *.S)
25 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
26 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
28 # Note that link order matters!
29 ALL_OBJS := $(BASEDIR)/common/common.o
30 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
31 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
32 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
35 test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
37 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
39 ifneq ($(debug),y)
40 CFLAGS += -DNDEBUG
41 ifeq ($(verbose),y)
42 CFLAGS += -DVERBOSE
43 endif
44 else
45 CFLAGS += -g -DVERBOSE
46 endif
48 ifeq ($(domu_debug),y)
49 CFLAGS += -DDOMU_DEBUG
50 endif
52 ifeq ($(crash_debug),y)
53 CFLAGS += -g -DCRASH_DEBUG
54 endif
56 ifeq ($(perfc),y)
57 CFLAGS += -DPERF_COUNTERS
58 ifeq ($(perfc_arrays),y)
59 CFLAGS += -DPERF_ARRAYS
60 endif
61 endif
63 ifeq ($(trace),y)
64 CFLAGS += -DTRACE_BUFFER
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 $@