ia64/xen-unstable

view xen/Rules.mk @ 2828:62d5a53a46e2

bitkeeper revision 1.1159.1.338 (4187ca95yoh3y8SwBJw4uTmgIxLCTw)

A new install script to install from the intermediate 'install' subdir.
Also now a bit more careful in use of 'cp -a'. When installing to
system-wide directories we probably do not want to preserve ownership
of the random unprivileged user that originally built the binaries.
The user who does the install (probably root) is the correct person
to own the target files.
author kaf24@freefall.cl.cam.ac.uk
date Tue Nov 02 17:57:41 2004 +0000 (2004-11-02)
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 $@