direct-io.hg

view xen/Rules.mk @ 5517:10e9028c8e3d

bitkeeper revision 1.1718.1.10 (42b7b19aqOS_1M8I4pIOFjiTPYWV-g)

Merge bk://xenbits.xensource.com/xen-unstable.bk
into spot.cl.cam.ac.uk:C:/Documents and Settings/iap10/xen-unstable.bk
author iap10@spot.cl.cam.ac.uk
date Tue Jun 21 06:20:10 2005 +0000 (2005-06-21)
parents aa52b853c28b
children 649cd37aa1ab
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 # Set ARCH/SUBARCH appropriately.
14 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
15 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
16 override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
17 override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
19 TARGET := $(BASEDIR)/xen
20 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
21 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
22 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
23 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
24 # Do not depend on auto-generated header files.
25 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
26 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
27 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
29 C_SRCS := $(wildcard *.c)
30 S_SRCS := $(wildcard *.S)
31 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
32 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
34 # Note that link order matters!
35 ALL_OBJS := $(BASEDIR)/common/common.o
36 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
37 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
38 ALL_OBJS += $(BASEDIR)/acm/acm.o
39 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
42 test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
44 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
46 ifneq ($(debug),y)
47 CFLAGS += -DNDEBUG
48 ifeq ($(verbose),y)
49 CFLAGS += -DVERBOSE
50 endif
51 else
52 CFLAGS += -g -DVERBOSE
53 endif
55 ifeq ($(domu_debug),y)
56 CFLAGS += -DDOMU_DEBUG
57 endif
59 ifeq ($(crash_debug),y)
60 CFLAGS += -g -DCRASH_DEBUG
61 endif
63 ifeq ($(perfc),y)
64 CFLAGS += -DPERF_COUNTERS
65 ifeq ($(perfc_arrays),y)
66 CFLAGS += -DPERF_ARRAYS
67 endif
68 endif
70 ifeq ($(trace),y)
71 CFLAGS += -DTRACE_BUFFER
72 endif
74 CFLAGS := $(strip $(CFLAGS))
76 %.o: %.c $(HDRS) Makefile
77 $(CC) $(CFLAGS) -c $< -o $@
79 %.o: %.S $(HDRS) Makefile
80 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@