ia64/xen-unstable

view xen/Rules.mk @ 4518:5e994310f44f

bitkeeper revision 1.1293 (425cf706gdIucn9n9UpmnZgk5ZwITQ)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into arcadians.cl.cam.ac.uk:/local/scratch-2/vh249/xen-unstable.bk
author vh249@arcadians.cl.cam.ac.uk
date Wed Apr 13 10:40:06 2005 +0000 (2005-04-13)
parents 445b12a7221a
children 1f679a34da36 79b7835ac75d
line source
2 verbose ?= n
3 debug ?= n
4 perfc ?= n
5 trace ?= n
6 optimize ?= y
7 domu_debug ?= n
8 crash_debug ?= n
10 include $(BASEDIR)/../Config.mk
12 TARGET := $(BASEDIR)/xen
13 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
14 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
15 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
16 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
17 # Do not depend on auto-generated header files.
18 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
19 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
20 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
22 C_SRCS := $(wildcard *.c)
23 S_SRCS := $(wildcard *.S)
24 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
25 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
27 # Note that link order matters!
28 ALL_OBJS := $(BASEDIR)/common/common.o
29 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
30 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
31 ALL_OBJS += $(BASEDIR)/drivers/pci/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 += -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 endif
60 ifeq ($(trace),y)
61 CFLAGS += -DTRACE_BUFFER
62 endif
64 CFLAGS := $(strip $(CFLAGS))
66 %.o: %.c $(HDRS) Makefile
67 $(CC) $(CFLAGS) -c $< -o $@
69 %.o: %.S $(HDRS) Makefile
70 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@