ia64/xen-unstable

view xen/Rules.mk @ 1593:5b1f0d05d6ca

bitkeeper revision 1.1022 (40df4b9bAB5PoSN_OL446dEED_t5_A)

Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@scramble.cl.cam.ac.uk
date Sun Jun 27 22:35:07 2004 +0000 (2004-06-27)
parents 92b8e1efa784
children 049ca85b7b73 c1e2ec69b1db 6c97e3c04673 539c0e6f0384
line source
2 debug ?= n
3 debugger ?= n
4 perfc ?= n
5 trace ?= n
7 # Currently supported architectures:
8 # {COMPILE,TARGET}_ARCH := x86
9 # {COMPILE,TARGET}_SUBARCH := x86_32 | x86_64
10 COMPILE_ARCH := x86
11 COMPILE_SUBARCH := $(shell uname -m | sed -e s/i.86/x86_32/)
13 TARGET_ARCH ?= $(COMPILE_ARCH)
14 TARGET_SUBARCH ?= $(COMPILE_SUBARCH)
16 TARGET := $(BASEDIR)/xen
17 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
18 HDRS += $(wildcard $(BASEDIR)/include/scsi/*.h)
19 HDRS += $(wildcard $(BASEDIR)/include/hypervisor-ifs/*.h)
20 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
21 # compile.h is always regenerated, but other files shouldn't be rebuilt
22 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
24 C_SRCS := $(wildcard *.c)
25 S_SRCS := $(wildcard *.S)
26 OBJS := $(patsubst %.S,%.o,$(S_SRCS))
27 OBJS += $(patsubst %.c,%.o,$(C_SRCS))
29 # Note that link order matters!
30 ALL_OBJS := $(BASEDIR)/common/common.o
31 ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
32 ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
33 ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
34 ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
36 HOSTCC = gcc
37 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
39 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
41 ifneq ($(debug),y)
42 CFLAGS += -DNDEBUG
43 endif
45 ifeq ($(debugger),y)
46 CFLAGS += -DXEN_DEBUGGER
47 endif
49 ifeq ($(perfc),y)
50 CFLAGS += -DPERF_COUNTERS
51 endif
53 ifeq ($(trace),y)
54 CFLAGS += -DTRACE_BUFFER
55 endif
57 %.o: %.c $(HDRS) Makefile
58 $(CC) $(CFLAGS) -c $< -o $@
60 %.o: %.S $(HDRS) Makefile
61 $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@