ia64/xen-unstable

view xen/arch/x86/Makefile @ 8339:494243ba43b8

Fix shadow_guest32 depenency in Xen/x86 Makefile.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Dec 13 17:02:55 2005 +0100 (2005-12-13)
parents b21be984945a
children b54e981957eb
line source
2 include $(BASEDIR)/Rules.mk
4 OBJS += $(patsubst %.S,%.o,$(wildcard $(TARGET_SUBARCH)/*.S))
5 OBJS += $(patsubst %.c,%.o,$(wildcard $(TARGET_SUBARCH)/*.c))
6 OBJS += $(patsubst %.c,%.o,$(wildcard acpi/*.c))
7 OBJS += $(patsubst %.c,%.o,$(wildcard dm/*.c))
8 OBJS += $(patsubst %.c,%.o,$(wildcard mtrr/*.c))
9 OBJS += $(patsubst %.c,%.o,$(wildcard genapic/*.c))
10 OBJS += $(patsubst %.c,%.o,$(wildcard cpu/*.c))
12 ifeq ($(TARGET_SUBARCH),x86_64)
13 OBJS := $(subst cpu/centaur.o,,$(OBJS))
14 OBJS := $(subst cpu/cyrix.o,,$(OBJS))
15 OBJS := $(subst cpu/rise.o,,$(OBJS))
16 OBJS := $(subst cpu/transmeta.o,,$(OBJS))
17 endif
19 OBJS := $(patsubst shadow%.o,,$(OBJS)) # drop all
20 ifeq ($(TARGET_SUBARCH),x86_64)
21 OBJS += shadow.o shadow_public.o shadow_guest32.o # x86_64: new code
22 endif
23 ifeq ($(TARGET_SUBARCH),x86_32)
24 ifneq ($(pae),n)
25 OBJS += shadow.o shadow_public.o # x86_32p: new code
26 else
27 OBJS += shadow32.o # x86_32: old code
28 endif
29 endif
31 OBJS := $(subst $(TARGET_SUBARCH)/asm-offsets.o,,$(OBJS))
33 ifneq ($(crash_debug),y)
34 OBJS := $(patsubst cdb%.o,,$(OBJS))
35 endif
37 default: $(TARGET)
39 $(TARGET): $(TARGET)-syms boot/mkelf32
40 ./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 \
41 `nm $(TARGET)-syms | sort | tail -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'`
43 $(CURDIR)/arch.o: $(OBJS)
44 $(LD) $(LDFLAGS) -r -o $@ $(OBJS)
46 $(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(TARGET_SUBARCH)/xen.lds
47 $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \
48 boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@
49 $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
50 $(MAKE) $(BASEDIR)/xen-syms.o
51 $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \
52 boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
53 $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
54 $(MAKE) $(BASEDIR)/xen-syms.o
55 $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \
56 boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
57 rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
59 asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
60 $(CC) $(CFLAGS) -S -o $@ $<
62 boot/mkelf32: boot/mkelf32.c
63 $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
65 shadow_guest32.o: shadow.c
67 clean:
68 rm -f *.o *.s *~ core boot/*.o boot/*~ boot/core boot/mkelf32
69 rm -f x86_32/*.o x86_32/*~ x86_32/core
70 rm -f x86_64/*.o x86_64/*~ x86_64/core
71 rm -f mtrr/*.o mtrr/*~ mtrr/core
72 rm -f acpi/*.o acpi/*~ acpi/core
73 rm -f dm/*.o dm/*~ dm/core
74 rm -f genapic/*.o genapic/*~ genapic/core
75 rm -f cpu/*.o cpu/*~ cpu/core
77 .PHONY: default clean