ia64/xen-unstable

changeset 9332:768936b2800a

Move arch/x86 to new build system.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Mar 19 15:17:50 2006 +0100 (2006-03-19)
parents 9795d9407acc
children 760f9149dbaa
files xen/Makefile xen/Post.mk xen/Rules.mk xen/arch/x86/Makefile xen/arch/x86/Rules.mk xen/arch/x86/acpi/Makefile xen/arch/x86/cpu/Makefile xen/arch/x86/cpu/mcheck/Makefile xen/arch/x86/cpu/mtrr/Makefile xen/arch/x86/genapic/Makefile xen/arch/x86/hvm/Makefile xen/arch/x86/hvm/svm/Makefile xen/arch/x86/hvm/svm/x86_32/Makefile xen/arch/x86/hvm/svm/x86_64/Makefile xen/arch/x86/hvm/vmx/Makefile xen/arch/x86/hvm/vmx/x86_32/Makefile xen/arch/x86/hvm/vmx/x86_64/Makefile xen/arch/x86/x86_32/Makefile xen/arch/x86/x86_64/Makefile xen/common/Makefile
line diff
     1.1 --- a/xen/Makefile	Sun Mar 19 14:02:18 2006 +0100
     1.2 +++ b/xen/Makefile	Sun Mar 19 15:17:50 2006 +0100
     1.3 @@ -61,6 +61,7 @@ ifeq ($(ACM_SECURITY),y)
     1.4  	$(MAKE) -C acm
     1.5  endif
     1.6  	$(MAKE) -C arch/$(TARGET_ARCH)
     1.7 +	$(MAKE) -C arch/$(TARGET_ARCH) $(TARGET)
     1.8  
     1.9  # drivers/char/console.o contains static banner/compile info. Blow it away.
    1.10  # Don't refresh these files during e.g., 'sudo make install'
     2.1 --- a/xen/Post.mk	Sun Mar 19 14:02:18 2006 +0100
     2.2 +++ b/xen/Post.mk	Sun Mar 19 15:17:50 2006 +0100
     2.3 @@ -3,7 +3,6 @@ subdirs-all := $(subdirs-y) $(subdirs-n)
     2.4  
     2.5  obj-y += $(patsubst %,%/built_in.o,$(subdirs-y))
     2.6  
     2.7 -default: built_in.o
     2.8  built_in.o: $(obj-y)
     2.9  	$(LD) $(LDFLAGS) -r -o $@ $^
    2.10  
    2.11 @@ -13,7 +12,7 @@ FORCE:
    2.12  %/built_in.o: FORCE
    2.13  	$(MAKE) -C $*
    2.14  
    2.15 -clean: $(addprefix _clean_, $(subdirs-all))
    2.16 +clean:: $(addprefix _clean_, $(subdirs-all)) FORCE
    2.17  	rm -f *.o *~ core
    2.18  _clean_%/: FORCE
    2.19  	$(MAKE) -C $* clean
     3.1 --- a/xen/Rules.mk	Sun Mar 19 14:02:18 2006 +0100
     3.2 +++ b/xen/Rules.mk	Sun Mar 19 15:17:50 2006 +0100
     3.3 @@ -36,18 +36,13 @@ HDRS    := $(subst $(BASEDIR)/include/as
     3.4  HDRS    := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
     3.5  HDRS    := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
     3.6  
     3.7 -C_SRCS  := $(wildcard *.c)
     3.8 -S_SRCS  := $(wildcard *.S)
     3.9 -OBJS    := $(patsubst %.S,%.o,$(S_SRCS))
    3.10 -OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
    3.11 -
    3.12  include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
    3.13  
    3.14  # Note that link order matters!
    3.15  ALL_OBJS-y               += $(BASEDIR)/common/built_in.o
    3.16  ALL_OBJS-y               += $(BASEDIR)/drivers/built_in.o
    3.17  ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
    3.18 -ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
    3.19 +ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
    3.20  
    3.21  CFLAGS-y               += -g -D__XEN__
    3.22  CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
     4.1 --- a/xen/arch/x86/Makefile	Sun Mar 19 14:02:18 2006 +0100
     4.2 +++ b/xen/arch/x86/Makefile	Sun Mar 19 15:17:50 2006 +0100
     4.3 @@ -1,59 +1,61 @@
     4.4 -
     4.5  include $(BASEDIR)/Rules.mk
     4.6  
     4.7 -OBJS += $(patsubst %.S,%.o,$(wildcard $(TARGET_SUBARCH)/*.S))
     4.8 -OBJS += $(patsubst %.c,%.o,$(wildcard $(TARGET_SUBARCH)/*.c))
     4.9 -OBJS += $(patsubst %.c,%.o,$(wildcard acpi/*.c))
    4.10 -OBJS += $(patsubst %.c,%.o,$(wildcard genapic/*.c))
    4.11 -OBJS += $(patsubst %.c,%.o,$(wildcard cpu/*.c))
    4.12 -OBJS += $(patsubst %.c,%.o,$(wildcard cpu/mcheck/*.c))
    4.13 -OBJS += $(patsubst %.c,%.o,$(wildcard cpu/mtrr/*.c))
    4.14 -OBJS += $(patsubst %.c,%.o,$(wildcard hvm/*.c))
    4.15 -OBJS += $(patsubst %.c,%.o,$(wildcard hvm/vmx/*.c))
    4.16 -OBJS += $(patsubst %.S,%.o,$(wildcard hvm/vmx/$(TARGET_SUBARCH)/*.S))
    4.17 -OBJS += $(patsubst %.c,%.o,$(wildcard hvm/svm/*.c))
    4.18 -OBJS += $(patsubst %.S,%.o,$(wildcard hvm/svm/$(TARGET_SUBARCH)/*.S))
    4.19 +subdirs-y += acpi
    4.20 +subdirs-y += cpu
    4.21 +subdirs-y += genapic
    4.22 +subdirs-y += hvm
    4.23  
    4.24 -ifeq ($(TARGET_SUBARCH),x86_64) 
    4.25 -OBJS := $(subst cpu/centaur.o,,$(OBJS))
    4.26 -OBJS := $(subst cpu/cyrix.o,,$(OBJS))
    4.27 -OBJS := $(subst cpu/rise.o,,$(OBJS))
    4.28 -OBJS := $(subst cpu/transmeta.o,,$(OBJS))
    4.29 +subdirs-$(x86_32) += x86_32
    4.30 +subdirs-$(x86_64) += x86_64
    4.31 +
    4.32 +obj-y += apic.o
    4.33 +obj-y += audit.o
    4.34 +obj-y += bitops.o
    4.35 +obj-y += delay.o
    4.36 +obj-y += dmi_scan.o
    4.37 +obj-y += dom0_ops.o
    4.38 +obj-y += domain.o
    4.39 +obj-y += domain_build.o
    4.40 +obj-y += e820.o
    4.41 +obj-y += extable.o
    4.42 +obj-y += flushtlb.o
    4.43 +obj-y += i387.o
    4.44 +obj-y += i8259.o
    4.45 +obj-y += io_apic.o
    4.46 +obj-y += irq.o
    4.47 +obj-y += microcode.o
    4.48 +obj-y += mm.o
    4.49 +obj-y += mpparse.o
    4.50 +obj-y += nmi.o
    4.51 +obj-y += physdev.o
    4.52 +obj-y += rwlock.o
    4.53 +obj-y += setup.o
    4.54 +obj-y += smp.o
    4.55 +obj-y += smpboot.o
    4.56 +obj-y += string.o
    4.57 +obj-y += time.o
    4.58 +obj-y += trampoline.o
    4.59 +obj-y += traps.o
    4.60 +obj-y += usercopy.o
    4.61 +obj-y += x86_emulate.o
    4.62 +
    4.63 +ifneq ($(pae),n)
    4.64 +obj-$(x86_32) += shadow.o shadow_public.o shadow_guest32.o
    4.65 +else
    4.66 +obj-$(x86_32) += shadow32.o
    4.67  endif
    4.68  
    4.69 -OBJS := $(patsubst shadow%.o,,$(OBJS))	# drop all
    4.70 -ifeq ($(TARGET_SUBARCH),x86_64) 
    4.71 - OBJS += shadow.o shadow_public.o shadow_guest32.o shadow_guest32pae.o	# x86_64: new code
    4.72 -endif
    4.73 -ifeq ($(TARGET_SUBARCH),x86_32) 
    4.74 - ifneq ($(pae),n)
    4.75 -  OBJS += shadow.o shadow_public.o shadow_guest32.o	# x86_32p: new code
    4.76 - else
    4.77 -  OBJS += shadow32.o			# x86_32: old code
    4.78 - endif
    4.79 -endif
    4.80 +obj-$(x86_64) += shadow.o shadow_public.o shadow_guest32.o shadow_guest32pae.o
    4.81  
    4.82 -ifneq ($(supervisor_mode_kernel),y)
    4.83 -OBJS := $(subst x86_32/supervisor_mode_kernel.o,,$(OBJS))
    4.84 -endif
    4.85 +obj-$(crash_debug) += gdbstub.o
    4.86  
    4.87 -OBJS := $(subst $(TARGET_SUBARCH)/asm-offsets.o,,$(OBJS))
    4.88 -OBJS := $(subst $(TARGET_SUBARCH)/xen.lds.o,,$(OBJS))
    4.89 -
    4.90 -ifneq ($(crash_debug),y)
    4.91 -OBJS := $(patsubst gdbstub%.o,,$(OBJS))
    4.92 -endif
    4.93 -
    4.94 -default: $(TARGET)
    4.95 +include $(BASEDIR)/Post.mk
    4.96  
    4.97  $(TARGET): $(TARGET)-syms boot/mkelf32
    4.98  	./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 \
    4.99  	`$(NM) $(TARGET)-syms | sort | tail -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'`
   4.100  
   4.101 -$(CURDIR)/arch.o: $(OBJS)
   4.102 -	$(LD) $(LDFLAGS) -r -o $@ $(OBJS)
   4.103 -
   4.104 -$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds
   4.105 +$(TARGET)-syms: boot/$(TARGET_SUBARCH).o xen.lds
   4.106  	$(LD) $(LDFLAGS) -T xen.lds -N \
   4.107  	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@
   4.108  	$(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
   4.109 @@ -77,21 +79,5 @@ boot/mkelf32: boot/mkelf32.c
   4.110  
   4.111  shadow_guest32.o: shadow.c
   4.112  
   4.113 -clean:
   4.114 -	rm -f *.o *.s *~ core boot/*.o boot/*~ boot/core boot/mkelf32
   4.115 -	rm -f x86_32/*.o x86_32/*~ x86_32/core
   4.116 -	rm -f x86_64/*.o x86_64/*~ x86_64/core
   4.117 -	rm -f mtrr/*.o mtrr/*~ mtrr/core
   4.118 -	rm -f acpi/*.o acpi/*~ acpi/core
   4.119 -	rm -f genapic/*.o genapic/*~ genapic/core
   4.120 -	rm -f cpu/*.o cpu/*~ cpu/core
   4.121 -	rm -f hvm/*.o hvm/*~ hvm/core
   4.122 -	rm -f hvm/vmx/*.o hvm/vmx/*~ hvm/vmx/core
   4.123 -	rm -f hvm/vmx/x86_32/*.o hvm/vmx/x86_32/*~ hvm/vmx/x86_32/core
   4.124 -	rm -f hvm/vmx/x86_64/*.o hvm/vmx/x86_64/*~ hvm/vmx/x86_64/core
   4.125 -	rm -f hvm/svm/*.o hvm/svm/*~ hvm/svm/core
   4.126 -	rm -f hvm/svm/x86_32/*.o hvm/svm/x86_32/*~ hvm/svm/x86_32/core
   4.127 -	rm -f hvm/svm/x86_64/*.o hvm/svm/x86_64/*~ hvm/svm/x86_64/core
   4.128 -	rm -f xen.lds
   4.129 -
   4.130 -.PHONY: default clean
   4.131 +clean:: FORCE
   4.132 +	rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
     5.1 --- a/xen/arch/x86/Rules.mk	Sun Mar 19 14:02:18 2006 +0100
     5.2 +++ b/xen/arch/x86/Rules.mk	Sun Mar 19 15:17:50 2006 +0100
     5.3 @@ -33,13 +33,17 @@ CFLAGS  += -DCONFIG_X86_SUPERVISOR_MODE_
     5.4  endif
     5.5  
     5.6  ifeq ($(XEN_TARGET_ARCH),x86_32)
     5.7 -LDFLAGS += -m elf_i386 
     5.8 +LDFLAGS += -m elf_i386
     5.9 +x86_32 := y
    5.10 +x86_64 := n
    5.11  endif
    5.12  
    5.13  ifeq ($(TARGET_SUBARCH),x86_64)
    5.14  CFLAGS  += -mno-red-zone -fpic -fno-reorder-blocks
    5.15  CFLAGS  += -fno-asynchronous-unwind-tables
    5.16  LDFLAGS += -m elf_x86_64
    5.17 +x86_32 := n
    5.18 +x86_64 := y
    5.19  endif
    5.20  
    5.21  # Test for at least GCC v3.2.x.
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/xen/arch/x86/acpi/Makefile	Sun Mar 19 15:17:50 2006 +0100
     6.3 @@ -0,0 +1,5 @@
     6.4 +include $(BASEDIR)/Rules.mk
     6.5 +
     6.6 +obj-y += boot.o
     6.7 +
     6.8 +include $(BASEDIR)/Post.mk
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/xen/arch/x86/cpu/Makefile	Sun Mar 19 15:17:50 2006 +0100
     7.3 @@ -0,0 +1,16 @@
     7.4 +include $(BASEDIR)/Rules.mk
     7.5 +
     7.6 +subdirs-y += mcheck
     7.7 +subdirs-y += mtrr
     7.8 +
     7.9 +obj-y += amd.o
    7.10 +obj-y += common.o
    7.11 +obj-y += intel.o
    7.12 +obj-y += intel_cacheinfo.o
    7.13 +
    7.14 +obj-$(x86_32) += centaur.o
    7.15 +obj-$(x86_32) += cyrix.o
    7.16 +obj-$(x86_32) += rise.o
    7.17 +obj-$(x86_32) += transmeta.o
    7.18 +
    7.19 +include $(BASEDIR)/Post.mk
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/xen/arch/x86/cpu/mcheck/Makefile	Sun Mar 19 15:17:50 2006 +0100
     8.3 @@ -0,0 +1,11 @@
     8.4 +include $(BASEDIR)/Rules.mk
     8.5 +
     8.6 +obj-y += k7.o
     8.7 +obj-y += mce.o
     8.8 +obj-y += non-fatal.o
     8.9 +obj-y += p4.o
    8.10 +obj-y += p5.o
    8.11 +obj-y += p6.o
    8.12 +obj-y += winchip.o
    8.13 +
    8.14 +include $(BASEDIR)/Post.mk
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/xen/arch/x86/cpu/mtrr/Makefile	Sun Mar 19 15:17:50 2006 +0100
     9.3 @@ -0,0 +1,10 @@
     9.4 +include $(BASEDIR)/Rules.mk
     9.5 +
     9.6 +obj-y += amd.o
     9.7 +obj-y += centaur.o
     9.8 +obj-y += cyrix.o
     9.9 +obj-y += generic.o
    9.10 +obj-y += main.o
    9.11 +obj-y += state.o
    9.12 +
    9.13 +include $(BASEDIR)/Post.mk
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/xen/arch/x86/genapic/Makefile	Sun Mar 19 15:17:50 2006 +0100
    10.3 @@ -0,0 +1,10 @@
    10.4 +include $(BASEDIR)/Rules.mk
    10.5 +
    10.6 +obj-y += bigsmp.o
    10.7 +obj-y += default.o
    10.8 +obj-y += es7000.o
    10.9 +obj-y += es7000plat.o
   10.10 +obj-y += probe.o
   10.11 +obj-y += summit.o
   10.12 +
   10.13 +include $(BASEDIR)/Post.mk
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/xen/arch/x86/hvm/Makefile	Sun Mar 19 15:17:50 2006 +0100
    11.3 @@ -0,0 +1,14 @@
    11.4 +include $(BASEDIR)/Rules.mk
    11.5 +
    11.6 +subdirs-y += svm
    11.7 +subdirs-y += vmx
    11.8 +
    11.9 +obj-y += hvm.o
   11.10 +obj-y += i8259.o
   11.11 +obj-y += intercept.o
   11.12 +obj-y += io.o
   11.13 +obj-y += platform.o
   11.14 +obj-y += vioapic.o
   11.15 +obj-y += vlapic.o
   11.16 +
   11.17 +include $(BASEDIR)/Post.mk
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/xen/arch/x86/hvm/svm/Makefile	Sun Mar 19 15:17:50 2006 +0100
    12.3 @@ -0,0 +1,12 @@
    12.4 +include $(BASEDIR)/Rules.mk
    12.5 +
    12.6 +subdirs-$(x86_32) += x86_32
    12.7 +subdirs-$(x86_64) += x86_64
    12.8 +
    12.9 +obj-y += emulate.o
   12.10 +obj-y += instrlen.o
   12.11 +obj-y += intr.o
   12.12 +obj-y += svm.o
   12.13 +obj-y += vmcb.o
   12.14 +
   12.15 +include $(BASEDIR)/Post.mk
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/xen/arch/x86/hvm/svm/x86_32/Makefile	Sun Mar 19 15:17:50 2006 +0100
    13.3 @@ -0,0 +1,5 @@
    13.4 +include $(BASEDIR)/Rules.mk
    13.5 +
    13.6 +obj-y += exits.o
    13.7 +
    13.8 +include $(BASEDIR)/Post.mk
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/xen/arch/x86/hvm/svm/x86_64/Makefile	Sun Mar 19 15:17:50 2006 +0100
    14.3 @@ -0,0 +1,5 @@
    14.4 +include $(BASEDIR)/Rules.mk
    14.5 +
    14.6 +obj-y += exits.o
    14.7 +
    14.8 +include $(BASEDIR)/Post.mk
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/xen/arch/x86/hvm/vmx/Makefile	Sun Mar 19 15:17:50 2006 +0100
    15.3 @@ -0,0 +1,10 @@
    15.4 +include $(BASEDIR)/Rules.mk
    15.5 +
    15.6 +subdirs-$(x86_32) += x86_32
    15.7 +subdirs-$(x86_64) += x86_64
    15.8 +
    15.9 +obj-y += io.o
   15.10 +obj-y += vmcs.o
   15.11 +obj-y += vmx.o
   15.12 +
   15.13 +include $(BASEDIR)/Post.mk
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/xen/arch/x86/hvm/vmx/x86_32/Makefile	Sun Mar 19 15:17:50 2006 +0100
    16.3 @@ -0,0 +1,5 @@
    16.4 +include $(BASEDIR)/Rules.mk
    16.5 +
    16.6 +obj-y += exits.o
    16.7 +
    16.8 +include $(BASEDIR)/Post.mk
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/xen/arch/x86/hvm/vmx/x86_64/Makefile	Sun Mar 19 15:17:50 2006 +0100
    17.3 @@ -0,0 +1,5 @@
    17.4 +include $(BASEDIR)/Rules.mk
    17.5 +
    17.6 +obj-y += exits.o
    17.7 +
    17.8 +include $(BASEDIR)/Post.mk
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/xen/arch/x86/x86_32/Makefile	Sun Mar 19 15:17:50 2006 +0100
    18.3 @@ -0,0 +1,11 @@
    18.4 +include $(BASEDIR)/Rules.mk
    18.5 +
    18.6 +obj-y += domain_page.o
    18.7 +obj-y += entry.o
    18.8 +obj-y += mm.o
    18.9 +obj-y += seg_fixup.o
   18.10 +obj-y += traps.o
   18.11 +
   18.12 +obj-$(supervisor_mode_kernel) += supervisor_mode_kernel.o
   18.13 +
   18.14 +include $(BASEDIR)/Post.mk
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/xen/arch/x86/x86_64/Makefile	Sun Mar 19 15:17:50 2006 +0100
    19.3 @@ -0,0 +1,7 @@
    19.4 +include $(BASEDIR)/Rules.mk
    19.5 +
    19.6 +obj-y += entry.o
    19.7 +obj-y += mm.o
    19.8 +obj-y += traps.o
    19.9 +
   19.10 +include $(BASEDIR)/Post.mk
    20.1 --- a/xen/common/Makefile	Sun Mar 19 14:02:18 2006 +0100
    20.2 +++ b/xen/common/Makefile	Sun Mar 19 15:17:50 2006 +0100
    20.3 @@ -1,4 +1,3 @@
    20.4 -
    20.5  include $(BASEDIR)/Rules.mk
    20.6  
    20.7  obj-y += acm_ops.o