ia64/xen-unstable

view xen/Rules.mk @ 3004:2bebf77dc30e

bitkeeper revision 1.1159.175.1 (419a9b9dCZLKnt1tKvFYyV5cDeDbmQ)

Clean up drivers/char/mem.c patch.
author iap10@labyrinth.cl.cam.ac.uk
date Wed Nov 17 00:30:21 2004 +0000 (2004-11-17)
parents 3f929065a1d1
children b902d48320c4 afd6ea676808
line source
2 verbose ?= n
3 debug ?= n
4 debugger ?= n
5 perfc ?= n
6 trace ?= n
7 optimize ?= y
9 # Currently supported architectures:
10 # {COMPILE,TARGET}_ARCH := x86
11 # {COMPILE,TARGET}_SUBARCH := x86_32 | x86_64
12 COMPILE_ARCH := x86
13 COMPILE_SUBARCH := $(shell uname -m | sed -e s/i.86/x86_32/)
15 TARGET_ARCH ?= $(COMPILE_ARCH)
16 TARGET_SUBARCH ?= $(COMPILE_SUBARCH)
18 TARGET := $(BASEDIR)/xen
19 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
20 HDRS += $(wildcard $(BASEDIR)/include/scsi/*.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 # compile.h is always regenerated, but other files shouldn't be rebuilt
25 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
27 C_SRCS := $(wildcard *.c)
28 S_SRCS := $(wildcard *.S)
29 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
30 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
32 # Note that link order matters!
33 ALL_OBJS := $(BASEDIR)/common/common.o
34 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
35 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
36 ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
37 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
39 HOSTCC = gcc
40 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
42 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
44 ifneq ($(debug),y)
45 CFLAGS += -DNDEBUG
46 ifeq ($(verbose),y)
47 CFLAGS += -DVERBOSE
48 endif
49 else
50 CFLAGS += -DVERBOSE
51 endif
53 ifeq ($(debugger),y)
54 CFLAGS += -DXEN_DEBUGGER
55 endif
57 ifeq ($(perfc),y)
58 CFLAGS += -DPERF_COUNTERS
59 endif
61 ifeq ($(trace),y)
62 CFLAGS += -DTRACE_BUFFER
63 endif
65 %.o: %.c $(HDRS) Makefile
66 $(CC) $(CFLAGS) -c $< -o $@
68 %.o: %.S $(HDRS) Makefile
69 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@